I have a testng XML file which runs Selenium tests in groups like below. I want to pass through all the browser info set in the parameter names and values from a JSON or another sort of file so i don't have to keep copy and pasting them if i add config for another test - so there is less code. is this possible with a testng XML file?
Thanks for any help.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="2" name="test.java" annotations="JDK" parallel="tests">
<test name="Test - Chrome Vienna">
<parameter name="browser" value="chrome"/>
<parameter name="browserVersion" value="78.0"/>
<parameter name="os" value="OS X"/>
<parameter name="osVersion" value="Mojave"/>
<parameter name="resolution" value="1024x768"/>
<groups>
<run>
<include name="vienna" />
</run>
</groups>
<classes>
<class name="com.bookinggo.ticketed.uiendtoend.TicketedSingleJourneyTest"/>
</classes>
</test>