allure-js
allure-js copied to clipboard
added support for links to issues and tms for codeceptjs
Context
I want use allure xray plugin, but I must configure link on my test. So, I propose this PR to set up the links to issue and tms.
Issue Link
Setup codeceptjs plugin with:
const { setHeadlessWhen, setCommonPlugins } = require("@codeceptjs/configure");
const path = require("path");
setCommonPlugins();
module.exports.config = {
tests: "./**/*.test.js",
output: path.resolve(__dirname, "./output"),
plugins: {
allure: {
enabled: true,
require: "allure-codeceptjs",
+ issueURlTemplate: "https://example.qameta.io/allure-framework/allure-js/issues/%s",
},
},
};
Feature("login-feature");
Scenario("login-scenario1", async () => {
// your test
}).tag("@allure.issue:MY-ISSUE-82");
TMS Link
Setup codeceptjs plugin with:
const { setHeadlessWhen, setCommonPlugins } = require("@codeceptjs/configure");
const path = require("path");
setCommonPlugins();
module.exports.config = {
tests: "./**/*.test.js",
output: path.resolve(__dirname, "./output"),
plugins: {
allure: {
enabled: true,
require: "allure-codeceptjs",
+ tmsURLTemplate: "https://example.qameta.io/allure-framework/allure-js/tests/%s",
},
},
};
Feature("login-feature");
Scenario("login-scenario1", async () => {
// your test
}).tag("@allure.tms:MY-TEST-CASE-64");
Checklist
- [x] Sign Allure CLA
- [x] Provide unit tests
@vovsemenv is this feature right for you?
Hello @guiyomh! Looking good, but I have thoughts that this feature needs to be handled by the report-generator side of allure. I will add more detailed review later
You mean make a java plugin that does this job?
yep
I think it's a good idea, but I don't know the plugin system very well. I didn't see how to manage the priority between plugins. For example if I convert this feature to an allure2 plugin. It should be executed before the xray plugin, otherwise it doesn't make sense.
@vovsemenv do you know where can I found documentation about this ?
@vovsemenv @guiyomh we'll add tags processing on the generator side for labels. Still, the links should be processed independently at the framework side because links require additional configuration (link patterns), and users may build an aggregated report from different tests, which my require different link patterns per test type.
BTW for allure-cucumberjs we have the following config https://github.com/allure-framework/allure-js/tree/master/packages/allure-cucumberjs
We really need to try harder to align simular features between the frameworks 🤪
If you want, I can do other PR to align other framework on this MR.