Created
February 14, 2018 18:13
-
-
Save krmahadevan/24a907ac550fb9b190efffcbdd148656 to your computer and use it in GitHub Desktop.
Sample for https://stackoverflow.com/q/48792353/679824
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rationaleemotions.stackoverflow.qn48792353; | |
import org.testng.annotations.AfterSuite; | |
import org.testng.annotations.BeforeSuite; | |
public class Base { | |
@BeforeSuite | |
public void beforeSuite() { | |
System.err.println("beforeSuite() invoked"); | |
} | |
@AfterSuite | |
public void afterSuite() { | |
System.err.println("afterSuite() invoked"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rationaleemotions.stackoverflow.qn48792353; | |
import org.testng.annotations.Test; | |
public class Four extends Base { | |
@Test | |
public void test4() { | |
System.err.println("test4() executed"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rationaleemotions.stackoverflow.qn48792353; | |
import org.testng.annotations.Test; | |
public class One extends Base { | |
@Test | |
public void test1() { | |
System.err.println("test1() executed"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ testbed --- | |
------------------------------------------------------- | |
T E S T S | |
------------------------------------------------------- | |
Running TestSuite | |
... | |
... TestNG 6.14.2 by Cédric Beust ([email protected]) | |
... | |
beforeSuite() invoked | |
test1() executed | |
test2() executed | |
test3() executed | |
test4() executed | |
afterSuite() invoked | |
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.458 sec - in TestSuite | |
Results : | |
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> | |
<suite name="48792353_Suite" verbose="2"> | |
<test name="48792353_test"> | |
<classes> | |
<class name="com.rationaleemotions.stackoverflow.qn48792353.One"/> | |
<class name="com.rationaleemotions.stackoverflow.qn48792353.Two"/> | |
<class name="com.rationaleemotions.stackoverflow.qn48792353.Three"/> | |
<class name="com.rationaleemotions.stackoverflow.qn48792353.Four"/> | |
</classes> | |
</test> | |
</suite> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rationaleemotions.stackoverflow.qn48792353; | |
import org.testng.annotations.Test; | |
public class Three extends Base { | |
@Test | |
public void test3() { | |
System.err.println("test3() executed"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rationaleemotions.stackoverflow.qn48792353; | |
import org.testng.annotations.Test; | |
public class Two extends Base { | |
@Test | |
public void test2() { | |
System.err.println("test2() executed"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment