I know this is a very well known question, which is answered many number of times. After going through all of them, I am still have to run with my issue to the forum. PLEASE HELP.
I was running this project since almost 1.5 years. Just yesterday, before closing for the day I ran the automation scrip multiple times with no issue. I started having this strange issue today. I hope monsters are not the cause for this issue :)
I made sure and checked that
1. My test class has **no main method**.
2. My test method has **public qualifier**
3. My test method has **no return parameter.**
4. Test annotation is from **TestNG** framework, **not JUnit**.
5. test tag in xml config file has **enabled="true"**
6. Using TestNG version 7.11.0
7. Whenever I try to give a wrong Java file path, TestNG complains that it is not able to find it, meaning currently, it is having classpath correctly specified.
Here is the skeletal outline of my script.package com.zq.mobile.browser.agent;
import org.testng.annotations.Test;
public class StockQuoteCreation extends SeleniumUtil {
@Parameters({"platform","browser","device","udid","platformVersion","appiumPort"})
@BeforeClass
public void setUp( String platform,String browser,String device,String udid,String platformVersion,String appiumPort) throws Exception {
super.setUp(platform, browser, device, udid, platformVersion, appiumPort, excelDataRowNbr,excelDataRowNbr2, excelDataSheet);
System.out.println("setUp completed");
}
@Test
public void quoteCreationAndApprovalValidations() throws InterruptedException {
assertHomeAfterLogin();
logger.debug("asserted the Title");
createStockQuoteInfoStep();// <----
addCustomer();// <----
}
private void createStockQuoteInfoStep() throws InterruptedException {// <----
// Create Quote menu....
}
private void addCustomer() throws InterruptedException {// <----
// 'Add Customers'...
}
@AfterClass
public void tearDown() throws Exception {
//.....
}
}
Here is the outline of my configuration xml file<?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="StockQuoteCreation_RealLocalDeviceAndroidTesting" enabled="true">
<classes>
<class name="com.zq.mobile.browser.agent.StockQuoteCreation">
<parameter name="platform" value="Android"/>
<parameter name="browser" value="Chrome"/>
<parameter name="device" value="Galaxy S21 FE 5G"/>
<parameter name="udid" value="R5CW71PYTHE"/>
<parameter name="platformVersion" value="14"/>
</class>
</classes>
</test>
</suite>
Here is my run time console output[INFO] Scanning for projects...
[INFO]
[INFO] �[1m----------------< �[0;36mZklmn-zCommerceQA:Zklmn-zCommerceQA�[0;1m >-----------------�[m
[INFO] �[1mBuilding Zklmn-zCommerceQA 0.0.1-SNAPSHOT�[m
[INFO] from pom.xml
[INFO] �[1m--------------------------------[ jar ]---------------------------------�[m
[INFO]
[INFO] �[1m--- �[0;32mdependency:3.3.0:properties�[m �[1m(getClasspathFilenames)�[m @ �[36mZklmn-zCommerceQA�[0;1m ---�[m
[INFO]
[INFO] �[1m--- �[0;32mresources:3.3.1:resources�[m �[1m(default-resources)�[m @ �[36mZklmn-zCommerceQA�[0;1m ---�[m
[INFO] Copying 3 resources from src/main/resources to target/classes
[INFO]
[INFO] �[1m--- �[0;32mcompiler:3.12.1:compile�[m �[1m(default-compile)�[m @ �[36mZklmn-zCommerceQA�[0;1m ---�[m
[INFO] No sources to compile
[INFO]
[INFO] �[1m--- �[0;32mresources:3.3.1:testResources�[m �[1m(default-testResources)�[m @ �[36mZklmn-zCommerceQA�[0;1m ---�[m
[INFO] Copying 1 resource from src/test/resources to target/test-classes
[INFO]
[INFO] �[1m--- �[0;32mcompiler:3.12.1:testCompile�[m �[1m(default-testCompile)�[m @ �[36mZklmn-zCommerceQA�[0;1m ---�[m
[INFO] Nothing to compile - all classes are up to date.
[INFO]
[INFO] �[1m--- �[0;32msurefire:3.2.5:test�[m �[1m(default-test)�[m @ �[36mZklmn-zCommerceQA�[0;1m ---�[m
[INFO] Using auto detected provider org.apache.maven.surefire.testng.TestNGProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running �[1mTestSuite�[m
[INFO] �[1mTests run: �[0;1m0�[m, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.404 s -- in �[1mTestSuite�[m
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] �[1m------------------------------------------------------------------------�[m
[INFO] �[1;32mBUILD SUCCESS�[m
[INFO] �[1m------------------------------------------------------------------------�[m
[INFO] Total time: 1.544 s
[INFO] Finished at: 2025-02-20T19:20:26-06:00
[INFO] �[1m------------------------------------------------------------------------�[m