Consider the following user story about the authentication functionality of an e-commerce website: "As a logged-in user, I want to change my current password with a new one, so that I can make my account safer".
The following are some of the acceptance criteria defined for the user story:
[a] After the logged-in user has successfully changed his password, an email confirming the change must be sent to him
[b] To successfully change the password, the logged-in user must enter the current password, enter a new valid password, and finally confirm by pressing the ‘Change Password’ button
[c] To be valid, the new password entered by the logged-in user is not only required to meet the criteria related to the length and type of characters, but must also be different form the last 5 passwords of that user
[d] A dedicated error message must be presented to the logged-in user when he enters a wrong current password
[e] A dedicated error message must be presented to the logged-in user when he enters the correct current password, but enters an invalid password
Based only on the given information, which of the following ATDD tests is most likely to be written first?
A . The logged-in user enters a wrong current password and views the dedicated error message
B . The logged-in user enters the correct current password, enters a valid new password (different from the last 5 passwords), presses the Change Password’ button, and finally receives the e-mail confirming that the password has been successfully changed
C . The logged-in user enters the correct current password, enters an invalid password, and finally views the dedicated error
D . The logged-in user submits a purchase order containing ten items, selects to pay with a Visa credit card, enters credit card information of a valid card, presses the ‘Confirm’ button, and finally views the dedicated message confirming that the purchase has been successful
Answer: B
Explanation:
ATDD stands for Acceptance Test-Driven Development, which is a collaborative approach to software development and testing, in which the acceptance criteria of a user story are defined and automated as executable tests before the implementation of the software system. ATDD tests are usually written in a Given-When-Then format, which describes the preconditions, the actions, and the expected outcomes of a test scenario. ATDD tests are intended to verify that the software system meets the expectations and the needs of the users and the stakeholders, as well as to provide feedback and guidance for the developers and the testers.
Based on the given information, the ATDD test that is most likely to be written first is the one that corresponds to option B, which is:
Given the logged-in user is on the Change Password page When the user enters the correct current password, enters a valid new password (different from the last 5passwords), and presses the Change Password button Then the user receives an email confirming that the password has been successfully changed
This ATDD test is most likely to be written first, because it covers the main functionality and the happy path of the user story, as well as the most important acceptance criterion [a]. It also verifies that the user can change the password with a valid new password that meets the criteria related to the length, the type of characters, and the history of the passwords, as specified in the acceptance criterion [c]. The other options are not likely to be written first, because they either cover less critical or less frequent scenarios, such as entering a wrong current password [d] or an invalid new password [e], or they are not related to the user story or the acceptance criteria at all, such as submitting a purchase order [d]. References: ISTQB Certified Tester Foundation Level (CTFL)
v4.0 sources and documents:
– ISTQB® Certified Tester Foundation Level Syllabus v4.0, Chapter 1.3.1, Testing in Software Development Lifecycles1
– ISTQB® Glossary of Testing Terms v4.0, Acceptance Test-Driven Development, User Story, Acceptance Criterion, Given-When-Then2
Latest CTFL_SYLL_4.0 Dumps Valid Version with 40 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund