slider ATDD

ATDD


Testicide will enable you to implement the ATDD (Acceptance Test Driven Development) methodologies while using it.

ATDD is a development methodology which follows these steps in the development process:atddAndBeyond

  1. Write a new acceptance test that fails
  2. Write the simplest code to implement that test and make it succeed
  3. Refactor the code and make it better
  4. Go to step 1 again

These steps is closely related to the TDD (Test Driven Development) methodology, the difference is that here you will write Acceptance tests instead of Unit tests at the beginning of the development cycle.

 

Acceptance tests are tests that are written from the users’ perspective to ensure that all his needs and predefined requirements are satisfied.
These tests are written in natural language with no coding involved to ensure that all stakeholders involved in the software development life cycle including the customers themselves will understand them.
These Acceptance tests are be written in the form of a Scenario composed of many steps. To better understand how to write an acceptance test, let’s take a look at this example:

Given I am on the Login page
When I enter “foo” as a username
And I enter “******” as a password
Then I should be redirected to my Dashboard page

This scenario is a simple Login scenario that ensures that the user whose username is “foo” and password is “******” can actually login to his own account which in this scenario means that he will see his dashboard page.

As you can see here, the scenario is written in pure natural language which explains itself and anyone who has no clue about programming can understand it directly.

Some people have put some rules to write these scenarios and called it Gherkin language.

Gherkin language is based on using three main words to write the steps of any scenario. These words are “Given”, “When” and “Then”.

The “Given” steps are used to put the system in a known condition (initializing the system to execute the required scenario).

The “When” steps describe the actions that the user will perform.

The “Then” steps describe the output that is expected to be seen.

In Testicide, you will be able to adopt the ATDD methodologies and your acceptance tests will follow the Gherkin language style.

Advertisements