Forum Discussion

tmssz's avatar
tmssz
Occasional Contributor
4 years ago

Multiple testing parameters from external file

Hallo SoapUI, I have not typical case - I think so.   I have 4 test environments. They differ a little in case of test structure. For simplification we can assume they are the same. We build case...
  • richie's avatar
    4 years ago
    Hey tmssz,

    The way i handle this is a project level properties file that gets loaded in immediately before execution.

    My properties file contains static properties (like hosts:ports, users, full URLs (if necessary), environments, etc.) and dynamic property placeholders. The dynamic properties are empty of values, the static ones have values. What i mean by dynamic are the environment specific properties that can be identified by querying the environment itself...e.g. GUIDs, auth token values.

    I have a disabled "setup testsuite" (disabled so it doesnt run when the project is executed), that generates all the dynamic properties you need which then transfers those values to the project level placeholders.

    Each of my functional testsuites have a setup testcase within them and these contain a RunTestCase teststep that points at each of the testcases within the disabled "setup testsuite" (this handles the issue of variables timing out, so each time the project is executed, the functional testsuites call the testcases thst generate the dynamic detail so nothing has a chance to expire.

    I use the above approach for every project i create now.

    All my teststeps source their properties from the project level properties. This approach means that once youve setup your individual properties files (1 for each environment), and setup your property transfer in your teststeps you never hve to bother updating anything.

    Cheers,

    Rich