Adding system property in testng XML?



We are trying to add a system property directly in the testng xml file, as we want to automatically run different test suites in a Jenkins job, without having different xml files for each test set. Is there a way to pass a system property directly to the file and parse it?


For example, we currently have:



<test name="Regression">
<groups>
<run>
<include name="Test" />
</run>
</groups>


and would like to be able to have:



<test name="Regression">
<groups>
<run>
<include name=$TestParameter />
</run>
</groups>


Thanks a lot!


No comments:

Post a Comment