Style of Writing Tests
This is one of the most important aspect to decide when choosing a test framework stack.
This is how you express yourself in the test scenario. This is what everyone reads to understands what getting tested and how the system behaves.
Since the core of this book is a BDD tool, we will be using the BDD style of writing test scenario. This emphasizes on a Given, When, Then format, where
- Given defines the pre-requisite of any test scenario
- When is used to list down all the necessary steps needed for the scenario workflow
- Then takes care of asserting whether the actual output of the workflow matches with our expectation.
We will plenty of such examples further in this book.
The other possible options in this space are the normal unit testing style of writing tests using a JUnit or TestNG test frameworks.