-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Behaviour Documentation | Gherkin Style User Stories
Fionna Chan edited this page Dec 16, 2020
·
6 revisions
As our app is growing in size and complexity, it is easy to lose track of how each feature should exactly behave.
In order to reduce regression bugs, and to communicate feature requirement across teams, this is a WIP documentation of user stories written in Gherkin syntax.
The main benefit of using the Gherkin syntax is that we can implement the BDD tests according to the requirements easily.
Scenario: User supplies correct user name and password
Given that I am on the sign-in page
When I enter my user name and password correctly
And click ‘Sign In’
Then I am taken to the dashboard
Scenario: User does NOT supply correct user name and password
Given that I am on the sign-in page
When I enter my user name and password incorrectly
and click ‘Sign In’
Then I see an error message ‘Sorry, incorrect user name or password.’
Given that I am on the experiment page
When I look at the simulation metrics box
Then I should see the list of variable names which is the same as the list of reward variables extracted from my simulation model
Given that I am on the experiment page
When I look at the observations box
Then I should see a list of observations extracted from my model
And the observations with a checked checkbox are the same as the observations I selected for the experiment before running it
Given that I am on the experiment page
When I look at the reward function box
Then I should see the reward function
And I can copy and paste the reward function by highlighting it or clicking the copy button on the top right corner
Feature: As a user I am on the Experiment Page viewing an experiment of [any training status] with at least 1 iteration of data
(impossible to be of [Not Started] / [Starting Cluster] status)
Given the experiment has 1 iteration of data from training
When I click at a variable name
Then I should see one dot is removed from the Metrics chart below "Learning Progress"
And the shape, the color and the tooltip labels of the other lines remained the same
Given the experiment has at least 2 iterations of data from training
When I click at a variable name
Then I should see one line is removed from the Metrics chart below "Learning Progress"
And the shape, the color and the tooltip labels of the other lines remained the same
Given the experiment has 1 iteration of data from training
When I look at the simulation metrics box
Then I should see the values of the simulation metrics
Given the experiment has 1 iteration of data from training
When I look at the simulation metrics box
Then I should see the sparklines of the simulation metrics
And the sparklines should have the same number of iterations as the best policy on the policy chart
Given the experiment has 1 iteration of data from training
When I look at the policy chart
Then the policy chart must have at least one dot in dark blue (the only data point from the best policy)
Given the experiment has at least 2 iterations of data from training
When I look at the policy chart
Then the policy chart must have more than one policy line (semi-transparent)
And there must be one "best policy" line in dark blue (solid color)
Feature: As a user I am on the Experiment Page viewing an experiment of [any training status] with at least 1 iteration of data and switched to another experiment with at least 1 iteration of data via clicking the side nav
Given one or more variable names were deselected on the experiment page
When I switched to another experiment
Then I should see all variable names being selected
And I should see all metric dots (if only 1 iteration of data exist) / lines on the Metrics chart below "Learning Progress"
Feature: As a user I am on the Experiment Page viewing an Experiment which changed from [Starting Cluster] to [Running]
Given the experiment is at [Starting Cluster] status
When the experiment changed to [Running] status
Then the simulation metric values and the header "Value (i)" will change from hidden to shown
Given the experiment is at [Starting Cluster] status
When the experiment changed to [Running] status
Then the sparklines and the header "Overview (i)" will change from hidden to shown
Given the experiment is at [Starting Cluster] status
When the experiment changed to [Running] status
Then the training starting placeholder should become hidden
And the metrics chart should be visible even if it is empty
Given the experiment is at [Starting Cluster] status
When the experiment changed to [Running] status
Then the training starting placeholder should become hidden
And the policy chart should be visible even if it is empty
Given the experiment is at [Running] status
When the simulation metric value gets updated
Then the simulation metric value must not change drastically (e.g. changing from 76 to 71 seems normal, however it should not change from 200 to 20 after 1 new iteration)
And the simulation metric value should not flash (e.g. previously showing 215, after receiving update it became 16, then after a few seconds it became 180)
Given the experiment is at [Running] status
When the sparklines gets updated
Then the sparkline must not change its shape completely (i.e. as long as the best policy is the same, the data points for previous iterations should not change)
Given the experiment is at [Running] status
When the metrics chart gets updated
Then the metrics chart lines must be updated without losing the data points shown previously before the update
And the metrics chart should have the same number of iterations as the best policy on the policy chart and any of the sparkline charts
Given the experiment is at [Running] status
When the policy chart gets updated
Then the policy chart lines must be updated without losing the data points shown previously before the update
Feature: As a user I am on the Experiment Page viewing a [Running] Experiment and I clicked "Stop Training"
Given the experiment is at [Running] status
When I click "Stop Training"
Then the "Stop Training" button should disappear
Given the experiment is at [Running] status
When I click "Stop Training"
Then the training status should change from "Running" to "Stopping" or "Stopped"
Given the experiment is at [Running] status
When I click "Stop Training"
Then the training status icon on the navbar should change from "Running" to "Stopped"
Given the experiment is at [Running] status
When I click "Stop Training"
Then the page elements should react in the same way as on the tab where the action was taken
Given the experiment is at [Running] status
When I click "Stop Training"
Then the only change on the other browser tabs would be the navbar icon status
Given the experiment is at [Running] status
When I click "Stop Training"
Then there should be no change
Feature: As a user I am on the Experiment Page viewing an Experiment which changed from [Running] to [Completed]
Given the experiment is at [Starting Cluster] status
When the experiment changed to [Running] status
Then the simulation metric values will have the uncertainty value e.g. 1.02 ± 0.23 where 1.02 is the metric value and ± 0.23 is the uncertainty part
TO BE CONTINUED