July 2018
Intermediate to advanced
116 pages
2h 41m
English
Let's start with the Jersey Test Framework. We will switch to our IDE and in order to use the Jersey Test Framework, you need to add one simple dependency, as follows:
<dependency> <groupId>org.glassfish.jersey.test- framework.providers</groupId> <artifactId>jersey-test-framework-provider- grizzly2</artifactId> <version>${jersey.version}</version> <scope>test</scope> </dependency>
Jersey offers several test providers; in this case, we will be using the grizzly2 provider. What do you need to do to use this test framework? First of all, you need to implement a test class, say VersionResourceTest, and you need to make it extend the JerseyTest superclass. Next thing you need to do is override the configure method, ...