Changes for page Acceptance Tests
Last modified by chrisby on 2024/05/11 08:20
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,31 +2,29 @@ 2 2 3 3 Acceptance Tests provide an unambiguous completion criteria for stories, the **Definition of Done**. A story is done when its associated acceptance tests have passed, along with all other existing tests. Only then can the estimated points of a story be added to the charts at the end of an iteration. 4 4 5 -* **Integration Of All Components**: Acceptance testing is the ultimate test of whether a feature works or not. To check this, the software must be deployed in production mode and then tested from the user's point of view; if there is a GUI, this is usually done by interacting with it. Common toolsused to simulate such user interactionsareCypressand Selenium.5 +* **Integration Of All Components**: Acceptance testing is the ultimate test of whether a feature works or not. To check this, the software must be deployed in production mode and then tested from the user's point of view; if there is a GUI, this is usually done by interacting with it. A common tool used to simulate such user interactions is Cypress. 6 6 * **Always Production Ready**: Acceptance testing ensures the stability of the software by proving that it works correctly if it passes the tests. This prevents developers from inadvertently breaking features by changing the code. Therefore, software functionality cannot evolve backwards. However, this does not prevent code from technically rotting under the surface, so code should also be kept clean, not just functional. 7 7 * **Execution Frequency**: Since running all acceptance tests can take a very long time, it is common to schedule an automated run once a day at midnight. If bugs occur, they are addressed immediately the next day. 8 8 * **Implementation Timing**: Stories should not wait for acceptance tests to be completed. Ideally, acceptance tests should be started to be written in the previous iteration, but no later than after the IPM, so that they are completed before the story they verify. Since it is not possible to know with certainty which stories will be implemented in the next iteration, testers can ask stakeholders which stories are likely to come next. If acceptance testing is consistently late, QA will need to hire more people. QA and developers should communicate and negotiate the test structure, perhaps even pair programming, instead of the "eat or die" tactic of writing tests without consulting the developer. 9 9 * **Level of Detail**: The business should specify the requirements at a level of detail that is specific enough for the developers to know what to do, but still short and vague enough not to contain details. Acceptance tests are story specification. 10 10 * **Requirement Automation**: Wherever practically feasible, requirements should be written as automated tests. 11 -* **Acceptance Test Anatomy**: Acceptance tests consist of **technical acceptance test code** and can contain **business acceptance test code**. The business acceptance test code is written in Englishand in natural language and, when executed, they run the technical acceptance test code written in a programming language. Acceptance tests are the link between easy-to-understand business requirements and test automation.11 +* **Acceptance Test Anatomy**: Acceptance tests consist of **technical acceptance test code** and can contain **business acceptance test code**. The business acceptance test code is written in natural language (English) and, when executed, they run the technical acceptance test code written in a programming language. Acceptance tests are the link between easy-to-understand business requirements and test automation. 12 12 13 13 ### Sample Acceptance Test 14 14 15 -Below is the business acceptance test code of a "Login Scenario" written in the "Gherkin" language, which is used, for example,by the Cucumber acceptance testing framework:15 +Below is the business acceptance test code of a "Login Scenario" written in the "Gherkin" language, which is used, by the Cucumber acceptance testing framework. 16 16 17 -```cucumber 18 -Feature: User Login 19 - In order to access my account 20 - As a user 21 - I want to be able to log in using my credentials 17 + Feature: User Login 18 + In order to access my account 19 + As a user 20 + I want to be able to log in using my credentials 21 + 22 + Scenario: Successful login 23 + Given I am on the login page 24 + When I enter a valid username and password 25 + And I click the login button 26 + Then I should see my dashboard 22 22 23 - Scenario: Successful login 24 - Given I am on the login page 25 - When I enter a valid username and password 26 - And I click the login button 27 - Then I should see my dashboard 28 -``` 29 - 30 30 * **Ease of Comprehension**: As shown above, the technical keywords in business test code are replaced with easy-to-understand ones that allow business people to read and write executable tests. Business acceptance test code should always be available to stakeholders. 31 31 32 32 ### Tester Roles