How can I test a Windows desktop app that has an option to use cache while sending database information? Any ideas

  • Which cache is it using? Does it have its own cache, or is it using the Windows temp files directory? Or something else? Without this information, it's not possible to help.
    – Kate Paulk
    Sep 14 '16 at 18:11
  • The application uses its own cache.
    – A. Acosta
    Sep 14 '16 at 20:18
  • What sort of testing? What is the expected behavior? What is the function trying to accomplish? Sep 15 '16 at 0:42

Most caches work as following:

  1. Data is requested, retrieved and stored in the cache
  2. Data is displayed
  3. Next time data is requested the cache is checked if it has data, its max lifetime is checked, if cache is still valid data is displayed from cache, else data is retrieved again.

Here some steps to check the above described cache is working

  • Cached: Check data is cached
    • Request data
    • Change data in source database
    • Request data and verify old data is still shown
  • Lifetime: Check data cache is invalid after X time
    • Wait for max lifetime and check changes are again retrieved on a request
  • Database connection: Verify second request does not go to database, check database logs/profiler or network traffic with a monitoring tool

This would test that the cache is working, not in all situations like corrupt data, partial data loads due to network problems, etcs...come up with your own testcases from here on ;-) What else you need to test greatly depends on the implementation of the cache and what the goal of the cache is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.