Repository navigation
Cucumber Testing
Pablo edited this page Apr 16, 2018
·
17 revisions
There are several ways to run scenarios with Cucumber-JVM:
- JUnit Runner
- CLI Runner
- Android Runner
- Third party runners
The JUnit runner uses the JUnit framework to run Cucumber. All you need is a single empty class with an annotation:
- @RunWith(Cucumber.class)
And that's what we will use.
Find all the information here.
To operate and test with cucumber you will need to create files with extension .feature Additionally, you need java classes that address those files and detail how to test them.
For that, it will be of use to install a special editor that you can find searching "Cucumber" in the Eclipse Marketplace.
as operator
I want to close incidences
so that incidents can be closed
Scenario: An operator modifies the first of his assigned incidences
Given operator with email
And the first of his assigned incidences
When he closes the incidence
Then the incidence is closed
as operator
I want to cancel incidences
so that incidents can be cancelled to stop working with them
Scenario: An operator modifies the first of his assigned incidences
Given operator with email
And the first of his assigned incidences
When he cancels the incidence
Then the incidence is cancelled
as operator
I want to log into the system
so that I can view the dashboard page
Scenario: Login is ok
Given I am a correct operator
When I login with a user
When I login with a password
Then I should see the dashboard page
as operator
I want to open incidences
so that incidents can be opened and work with them
Scenario: An operator modifies the first of his assigned incidences
Given operator with email
And the first of his assigned incidences
When he opens the incidence
Then the incidence is opened
as operator
I want to set incidences to in progress
so that incidents can be set to the in progress status
Scenario: An operator modifies the first of his assigned incidences
Given operator with email
And the first of his assigned incidences
When he in process the incidence
Then the incidence is in processed
as operator
I want to see my incidences
so that I can check them
Scenario: Operator sees his incidences
Given an operator
And is logged in
When he clicks his incidences
Then they are shown to him
as operator
I want to see graphs
so that I can get more of a graphical view
Scenario: Operator sees the graphs
Given an operator
And it is logged in
When he clicks on the graphs
Then the graphs are shown to him
as operator
I want to log in but i miss my username
so that it doesn't let me in
Scenario: Operator can't log in because of username
Given operator
And he wants to log in
When if he doesn't set the username correct
Then he doesn't log in
as operator
I want to log in but i miss my pass
so that it doesn't let me in
Scenario: Operator can't log in because of password
Given operator
And he wants to log in
When if he doesn't set the password correct
Then he doesn't log in
as operator
I want to see my incidences when i don't have any
so that I can make sure I don't have any
Scenario: The operator has no incidences when he tries to see them
Given operator
And he is logged in
And he has no incidences
When he tries to see his incidences
Then no incidences are shown
as operator
I want to edit incidences
so that I can manage them
Scenario: Operator wants to edit hsi incidences
Given operator
And he is logged in
When he edits his incidence
Then the incidence is saved and updated