January 2018
Beginner to intermediate
354 pages
7h 59m
English
Now, in order to pass this file to the test suite at runtime, users can create a system property, read it using their build tool, and process the data when the test suite starts up. In Java, users can use -D switches to pass system properties to a build process:
-DpropertyFile=MyTestEnvironment.properties
Using Gradle as a build tool, here is an example of how to pull in the system property for the test JVM:
test { useTestNG() { if ( System.getProperty('propertyFile') != null ) { systemProperty 'propertyFile', System.getProperty('propertyFile) } }}
Read now
Unlock full access