August 2017
Intermediate to advanced
332 pages
9h 16m
English
Acceptance testing usually requires running a dedicated black-box test suite that checks the behavior of the system. We will cover it in the Writing acceptance tests section. At the moment, for the sake of simplicity, let's perform acceptance testing simply by calling the web service endpoint with the curl tool and checking the result using the test command.
In the root directory of the project, let's create the acceptance_test.sh file:
#!/bin/bashtest $(curl localhost:8765/sum?a=1\&b=2) -eq 3
We call the sum endpoint with parameters a=1 and b=2 and expect to receive 3 in response.
Then, the Acceptance test stage can look as follows:
stage("Acceptance test") { steps { sleep 60 sh "./acceptance_test.sh" ...Read now
Unlock full access