<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="zCommerce_Test_Suite" preserve-order="true" parallel="none" thread-count="1">
<test name="RealLocalDeviceTesting">
<classes>
<class name="com.zq.mobile.browser.test.OpenTextSearchOnlineOrdering">
<parameter name = "MaterialNbr" value="5521000"/>
<parameter name = "platform" value="iOS"/>
<parameter name = "browser" value="Safari"/>
<parameter name = "device" value="Venkata Nutalapati's iPhone"/>
<parameter name = "udid" value="00008030-000159EA0E60402E"/>
<parameter name = "platformVersion" value="17.5.1"/>
</class>
<class name="com.zq.mobile.browser.test.OpenTextSearchOnlineOrdering">
<parameter name = "MaterialNbr" value="5521000"/>
<parameter name = "platform" value="Android"></parameter>
<parameter name = "browser" value="Chrome"></parameter>
<parameter name = "device" value="Galaxy S21 FE 5G"></parameter>
<parameter name = "udid" value="R5CW71PYTHE"></parameter>
<parameter name = "platformVersion" value="14"></parameter>
</class>
</classes>
</test>
</suite>
I am expecting the test class be run with each set of parameters(iOS, and Android). All the parameters are being passed just fine to the class during run time, when I run the config with just either one of the class. Whether I change the order of the class tag, or not, it always is running the second class set ONLY, but I don't understand why ??
What is the mistake I have to correct in the config xml file syntax ??
I tried checking whether the parameter string values are being passed when either of the test cases are running, which is postive whether it is for Android case or iOS case.
I tried shifting the order of the two class tag contents like from 1-2 to 2-1, it is always choosing to run the test case with second tag only.
I tried removing the <suite> arguments 'parallel', 'thread-count', but no help
I am seeing it is executing only one test case as shown below.
isTestPassed=true
[INFO] [1;32mTests run: [0;1;32m1 [m, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 87.72 s -- in [1mTestSuite [m
[INFO]
[INFO] Results:
[INFO]
[INFO] [1;32mTests run: 1, Failures: 0, Errors: 0, Skipped: 0 [m
[INFO]
[INFO] [1m------------------------------------------------------------------------ [m
[INFO] [1;32mBUILD SUCCESS [m
[INFO] [1m------------------------------------------------------------------------ [m
[INFO] Total time: 01:29 min
[INFO] Finished at: 2024-08-26T10:04:57-05:00
[INFO] [1m------------------------------------------------------------------------ [m
I am hoping to make the TestNG run both the test classes using the corresponding parameter string values.
Prasad Nutalapati
I think it is because name of the parameter is not unique. For example, 'MaterialNbr'. You defined it two times and testNG set the last value for it. You shoud have separate test for each set of parameters or use a data provider.
--
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/f6bcca4b-a0cb-43ea-862d-96eb03cd204fn%40googlegroups.com.
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="zCommerce_Test_Suite" preserve-order="true" parallel="none" thread-count="1">
<!-- <test name="RealLocalDeviceTesting"> -->
<test name="RealLocalDeviceiOSTesting">
<classes>
<class name="com.zq.mobile.browser.test.PurchaseOrderCreation" />
<class name="com.zq.mobile.browser.test.DeliveryDocumentNbrValidation" />
<class name="com.zq.mobile.browser.test.OpenTextSearchOnlineOrdering">
<parameter name = "MaterialNbr" value="5521000"/>
<parameter name = "platform" value="iOS"/>
<parameter name = "browser" value="Safari"/>
<parameter name = "device" value="Venkata Nutalapati's iPhone"/>
<parameter name = "udid" value="00008030-000159EA0E60402E"/>
<parameter name = "platformVersion" value="17.5.1"/>
</class>
</classes>
</test>
<test name="RealLocalDeviceAndroidTesting">
<class name="com.zq.mobile.browser.test.PurchaseOrderCreation" />
<class name="com.zq.mobile.browser.test.DeliveryDocumentNbrValidation" />
<classes> -->
<class name="com.zq.mobile.browser.test.OpenTextSearchOnlineOrdering">
<parameter name = "MaterialNbr" value="5521000"/>
<parameter name = "platform" value="Android"></parameter>
<parameter name = "browser" value="Chrome"></parameter>
<parameter name = "device" value="Galaxy S21 FE 5G"></parameter>
<parameter name = "udid" value="R5CW71PYTHE"></parameter>
<parameter name = "platformVersion" value="14"></parameter>
</class>
</classes>
</test>
</classes>
</test>
</suite>
Prasad Nutalapati