Test Case Design Best Practices 10/21/2021 DAI WHALEY JASON GLASER
9 Slides2.49 MB
Test Case Design Best Practices 10/21/2021 DAI WHALEY JASON GLASER
Best Practice Requirements Write Tests Early Simple Clear Single Expected Result Unique Name Backend Testing Design See Patterns Fail Fast Write Defensively Dependencies Regression / Automation Refactor When Needed Shared Ownership Design Review
Test Case Building Blocks ID Description Prerequisites Steps Data Expected Result Actual Result Status Created By Executed By Date of Creation
What to Ask Unique Identifier? Summary? Traceable? Define Pre-Conditions? Single Expected Result? 10 Steps or Less? Written in Modular Manner? When was Test Written? Repeatable Patterns? Is this Test a Regression or Automation Candidate?
Example Test Name: Login Scenario Happy Path Description: This test verifies a user can login with valid credentials Prerequisites: Access to the website Valid login credentials
STEP Description Expected Actual 1 Access website: https:// website Website displays Website displays 2 Click login button Page to enter credentials displays Page to enter credentials displays 3 Enter valid credentials: Username: Testuser1 Password: 12345 Username / Password entered successfully Username / Password entered successfully 4 Click login button User successfully logged in User successfully logged in
Scenario – 15 Minutes Write a test case for this scenario Challenge: Positive and Negative Test User forgot password and needs to reset it User can click on reset password link and enter their email User receives email and can click a link to enter new password Needs to be 8 characters long Can’t be their last password Once password is set, they can log in with it
Test Case Review
Questions / Comments ?