user3712016
user3712016

Reputation: 203

TestNG -Process finished with exit code 0

I am using Testng, I have two classes Util and test1.

I have 4 simple test methods in Test1 class printing just the name of method. On running the testng.xml, it prints the expected statements from each method for a sec and then replaces it with error - Process finished with exit code 0. I am using Intellij IDE. Could anyone suggest anything on this.

Code :

class util {....}
class tets1 {
@Test
public void testmethod2(){
System.out.println("In testmethod2");
}

@Test
public void testmethod3(){
System.out.println("In testmetho3");
}

 @Test
 public void testmethod4()
 {
 System.out.println("In testmethod4");
 }

 @Test
 public void testmethod5(){
 System.out.println("In testmetho5");
 }

Testng.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="Suite1">
<test name="test1">
<classes>
<class name="TagPackage.Test1"/>
</classes>
</test>
</suite>    

Upvotes: 1

Views: 17627

Answers (1)

tddmonkey
tddmonkey

Reputation: 21184

This isn't an error, this is the correct behaviour in IntelliJ.

The console is displaying the output of each test as it goes, the message Process finished with exit code 0 states that the test run was successful. If a test fails this will say something else (for Spock this returns 255).

If you look to the left of the console you should see the tests that were executed, or clicking on the test name at the top of the tree you will see all of the console output.

Upvotes: 5

Related Questions