Software Testing Lec 9
Software Testing Lec 9
F a c u l t y o f C o m p u t e r S c i e n c e a n d I n f o r m a t i o n Te c h n o l o g y
Department of Software Engineering
Software Testing
SWE406
Lecture 9
Collaboration-based test techniques
Focus on defect avoidance by collaboration and communication
A. Collaborative User Story Writing
- Collaboration between business representatives, developers, and testers
- a User Story is a small workflow unit, written in:
As a User (role), I seek Activity so that the Goal is structured, followed by the
acceptance criteria for functional and non-functional requirements.
- User stories have “3 C’s:
• Card – are where user stories are written to be put on board,
• Conversation – written user stories in cards are discussed. Explains how the
software will be used (can be documented or verbal)
• Confirmation – the Acceptance Criteria
Testers turn User Stories into Test Cases to ensure the program works as intended.
Ref.: https://testsigma.com/blog/user-stories-in-testing/ 3
Collaboration-based test techniques
3- Write the test case steps:
Test Case 1:
1.Go to the product’s page.
2.For the chosen item, click the “Add to Cart” button.
3.Check that the item has been put to the shopping basket.
Test Case 2:
1.Go to the product’s page.
2.Select multiple items by selecting the “Add to Cart” buttons next to them.
3.Check that all selected goods have been put in the shopping basket.
Ref.: https://testsigma.com/blog/user-stories-in-testing/ 4
Collaboration-based test techniques
5- Prioritize the test cases:
Prioritize the situations depending on their relevance.
Test Case 1 is a priority since it covers the core operation of adding a single item to the
shopping cart.
Ref.: https://testsigma.com/blog/user-stories-in-testing/ 5
Collaboration-based test techniques
B. Acceptance Criteria
• Acceptance criteria for a user story are the test conditions (called in agile: definition of
done which are a set of a criteria to be met to accept an increment (sprint) to be
released in a project):
- should describe customers' requirements and demands.
- define the scope of the user story
- should be exercised by the test cases,
- written by product owner or manager
Ref.: https://testsigma.com/blog/user-stories-in-testing/ 6
Writing Acceptance Criteria - Scenario-oriented
Ex.: User story: As a bank card user, I want to be able to request cash from my account at an
ATM so that I will be able to receive the money from my account quickly and in different
places.
Ref.: https://www.altexsoft.com/blog/acceptance-criteria-purposes-formats-and-best-practices/ 7
Writing Acceptance Criteria - Scenario-oriented
Ex.: User story: As a bank card user, I want to be able to request cash from my account at an
ATM so that I will be able to receive the money from my account quickly and in different
places.
Ref.: https://www.altexsoft.com/blog/acceptance-criteria-purposes-formats-and-best-practices/ 8
Writing Acceptance Criteria - Scenario-oriented
Ex.: User story: As a website user, I want to be able to recover the password to my account,
so that I will be able to access my account in case I forgot the password.
Ref.: https://www.altexsoft.com/blog/acceptance-criteria-purposes-formats-and-best-practices/ 9
Writing Acceptance Criteria - Rule-oriented
Ex.: User story: As a traveler, I want to search by city, name, or street, so that I can have
more matching hotel options.
Search interface Acceptance Criteria
•The search field is placed on the top bar
•Search starts once the user clicks “Search”
•The field contains a placeholder with a grey-colored text: “Where are you going?”
•The placeholder disappears once the user starts typing
•Search is performed if a user types in a city, hotel name, street, or all combined
•Search is in English, French, German, and Ukrainian
•The user can’t type more than 200 symbols
•The search doesn’t support special symbols (characters). If the user has typed a
special symbol, show the warning message: “Search input cannot contain special
symbols.”
Ref.: https://www.altexsoft.com/blog/acceptance-criteria-purposes-formats-and-best-practices/ 10
Collaboration-based test techniques
C. Acceptance Test-driven Development (ATDD)
ATDD is a testing approach:
• Test cases are created by e.g., customers, developers, and testers prior to
implementing (system development) the user story
• The user story and its acceptance criteria are analyzed, discussed, and written by
the team members including testers (through a workshop); which also include
identifying incompleteness, ambiguities, or defects in the user story to be fixed
and avoided in the test cases.
• Then, testers create the test cases (based on the acceptance criteria ) and apply
any test techniques, test cases are considered examples on how to develop the
system which will implement the user story (tests before development).
• These examples help the team implement the user story (development) correctly
Ref.: https://www.altexsoft.com/blog/acceptance-criteria-purposes-formats-and-best-practices/ 11
Collaboration-based test techniques
C. Acceptance Test-driven Development (ATDD)
• User stories are then revised efficiently avoiding defects
• Run positive test cases: confirming the correct behavior without exceptions or
error occurrence (as everything goes as expected), -- called happy paths
• Run negative testing: testing the system with incorrect input values and incorrect
actions to ensure the system will handle such errors
• In addition, test non-functional requirements
• Tests should be expressed in terms that stakeholders can understand
Ref.: https://www.altexsoft.com/blog/acceptance-criteria-purposes-formats-and-best-practices/ 12