Writing Test Cases
Creating Functional Test Cases for Software Features
This prompt helps engineering teams write detailed functional test cases for verifying the correctness of software features. It focuses on outlining test objectives, inputs, expected outcomes, and step-by-step procedures to ensure comprehensive feature validation.
Responsible:
Engineering/IT
Accountable, Informed or Consulted:
Engineering, QA
THE PREP
Creating effective prompts involves tailoring them with detailed, relevant information and uploading documents that provide the best context. Prompts act as a framework to guide the response, but specificity and customization ensure the most accurate and helpful results. Use these prep tips to get the most out of this prompt:
Gather detailed feature specifications and related user stories or requirements.
Identify all possible inputs, edge cases, and error conditions for the feature.
Define the testing environment and tools to execute the test cases.
THE PROMPT
Help create detailed functional test cases for the feature [specific feature, e.g., user login functionality] in [specific software application]. Focus on:
Test Objectives: Recommending goals, such as, ‘Clearly state what the test aims to verify, including functional correctness, input validation, and error handling.’
Input Data and Preconditions: Suggesting input scenarios, like, ‘Define valid and invalid data sets, including edge cases, and outline preconditions for executing the test.’
Test Steps: Including step-by-step instructions, such as, ‘Provide detailed steps to execute the test, including navigating the interface, entering data, and triggering the functionality.’
Expected Results: Proposing outcome definitions, such as, ‘Specify the expected behavior for each test case, including system responses, error messages, or state changes.’
Post-Test Actions: Recommending follow-ups, such as, ‘Define cleanup actions, like logging out or resetting data, to maintain system integrity after testing.’
Provide a set of structured functional test cases that ensure comprehensive coverage of the feature and alignment with software requirements. If additional details about feature specifications or user stories are needed, ask clarifying questions to refine the test cases.
Bonus Add-On Prompts
Propose strategies for automating functional test cases using tools like Selenium or Cypress.
Suggest methods for writing test cases that validate integration between related features.
Highlight techniques for prioritizing test cases based on feature complexity and criticality.
Use AI responsibly by verifying its outputs, as it may occasionally generate inaccurate or incomplete information. Treat AI as a tool to support your decision-making, ensuring human oversight and professional judgment for critical or sensitive use cases.
SUGGESTIONS TO IMPROVE
Focus on writing test cases for non-functional requirements, such as performance or security.
Include tips for creating reusable test case templates for similar features.
Propose ways to incorporate cross-browser or cross-device testing into test cases.
Highlight tools like TestRail or JIRA for managing and tracking test cases.
Add suggestions for writing test cases that include accessibility validation.
WHEN TO USE
When developing or releasing new features that require thorough functional validation.
During sprint testing to ensure all acceptance criteria are met.
To establish a test case repository for ongoing quality assurance efforts.
WHEN NOT TO USE
For exploratory testing where pre-defined steps are unnecessary.
If feature specifications or requirements are incomplete or unavailable.