Status page happy path

What Is an Acceptance Test (not a stupid question)?

Before implementing a feature, we write a test that will both: a) describe the feature being implemented in an human readable and understandable way to help close the gaps between business and developers, and b) work as a regression test suit. This is and end-to-end test that shouldn't need to change if a database is replaced by another, if a broker is introduced in a messaging layer, and so on (even if those changes would probably break the test) because it describes a feature from a high level business point-of-view. At first, we don't mind if the code compile, and start writing a consistent business focused happy path test, from the input to the output. Then we do the necessary job to see the test failing, and assure that the failing messages are meaningful (very helpful since it will help us catch problems quickly as they happen in the future.) The test will keep failing till the feature it describes is implemented, when the app will be ready to be deployed into the staging environment(s). If business is happy and the new feature is bug free, it's ready to be deployed into production (there may be additional steps depending on the work environment).

Walking Skeleton

Besides being the acceptance test for the status page, this test was also part of a walking skeleton for this app (more details about what that means here). "The more experience I have, the more I focus on the way we work instead of the technologies we use. I recommend reading the excellent Growing Object-Oriented Software Guided by Tests.


App is ok


Given salume supplier app is up and running

When a client requests status page

Then the content type is TEXT_PLAIN_CHARSET_UTF8
Then the status page has http status code OK
Then the applicantion name and version is "Salume Supplier DEV"
Then the status of the app is "OK"
Then the app version in the status page is the implementation version in the manifest
Then the database status is "OK"

Test results:

Test passed

Interesting Givens

Supplier Status Page: http://localhost:8081/salume/supplier/status

Status page request from Client to Supplier


Status page response from Supplier to Client

Salume Supplier DEV is: OK Version: ${project.version} Database connections is: OK

Sequence Diagram

Client Client Supplier Supplier Status page request Status page response