Skip to content

How to get thread number with parallel execution for Allure report timeline? #1855

Description

@theptyza

What are you trying to achieve?

I'm running tests in parallel with 4 chunks and write reports to Allure.
I want to see tests from each chunk displayed in a separate timeline. If I manually add a "thread" label to each suite or test (in the XML) I can split the test results into multiple timelines.
parallel timelines

What do you get instead?

By default in the Allure report all tests are displayed in one timeline.
single timeline

I can add labels to test cases like

const allure = codeceptjs.container.plugins('allure');

Before(() => 
  allure.addLabel('thread', '...')
)

My question is - how can I get the chunk number in the test?

Details

  • CodeceptJS version: 2.3.0
  • NodeJS Version: 10.16.3
  • Operating System: Windows 10
  • Configuration file:
exports.config = {
  ...
  mocha: {
    reporterOptions: {
      reportDir: "./test/report",
      autoOpen: true,
    }
  },
  plugins: {
    allure: {
      enabled: true,
      outputDir: "./test/.output/allure-results"
    },
    stepByStepReport: {}
  },
  multiple: {
    parallel: {
      chunks: "4"
    }
  },
  bootstrap: false,
  teardown: null,
  hooks: [],
  tests: "./test/tests/ui/dashboard/*.js",
  timeout: 120000,
};

Running tests with

npx codeceptjs run-multiple parallel

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions