I have multiple test tags in suite.xml file as like below:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="1" verbose="1" name="UK-Suite"
skipfailedinvocationcounts="false" junit="false" parallel="methods"
data-provider-thread-count="2" annotations="JDK">
<test verbose="2" name="AuthTxn-Tests"
annotations="JDK" preserve-order="true">
<parameter name="testDataFileXLS"
value="src/test/resources/testdata/TxnTestData/AdjustTestCases.xlsx" />
<parameter name="declineDataFileXLS"
value="src/test/resources/testdata/TxnTestData/DoubeTests.xlsx" />
<parameter name="token"
value="src/test/resources/testdata/TestDefaults.json" />
<classes>
<class name="com.amazon.test.e2e.token.PPTest">
</class>
</classes>
</test>
<test verbose="2" name="LUTON-AuthTxn-Tests" annotations="JDK"
preserve-order="true">
<parameter name="testDataFileXLS"
value="src/test/resources/testdata/TxnTestData/AuthTxnTestCases.xlsx" />
<parameter name="declineDataFileXLS"
value="src/test/resources/testdata/TxnTestData/DoubeTests.xlsx" />
<parameter name="token"
value="src/test/resources/testdata/TestDefaults.json" />
<classes>
<class name="com.amazon.test.e2e.token.PPTest">
</class>
</classes>
</test>
</suite>
I just want to add <parameter name="OS" value="linux"/>
at run time before invoke a @Test method to specific test. There is a common class for all the test tag but It will do different flow execution based upon the test data. I just want to add parameter at runtime for specific test name like "AuthTxn-Tests".
Any leads?