Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
@REQ_CALC-7905 Feature: As a user, I can login the application #As a user, I can login the application @TEST_CALC-7903 Scenario Outline: Login With Invalid Credentials Should Fail Given browser is opened to login page When user "<username>" logs in with password "<password>" Then error page should be open Examples: | username | password | | invalid | mode | | demo | invalid | | invalid | invalid | | demo | mode | @TEST_CALC-7902 Scenario: Invalid Login Given browser is opened to login page When user "dummy" logs in with password "password" Then error page should be open @TEST_CALC-7901 Scenario: Valid Login Given browser is opened to login page When user "demo" logs in with password "mode" Then welcome page should be open |
Code Block | ||||
---|---|---|---|---|
| ||||
@REQ_CALC-7906 Feature: As a user, I can logout the application #As a user, I can logout the application @TEST_CALC-7904 Scenario: Valid Logout Given user is on the welcome page When user chooses to logout Then login page should be open |
...
Results are reflected on the covered item (e.g. Story). On its issue screen, coverage now shows that the item is OK based on the latest testing results, that can also be tracked within the Test Coverage panel bellow.
Using Git or other VCS as master
You can edit your .feature files using your IDE outside of Jira (eventually storing them in your VCS using Git, for example) alongside with remaining test code.
In any case, you'll need to synchronize your .feature files to Jira so that you can have visibility of them and report results against them.
Usually, you would start by having a Story, or similar (e.g. "requirement"), to describe the behavior of a certain feature and use that to drive your testing.
Having those to guide testing, we could then move to Cypress to describe and implement the Cucumber test scenarios.
In Cypress, tests related code is stored inside the cypress/integration
directory, which itself contains several other directories. In this case, we've organized them as follows:
...
- use the UI
- use the REST API (more info here)
Code Block language bash #!/bin/bash rm -f features/*.feature curl -u admin:admin "http://jiraserver.example.com/rest/raven/1.0/export/test?keys=CALC-7905;CALC-7906&fz=true" -o features.zip unzip -o features.zip -d features
- use one of the available CI/CD plugins (e.g. see an example of Integration with Jenkins)
We For CI only purpose, we will export the features to a new temporary directory named features/
on the root folder of your Cypress project (we'll need to tell Cypress to use this folder). Please note that while implementing the tests, .feature files should be edited inside the cypress/integration/login folder, in this case;
After being exported, the created .feature(s) will contain references to the Test issue keys, eventually prefixed (e.g. "TEST_") depending on an Xray global setting, and the covered "requirement" issue key, if that's the case. The naming of these files is detailed in Export Cucumber Features.
...