Squish/Custom Settings for Test Runs

From Qt Wiki
< Squish
Revision as of 14:58, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

this page in: Español Italian

Custom settings for test runs

In certain test cases, it might be necessary to use custom settings for the application compared to other test cases. This could for example include an application that shows an introductory guide the very first time it is started, to set up some basic settings. This would only work the first time though, as the settings are stored when the test case is finished, preferrably using QSettings.

But since we can access all of the Qt API from Squish, there is an easy way around this problem! For the specific test case, simply modify the QSettings object for the application. Or more specifically, change the path to where the settings are stored to a temporary directory that you are removing at the end of the test script.

Keep in mind that this call will not modify existing QSettings objects in the application, so this will need to be done before any of those are created.

There are 2 articles in "Tools -> Squish -> Custom_settings_for_test_runs":

T

Categories: