O'Reilly logo

Arquillian Testing Guide by John D. Ament

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Spock, very groovy test writing

Spock is a specification-oriented testing framework where your tests are written in a requirements-oriented way. The test cases are written in Groovy, but also use a JUnit test-case runner to execute the test case. Spock uses datasets to drive the test cases. Spock does things based on Behavior-driven development (BDD) to create test cases.

Spock uses specifications to define test cases, which will fail until the requirement is implemented. We can use Spock with Arquillian to execute deployments and run test cases against server-side code.

Let's suppose we have the following requirement:

Certain objects may have a state. States that these objects have can progress from 1 to 5. If one of these objects has state less ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required