Trying to override testNG.xml suite parameter with Jenkins parameter value. But values are not getting replaced. Want to replace the testNG parameters with Jenkin parameter. Can someone please guide. Version used TestNG '7.5' and Open JDK '15'
Maven goals : clean compile test -DtestNGXml=${testNGXml} -DenvironmentName=${environmentName} -DenvironmentClientID=${environmentClientID}
TestNG.xml
<suite name="HealthCheck_Suite" parallel="classes" thread-count=“1”> <parameter name="environmentName" value="DEV" /> <parameter name="environmentClientID" value="BE11TEST" /> <test name="iOS_HealthCheck"> <classes> <class name="MobileLoginTest"> <methods> <include name="loginHealthCheckScript" /> </methods> </class> </classes> </test> </suite>Pom Xml surefire plugin:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M5</version> <configuration> <argLine>-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"</argLine> <suiteXmlFiles> <suiteXmlFile>${testNGXml}</suiteXmlFile> </suiteXmlFiles> </configuration> <dependencies> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>${aspectj.version}</version> <scope>runtime</scope> </dependency> </dependencies> </plugin>```--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/fba90e7a-b3bb-4703-8615-a70aa9ef2b7en%40googlegroups.com.