Last active
April 16, 2016 07:45
-
-
Save coding963/478b2c67a46d60f54095635cfd8fe232 to your computer and use it in GitHub Desktop.
AllTestSuites
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.test; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Suite; | |
import org.junit.runners.Suite.SuiteClasses; | |
@RunWith(Suite.class) | |
@SuiteClasses({TestOneSuite.class, TestTwoSuite.class}) | |
public class AllTestSuites { | |
} |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.testsuite</groupId> | |
<artifactId>checktestsuite</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.12</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
</project> |
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.test; | |
import org.junit.Test; | |
public class TestClassOne { | |
@Test | |
public void testOne(){ | |
System.out.println("Inside TestClassOne."); | |
} | |
} |
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.test; | |
import org.junit.Test; | |
public class TestClassTwo { | |
@Test | |
public void testTwo(){ | |
System.out.println("Inside TestClassTwo."); | |
} | |
} |
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.test; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Suite; | |
import org.junit.runners.Suite.SuiteClasses; | |
@RunWith(Suite.class) | |
@SuiteClasses(TestClassOne.class) | |
public class TestOneSuite { | |
} |
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.test; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Suite; | |
import org.junit.runners.Suite.SuiteClasses; | |
@RunWith(Suite.class) | |
@SuiteClasses(TestClassTwo.class) | |
public class TestTwoSuite { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output on the console is:
Inside TestClassOne.
Inside TestClassTwo.