BUILD SUCCESS But no Tests were picked to run : Tests run: Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.401 s -- in TestSuite

26 views
Skip to first unread message

Prasad Nutalapati

unread,
Feb 21, 2025, 1:36:57 AMFeb 21
to testng-users

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

Krishnan Mahadevan

unread,
Feb 21, 2025, 1:47:33 AMFeb 21
to testng...@googlegroups.com
I have replied to your discussion thread on github 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

From: testng...@googlegroups.com <testng...@googlegroups.com> on behalf of Prasad Nutalapati <pnuta...@gmail.com>
Sent: Friday, February 21, 2025 7:06:56 AM
To: testng-users <testng...@googlegroups.com>
Subject: [testng-users] BUILD SUCCESS But no Tests were picked to run : Tests run: Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.401 s -- in TestSuite
 
--
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 visit https://groups.google.com/d/msgid/testng-users/9858e4e4-c4bc-4fe6-a656-00b61bedb86an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages