Generating Acceptance Tests from User Stories#
Acceptance tests are critical components of the requirements engineering process, designed to verify that the system meets the user’s needs as defined in user stories. These tests are created from user stories to ensure that all functionality is tested from the user’s perspective, providing a clear criteria for what success looks like.
Official Statements from The University of Melbourne
Always make sure you’re following the official University of Melbourne statements and resources relating to AI, academic integrity, and assessment
Official Statements from The University of Melbourne: https://melbourne-cshe.unimelb.edu.au/ai-aai/home/ai-integrity/official-statements-from-the-university-of-melbourne/
Please confirm with your subject coordinators if generative AI tools are permitted in your coursework and understand the guidelines for their use.
The Importance of Acceptance Tests#
Acceptance tests offer several key benefits:
Quality Assurance: They help ensure the system performs as expected, meeting the user’s requirements.
User-Centric Design: By focusing on user needs, they ensure the system is built for its intended audience.
Efficient Feedback Loop: Early testing based on acceptance criteria allows for quick adjustments and improvements.
Generating Acceptance Tests: A Step-by-Step Guide#
To create acceptance tests from user stories, consider using the following prompt with generative AI:
Based on the user story: [Insert User Story Here],
Generate acceptance tests that include:
- Test Case Title: A descriptive title for the test case.
- Given: The initial context at the beginning of the scenario.
- When: The specific action performed by the user or system.
- Then: The expected outcome or state of the system.
Example: From User Stories to Acceptance Tests#
User Story 1#
As Alex, I want to easily create a professional profile highlighting my teaching philosophy and preferred subjects so that potential employers can understand my unique approach to education.
Generated Acceptance Test#
Scenario: Creating a Professional Profile
Given Alex is on the profile creation page,
When Alex enters their teaching philosophy and preferred subjects and submits the form,
Then the system should save the profile and display a message confirming that the profile has been created successfully.
User Story 2#
As Alex, I want to filter job opportunities by location and accessibility features so that I can find schools that match my needs and values.
Generated Acceptance Test#
Scenario: Filtering Job Opportunities
Given Alex is on the job opportunities page,
When Alex inputs a specific location and selects accessibility