Skip to content

Instantly share code, notes, and snippets.

@freynaud
Created June 8, 2011 21:10
Show Gist options
  • Save freynaud/1015405 to your computer and use it in GitHub Desktop.
Save freynaud/1015405 to your computer and use it in GitHub Desktop.
new test
public class testNG {
@Test
public void m1(){
System.out.println("m1");
}
@DataProvider(name = "test1")
public Object[][] createData1() {
return new Object[][] {
{ "Cedric", new Integer(36) },
{ "Anne", new Integer(37)},
};
}
@Test(dependsOnMethods="m1",dataProvider="test1")
public void test(String a,int b){
System.out.println(a+" "+b);
}
}
@freynaud
Copy link
Author

freynaud commented Jun 8, 2011

m1
m2:passed,true
m2:failed,false
PASSED: m1
PASSED: m2("passed", true)
FAILED: m2("failed", false)
java.lang.RuntimeException: horrible bug
at org.openqa.demo.testNG.m2(testNG.java:22)
.....
SKIPPED: m3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment