Skip to content

Commit

Permalink
testNG setTestMethodName_1
Browse files Browse the repository at this point in the history
  • Loading branch information
dlatsuga committed Jul 14, 2018
1 parent 5d6ef30 commit d4f26d6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
9 changes: 0 additions & 9 deletions src/main/java/org/pantheon/testng.xml

This file was deleted.

@@ -1,4 +1,4 @@
package org.pantheon;
package org.pantheon.testng;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Factory;
Expand All @@ -17,12 +17,18 @@ public SetTestMethodName(String suffix) {
}

@Test
public void test1() {
System.out.println("Test 1");
public void test1() throws InterruptedException {
for (int i = 0; i < 3; i++) {
System.out.println("id : "+Thread.currentThread().getId()+ " test: 1 : " + i);
Thread.sleep(1000);
}
}

@Test(dependsOnMethods = "test1")
public void test2() {
System.out.println("Test 2");
public void test2() throws InterruptedException {
for (int i = 0; i < 3; i++) {
System.out.println("id : "+Thread.currentThread().getId()+ " test: 2 : " + i);
Thread.sleep(20);
}
}
}
9 changes: 9 additions & 0 deletions src/main/java/org/pantheon/testng/testng.xml
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="setTestMethodName" verbose="4" parallel="classes" data-provider-thread-count="4" thread-count="4" group-by-instances="true">
<test name="TestNG Bug Example">
<classes>
<class name="org.pantheon.testng.SetTestMethodName"/>
</classes>
</test>
</suite>

0 comments on commit d4f26d6

Please sign in to comment.