agent-js-cypress icon indicating copy to clipboard operation
agent-js-cypress copied to clipboard

Allow setting description and attributes for suites

Open thomaswinkler opened this issue 2 years ago • 0 comments

Allow setting description and attributes for suites in the before() hook of a suite. This will enable users to improve test suite representation in Report Portal.

describe("suite", function () {
  before(() => {
    cy.setTestDescription("This suite does ...");
    cy.addTestAttributes([{ key: "attribute", value: "value" }]);
  });

  context("a sub suite", () => {
    before(() => {
      cy.setTestDescription("This is a suite inside a suite...");
      cy.addTestAttributes([{ key: "attribute", value: "value" }]);
    });

    it("test case", function () {
      cy.setTestDescription("This is a test case...");
      cy.addTestAttributes([{ key: "attribute", value: "value" }]);
    });
  });
});

thomaswinkler avatar Jan 15 '23 16:01 thomaswinkler