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).
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.
Show status ok when app is up and running and all the resources it depends on are available
Given salume supplier app is up and running
And last successful build number is 233
When a client requests status page
Then the content type is TEXT_PLAIN_CHARSET_UTF8
And the status page has http status code OK
And the applicantion name and version is "Salume Supplier DEV"
And the status of the app is "OK"
And the app version in the status page is build number 233
And the database status is "OK"
Supplier Status Page:
request from Client to Supplier
response from Supplier to Client
Salume Supplier DEV is: OK
Database connections is: OK