TestNG program not giving output

20 views
Skip to first unread message

Sundar Nagaswamy

unread,
Feb 26, 2015, 8:19:59 AM2/26/15
to testng...@googlegroups.com
Hi,

This is my TestNG program,

   package test;
import org.testng.annotations.*;
public class TestPreoprity {
@Test(priority=0)
public void method1() {
System.out.println("Method1");
}
@Test(priority=1)
public void method2() {
System.out.println("Method2");
}
@Test(priority=2)
public void method3() {
System.out.println("Method3");
}
}
 


while executing this im not getting any output. Please check and let me know 

SUBRAMANYESWARA RAO BHAVIRISETTY

unread,
Feb 26, 2015, 2:33:49 PM2/26/15
to testng-users
How are you executing the code? Can you please give the command you are trying to execute?

I tried running the test from the command line.

mvn clean -Denv=qa test -Dtest=TestPriority

Running TestPriority
Method2
Method3
Method1
Test in a suite finished: Command line test and time is: 11:30:45:729
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.26 sec

Results :

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

I am able to see the result in target/surefire-reports/testng-results.xml.


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



--
Subramanyam
Reply all
Reply to author
Forward
0 new messages