New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to make use of the SerenityBDD - JIRA integration? #189
Comments
Any progress on this feature? Appreciated. |
@jan-molak Please update if you have any progress on that. Many thanks. It will be awesome if Solution support cucumber 1.x version (i.e Serenity-js 1) |
Having recently decided to give serenity-js (v1) a go for one of our angular 4 projects, this is currently a feature in the older selenium framework I am moving the project away from. It would be handy if it were an option for serenity-js v1 too since it was handy to have the Jira refs in the reports for the client. |
I need to look into enabling the JIRA integration properly. In the meantime, remember that Serenity treats Cucumber scenario and feature descriptions as markdown, so you could have JIRA links there: Feature: JIRA Integration
Here's the [JIRA epic](https://jira.my.org/....)
Scenario: Scenario name
Here is [the ticket](https://jira.my.org/....)
Given ...
When ...
Then ...
|
I think I found the root-cause, and have a (very ugly) workaround for it. First I need the cucumber results also as json format "json:target/cucumber.json" in my cucumberOpts: {
tags: ['~@Ignore', '@Regression'],
require: [path.join(__dirname, 'src/step_definitions/**/*-steps.ts')],
format: ["pretty", "json:target/cucumber.json"],
keepAlive: false
} But the cucumber tests generates only an "issues"-node into the json-results: "issues": [
"JIRA-123"
], The Java-Version of cucumber generates also a "additionalIssues"-node into the json-results: "issues": [
"JIRA-123"
],
"additionalIssues": [
"JIRA-123"
], The Java serenity-cli (which is called by the serenity-js) seems only to read the "additionalIssues"-node... Now comes my ugly workaround: package.json scripts/dependencies (simplified): "scripts": {
"e2e": "failsafe e2e:rimraf e2e:test e2e:fix-issues-in-report-results e2e:report",
"e2e:rimraf": "rimraf target/site",
"e2e:test": "ng e2e --project=testbed --webdriver-update=false",
"e2e:fix-issues-in-report-results": "node e2e/fix-issues-in-report-results.js",
"e2e:report": "serenity run"
},
"dependencies": {
"npm-failsafe": "^0.4.1",
"replace": "1.0.0"
} fix-issues-in-report-results.js: var replace = require('replace');
replace({
regex: "\"issues\"",
replacement: "\"additionalIssues\"",
paths: ['target/site'],
recursive: true,
include: '*.json',
silent: false,
quiet: false,
multiline: true,
}); I use a "serenity.properties" to configure the "serenity.issue.tracker.url", but there are many ways to configure that. |
Update: "json:target/cucumber.json" is not needed, the json-files per test will allways be written into cucumberOpts: {
tags: ['~@Ignore', '@Regression'],
require: [path.join(__dirname, 'src/step_definitions/**/*-steps.ts')],
format: ["pretty"],
keepAlive: false
} |
Thanks for taking the time to investigate the root cause, @brabenetz. |
Yes, seems so... (The java version writes the ids into "issues" & "additionalIssues") |
Hi @cmurczek, @cmelion, @san-ouadghiri, @andreasgebauer, @otoniel-isidoro-sofist, @JGONGSQ, @brabenetz, @iranicus, @datentyp and @abhinaba1080! This feature required introducing changes in Serenity BDD Core, Serenity BDD CLI and Serenity/JS projects so it all took a while to implement. Integration with Jira (and other issue trackers, such as Trello) is available as of I also took some time to describe configuring the integration in a bit more depth in Serenity/JS Handbook: Integration - Jira and other issue trackers. By the way, if you have found this feature useful, please consider becoming a Github Sponsor of Serenity/JS and buying us a coffee every once in a while Best, |
FYI, But my first touch with the new feature did not work that well.
The result was a big fat NPE (see serenity-core ticket)! But the error "only" occurs if the Issue ID is a number. It works fine if the Issue ID would have a prefix like "@issue:XYZ-189". But I opened a Ticket in serenity-core anyway: |
Glad you managed to sort it out @brabenetz, thanks for letting me know! |
Is it possible to use the JIRA integration of SerenityBDD with serenity-js? I tried using the configuration as described here (http://serenity-bdd.info/docs/serenity/#_feature_coverage) but no success so far.
I have assigned @issue tags to scenarios In my
.feature
files, but when generating the report serenity won't include the link to (tried specifiying jira.user/password/project/url settings via serenity.properties, as well as --jiraProject and --jiraUrl cli options), nor add pending tests based on jira issues.The text was updated successfully, but these errors were encountered: