Page History
...
The test (specification) is initialy created in JIRA Jira as a Cucumber Test and afterwards, it is exported using the UI or the REST API.
...
Requirement
- Install Behave
Code
Code Block | ||
---|---|---|
| ||
Feature: Showing off behave (tutorial01) @ABC-119 Scenario: Run a simple test Given we have behave installed When we implement a test Then behave will test it for us! |
Code Block | ||||
---|---|---|---|---|
| ||||
# file:features/steps/step_tutorial01.py # ---------------------------------------------------------------------------- # STEPS: # ---------------------------------------------------------------------------- from behave import given, when, then @given('we have behave installed') def step_impl(context): pass @when('we implement a test') def step_impl(context): assert True is not False @then('behave will test it for us!') def step_impl(context): assert context.failed is False |
After running the tests (see bellow) and generating the Behave JSON report report (e.g., data.json), it can be imported to Xray (either by via the REST API or through "or the Import Execution Results" action within the Test Execution).
No Format |
---|
behave --format=json -o data.json |
The execution details shows displays the result of the Cucumber Scenario.
Info | ||
---|---|---|
| ||
See the available endpoints available for importing Behave's results in Import Execution Results - REST. Testing with Cucumber details the typical workflow for Cucumber-related tests. |
References
...