Skip to content
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

added support for links to issues and tms for codeceptjs #639

Closed
wants to merge 1 commit into from

Conversation

guiyomh
Copy link
Contributor

@guiyomh guiyomh commented Mar 14, 2023

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

@guiyomh guiyomh changed the title feat(codeceptjs): added support for links to issues and tms added support for links to issues and tms for codeceptjs Mar 15, 2023
@guiyomh
Copy link
Contributor Author

guiyomh commented Mar 15, 2023

@vovsemenv is this feature right for you?

@vovsemenv
Copy link
Collaborator

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

@guiyomh
Copy link
Contributor Author

guiyomh commented Mar 15, 2023

You mean make a java plugin that does this job?

@vovsemenv
Copy link
Collaborator

yep

@guiyomh
Copy link
Contributor Author

guiyomh commented Mar 15, 2023

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 ?

Copy link
Member

@baev baev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good! Thanks for the contribution! 🚀

Maybe we should align the configuration with the other integrations? For example, in Allrue Codeception https://github.com/allure-framework/allure-codeception, we added support for different link types.

@baev
Copy link
Member

baev commented Mar 17, 2023

@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.

@baev
Copy link
Member

baev commented Mar 17, 2023

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 🤪

@baev baev added the type:new feature New feature or request label Mar 17, 2023
@guiyomh
Copy link
Contributor Author

guiyomh commented Mar 19, 2023

If you want, I can do other PR to align other framework on this MR.

@baev
Copy link
Member

baev commented May 22, 2024

fixed via #968

@baev baev closed this May 22, 2024
@baev
Copy link
Member

baev commented May 22, 2024

@guiyomh thanks anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:api Javascript API related issue theme:codeceptjs type:new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants