You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gasper provides a simple to use JUnit `TestRule` that can be used to build integration tests with simple apps, like micro-services. You can configure Gasper with easy to use builder interface.
9
+
Gasper provides a simple to use JUnit `TestRule` that can be used to build integration tests with simple apps, like REST micro-services. You can configure Gasper easily with a builder interface. Gasper will start the application before test class and stop it after tests completes.
10
+
11
+
Gasper supports currently only [Maven](https://maven.apache.org/). The `pom.xml` file is used to read project configuration achieving zero configuration operation.
10
12
11
13
## Usage
12
14
13
-
Best to use with libraries like [Unirest](http://unirest.io/java.html) and [JSON Assert](https://github.com/marcingrzejszczak/jsonassert)
15
+
16
+
Gasper utilize your packaged application. It It means it should be used in integration tests that run after application is being packaged by build tool (Maven). Add this code to your `pom.xml` file (if you didn't done that before):
17
+
18
+
```xml
19
+
<build>
20
+
[..]
21
+
<plugins>
22
+
[..]
23
+
<plugin>
24
+
<groupId>org.apache.maven.plugins</groupId>
25
+
<artifactId>maven-failsafe-plugin</artifactId>
26
+
<version>2.19.1</version>
27
+
<executions>
28
+
<execution>
29
+
<goals>
30
+
<goal>integration-test</goal>
31
+
<goal>verify</goal>
32
+
</goals>
33
+
</execution>
34
+
</executions>
35
+
</plugin>
36
+
[..]
37
+
</plugins>
38
+
[..]
39
+
</build>
40
+
```
41
+
42
+
43
+
Place your integration tests in classes that ends with `*IT` or `*ITest`.
14
44
15
45
### WildFly Swarm configuration
16
46
@@ -30,21 +60,25 @@ public static Gasper gasper = Gasper.configurations()
30
60
.build();
31
61
```
32
62
63
+
Before running `GasperBuilder.build()` method, you can reconfigure those default configurations to your needs.
64
+
33
65
### Example test method (Unirest + JSONAssert)
34
66
67
+
Gasper is best to use with libraries like [Unirest](http://unirest.io/java.html) for fetching data and asserting HTTP/S statuses and [JSON Assert](https://github.com/marcingrzejszczak/jsonassert) to validate correctness of JSON output for REST services.
* Gasper is a very simple integration testing JUnit harness for <code>java -jar</code> servers like <a href="http://wildfly-swarm.io/">WildFly Swarm</a> and <a href="http://projects.spring.io/spring-boot/">Spring Boot</a>.
32
+
* <p>
33
+
* Gasper provides a simple to use JUnit {@link TestRule} that can be used to build integration tests with simple apps, like REST micro-services. You can configure Gasper easily with a builder interface. Gasper will start the application before test class and stop it after tests completes.
34
+
* <p>
35
+
* Gasper supports currently only <a href="https://maven.apache.org/">Maven</a>. The <code>pom.xml</code> file is used to read project configuration achieving zero configuration operation.
36
+
*
37
+
* <h3>Usage</h3>
38
+
*
39
+
* Gasper utilize your packaged application. It It means it should be used in integration tests that run after application is being packaged by build tool (Maven). Add this code to your <code>pom.xml</code> file (if you didn't done that before):
0 commit comments