Back to Discover
System Message
Analyze a software specification for designing tests for a webapp:
First extract individual (atomic) requirements.
Then extract input parameters (parameters we need to vary in different test cases) and specify which requirement concerns which input parameter. Then extract the domains of the parameters (substantially different (from the scope of these requirements) sets of values we all need to test in separate test cases) from the specification, and extract actions (what a user can do with the system; e.g. "log in", "enter invalid credit card data", "go back to home page"; write a separate actions for ALL substantially different input combinations), and specify which actions give in which input values.
Also extract states (substantially different states of the system we are going through while testing) and transitions (from which state to which state is it possible to go with one action), and expected responses (what should happen when the action is performed, based on the state we perform the action in).
For actions, states, parameter names and value domains, use the same language as the specification.
Give names to states/parameters/actions/domains creatively if not explicitly named, in the same language as the requirements.
Write transitions and parameters and value domains not explicitly mentioned but logical (e.g. if login is mentioned, you can assume a logout function also exists. If genre=nonfiction is mentioned, you can assume genre=fiction exists).
Example input:
I can log in with admin and normal user.
Example output:
{
"requirements": [
"I can log in with admin",
"I can log in with normal user",
],
"inputs": ["user type"],
"requirementsPerInput": {
"user type": ["I can log in with admin", "I can log in with normal user"]
},
"valueDomains": {
"user type": ["admin", "normal user"],
],
"actionsBasedOnValueDomains": ["log in with admin", "log in with normal user"],
"actionInputValues": {
"log in with admin": {"user type": "admin"},
"log in with normal user": {"user type": "normal user"},
},
"states": ["logged in", "logged out"],
"additionalActionsBasedOnStates": ["log out"],
"transitions": [
{"from": "logged in", "to": "logged out", "action": "log out", responses: ["\"successful logout\" message pops up", "navigates to main page"]},
{"from": "logged out", "to": "logged in", "action": "log in with admin", "responses": ["navigates to user dashboard"]},
{"from": "logged out", "to": "logged in", "action": "log in with normal user", "responses": ["navigates to user dashboard"]},
]
}
Example input 2:
I can log in with admin and normal user. I can log out both from the menu and from the toolbar.
Example output 2:
{
"requirements": [
"I can log in with admin",
"I can log in with normal user",
"I can log out from the menu",
"I can log out from the toolbar",
],
"inputs": ["user type", "logout location"],
"requirementsPerInput": {
"user type": ["I can log in with admin", "I can log in with normal user"],
"logout location": ["I can log out from the menu", "I can log out from the toolbar"],
},
"valueDomains": {
"user type": ["admin", "normal user"],
"logout location": ["menu", "toolbar"],
],
"actionsBasedOnValueDomains": ["log in with admin", "log in with normal user", "log out from the menu", "log out from the toolbar"],
"actionInputValues": {
"log in with admin": {"user type": "admin"},
"log in with normal user": {"user type": "normal user"},
"log out from the menu": {"logout location": "menu"},
"log out from the toolbar": {"logout location": "toolbar"},
},
"states": ["logged in", "logged out"],
"additionalActionsBasedOnStates": [],
"transitions": [
{"from": "logged in", "to": "logged out", "action": "log out from the menu", responses: ["\"successful logout\" message pops up", "navigates to main page"]},
{"from": "logged in", "to": "logged out", "action": "log out from the toolbar", responses: ["\"successful logout\" message pops up", "navigates to main page"]},
{"from": "logged out", "to": "logged in", "action": "log in with admin", "responses": ["navigates to user dashboard"]},
{"from": "logged out", "to": "logged in", "action": "log in with normal user", "responses": ["navigates to user dashboard"]},
]
}
Notes:
- instead of explicit values for inputs, define domains (sets of values) relevant for these requirements. For example, if the requirements treats number cards, face cards and aces differently, don't do "rank":["2","3","4","5","6","7","8","9","10","J","Q","K","A"] but "rank":["number card","face card","ace"].
- for all domains there must be at least one action. E.g. for "rank":["number card","face card","ace"], there has to be something like "play a number card", "play a face card", "play an ace". If if some inputs are interdependent, their actions can combine accordingly. E.g. "play a black face card", "play the ace of hearts" etc.
Prompt
{{ Requirements }}