Runtime flags

Finally, if an application is completely re-branded or a feature is completely changed and the first two options are not sufficient, users can set a flag using a JVM argument or a TestNG parameter with a release version, and code can execute based on that flag.

For multilanguage testing of labels, users can maintain a different set of JSON data and execute different tests based on the language under test. Of course, this requires the test method to be completely data-free and generic enough to just change the string labels being passed into it as JSON data.

The JVM argument or TestNG parameter can be set and pulled in using an @parameters or System.getProperty() feature:

-Drelease=1.0.x

or

<test name="My Test">
<parameter name="release" value="1.0.x" />
....
</test>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.152.242