Skip to content

Commit 7e384b1

Browse files
Test execution now exits
1 parent 19cd6c0 commit 7e384b1

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ to your [account's API key](https://applitools.com/tutorials/getting-started/set
3131
and then run:
3232

3333
```
34-
mvn exec:java -Dexec.mainClass="com.applitools.example.AcmeBankTests" -Dexec.classpathScope=test
34+
mvn exec:exec@run-the-tests -Dexec.classpathScope=test
3535
```
3636

3737
**For full instructions on running this project, take our

pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,30 @@
2828
</dependency>
2929
</dependencies>
3030

31+
<build>
32+
<plugins>
33+
<plugin>
34+
<groupId>org.codehaus.mojo</groupId>
35+
<artifactId>exec-maven-plugin</artifactId>
36+
<version>3.1.0</version>
37+
<executions>
38+
<execution>
39+
<id>run-the-tests</id>
40+
<goals>
41+
<goal>exec</goal>
42+
</goals>
43+
<configuration>
44+
<executable>java</executable>
45+
<arguments>
46+
<argument>-cp</argument>
47+
<classpath/>
48+
<argument>com.applitools.example.AcmeBankTests</argument>
49+
</arguments>
50+
</configuration>
51+
</execution>
52+
</executions>
53+
</plugin>
54+
</plugins>
55+
</build>
56+
3157
</project>

src/test/java/com/applitools/example/AcmeBankTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ public static void main(String [] args) {
178178
// No matter what, perform cleanup
179179
tests.cleanUpTest();
180180
tests.printResults();
181+
System.exit(0);
181182
}
182183
}
183184
}

0 commit comments

Comments
 (0)