Cucumber & Behave JSON report
About Cucumber
Cucumber and Behave are testing frameworks that support Behavior-Driven Development (BDD), enabling users to write tests in plain language using Gherkin syntax. This approach makes tests easy to read and understand for all team members, regardless of their technical background.
Common structure
Since both frameworks are similar in many ways, their report also hold much resemblance in their structures. Both types of report contain basic blocks, namely Feature, Scenario, Given, When, and Then.
To visualize the structure more clearly, let’s take a look at the diagram below.
-20241211-190211.png?inst-v=e3835335-d0be-4f4c-a82c-c62b3d80caa9)
Cucumber & Behave structure diagram
How Agile Test would parse a Cucumber or Behave report
For Cucumber and Behave, users must include the issue key in the report before uploading it to AgileTest. Otherwise, the import will fail.
Since Agile Test doesn’t create new tests in case of importing Gherkin reports, only Test run result and attachments will be parsed and attached to pre-existing tests in your instance.
Supported status tags
Step status | Description |
---|---|
| PASSED → Test case yields the expected result. |
| FAILED → Test case returns the actual result not as expected. |
| BLOCKED → Test case is considered blocked due to a specific reason. |
| SKIPPED → Test case is skipped in the test run. |
| RETEST → Test case should be rerun again. |
| QUERY → The test case requires more details to have the final result. |
| TODO → Test case is not yet run. It’s the default status of every Test case in Agile Test. |
Test result with attachments
Element structure
"embeddings": [
{
"data": "<BASE64_ENCODED_FILE>",
"mime_type": "<mime type>"
}
]
Example
[
{
"elements": [
{
...
"steps": [
{
...
"embeddings": [
{
"data": "SGVsbG8gd29ybGQ=",
"mime_type": "text/plain"
}
]
}
]
}
]
}
]
Should you need any assistance or further AgileTest inquiries, please contact us here!