allure-codeceptjs
TypeScript icon, indicating that this package has built-in type declarations

2.15.1 • Public • Published

allure-codeceptjs

Allure framework integration for CodeceptJS

Allure Report logo


Installation

npm i -D allure-codeceptjs

Usage

Add the allure plugin inside you plugins section of your CodeceptJS config file. For instance the config file is codecept.config.(js|ts) then:

  plugins: {
  ...
    allure: {
      enabled: true,
      require: "allure-codeceptjs",
    },
  ...
  }
};

Metadata usage

Right now you can access allure API through codeceptjs container.

Feature("login-feature");
Scenario("login-scenario1", async () => {
  const allure = codeceptjs.container.plugins("allure");

  allure.label("name", "value");
  allure.tag("tag1");
  allure.tags("tag2", "tag3");
  allure.issue("issueName", "google.com");
  allure.owner("eroshenkoam");
  allure.layer("UI");
  allure.id("228");
  allure.description("aga");
  allure.story("aga");
  allure.feature("aga");
  allure.epic("aga");
  allure.epic("severity");
  allure.addAttachment("data.txt", "some data", "text/plain");
});

You can also use tags to manage labels on scenarios.

Id

Feature("login-feature");
Scenario("login-scenario1", async () => {
  // your test
}).tag("@allure.id:228");

Label

Feature("login-feature");
Scenario("login-scenario1", async () => {
  // your test
}).tag("@allure.label.{{labelName}}:{{labelValue}}");

Story

Feature("login-feature");
Scenario("login-scenario1", async () => {
  // your test
}).tag("@allure.label.story:storyName");

Suite

Feature("login-feature");
Scenario("login-scenario1", async () => {
  // your test
}).tag("@allure.label.suite:suiteName");

Owner

Feature("login-feature");
Scenario("login-scenario1", async () => {
  // your test
}).tag("@allure.label.owner:ownerName");

Tag

Feature("login-feature");
Scenario("login-scenario1", async () => {
  // your test
}).tag("@allure.label.tag:tagName");

or keep it simple:

Feature("login-feature");
Scenario("login-scenario1", async () => {
  // your test
}).tag("tagName");

Readme

Keywords

Package Sidebar

Install

npm i allure-codeceptjs

Weekly Downloads

4,810

Version

2.15.1

License

Apache-2.0

Unpacked Size

37.4 kB

Total Files

11

Last publish

Collaborators

  • qameta-bot