maven project hierarchy
----------------------------------------
src/main/java
src/test/java
PortelloTestSuite.java
@RunWith(Suite.class)
@Suite.SuiteClasses({
AuthenticateControllerTest.class,
ClientControllerTest.class })
public class PortelloTestSuite {}
AuthenticateControllerTest.java
@Test
public void authenticateTest() {
assertEquals(200, response); }
pom.xml
-----------
<profiles>
<profile>
<id>Unit Test</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<includes>
<include>**/*PortelloTestSuite.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<type>jar</type>
<scope>test</scope>
<optional>true</optional>
</dependency>
Maven Run / Build Shell Command on Jenkins
------------------------------------------------------------
mvn test
Great Article
ReplyDeleteNode.js Project Topics for Computer Science
FInal Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai