Testng XML not running

862 views
Skip to first unread message

Om Prakash

unread,
Nov 10, 2016, 1:32:32 AM11/10/16
to testng-users

Hi 


I am using below command but not executing test cases



java -cp "./lib/*" org.testng.TestNG testng.xml

[TestNG] Running:

  /Users/ctluser/Documents/AtomationMSOPOC/testng.xml



===============================================

example suite 1

Total tests run: 0, Failures: 0, Skips: 0

===============================================


Please find the below xml fine which is i am using 


<?xml version="1.0" encoding="UTF-8"?>

<suite name="example suite 1" verbose="1" >

  <test name="Regression suite 1" >

    <packages>

      <package name="mainPackage"/>

    </packages>

 </test>

</suite>


please help to solve the issue.


Regards

OmPrakash

⇜Krishnan Mahadevan⇝

unread,
Nov 10, 2016, 1:38:41 AM11/10/16
to testng...@googlegroups.com
Increase your verbosity and re-run. You should be able to see the reason behind why TestNG doesn't run your tests.

That is.,

Change : <suite name="example suite 1" verbose="1" >

To : <suite name="example suite 1" verbose="3" >

and run again.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Om Prakash

unread,
Nov 10, 2016, 1:46:30 AM11/10/16
to testng-users
After changing not working showing below output in mac terminal 


apples-MacBook-Pro-3:AtomationMSOPOC ctluser$ java -cp "./lib/*" org.testng.TestNG testng.xml

...

... TestNG 6.9.4 by Cédric Beust (ced...@beust.com)

...


[TestRunner] Running the tests in 'Regression suite 1' with parallel mode:false

[RunInfo] Adding method selector: org.testng.internal.XmlMethodSelector@2f333739 priority: 10

[TestNG] Running:

  /Users/ctluser/Documents/AtomationMSOPOC/testng.xml


[SuiteRunner] Created 1 TestRunners

[TestRunner] Running test Regression suite 1 on 0  classes,  included groups:[] excluded groups:[]

===== Invoked methods

=====

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/example suite 1/Regression suite 1.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/example suite 1/Regression suite 1.xml


===============================================

    Regression suite 1

    Tests run: 0, Failures: 0, Skips: 0

===============================================



===============================================

example suite 1

Total tests run: 0, Failures: 0, Skips: 0

===============================================


[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@6d9c638: 1 ms

[TestNG] Time taken by org.testng.reporters.EmailableReporter2@7fbe847c: 12 ms

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/toc.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/Regression suite 1.properties

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/index.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/main.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/groups.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/methods.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/methods.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/methods-alphabetical.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/methods-alphabetical.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/classes.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/reporter-output.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/methods-not-run.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/example suite 1/testng.xml.html

Creating /Users/ctluser/Documents/AtomationMSOPOC/test-output/old/index.html

[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@759ebb3d: 18 ms

[TestNG] Time taken by org.testng.reporters.XMLReporter@442d9b6e: 6 ms

[TestNG] Time taken by org.testng.reporters.jq.Main@4c98385c: 69 ms

[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 0 ms

To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.

⇜Krishnan Mahadevan⇝

unread,
Nov 10, 2016, 3:08:41 AM11/10/16
to testng...@googlegroups.com
The output

[SuiteRunner] Created 1 TestRunners

[TestRunner] Running test Regression suite 1 on 0  classes,  included groups:[] excluded groups:[]

===== Invoked methods

=====

Seems to suggest that there was no test classes found in <package name="mainPackage"/>

Please double check your xml and ensure that you are referring valid test packages which contains one or more @Test annotated TestNG test methods.

Also please ensure that your tests are using @Test annotation from TestNG and not from JUnit.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages