I have a BDD feature in which there are many scenarios, should each scenario be fully self-sustained and individually operable?
must be yes. It is usually good practice in all types of TDD (included in BDD) to ensure that each "test" can run independently, and it can not be dependent on any other test or before any test Is being run. This will help to avoid making a brittle test suit (i.e., which is likely to break). Not to say that you can not combine readability together. For a very cheap / quick example: Each scenario can be run automatically, indicating a test - and to be able to run each of them independently should be designed behind the scenes. But as a reader of convenience (called a business stakeholder) - the process has been completed and they can understand the whole picture more easily.
Feature: Users can register and log in. Scenario: You should be able to register. I was not registered when I registered the registration form I will then register the situation: I should be able to log in. I am registered when I am correctly signed in with my credentials, then I will be logged in. Scenario: I should be able to log out. I will be logged out when I sign out.
Comments
Post a Comment