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

Ensure default labels consistency across all packages #1069

Closed
delatrie opened this issue Jul 23, 2024 · 1 comment · Fixed by #1105
Closed

Ensure default labels consistency across all packages #1069

delatrie opened this issue Jul 23, 2024 · 1 comment · Fixed by #1105
Labels
Milestone

Comments

@delatrie
Copy link
Collaborator

delatrie commented Jul 23, 2024

Context

The following labels should be added to all test results automatically by all integrations:

  • language: the value should be javascript.
  • framework: the value should be the name of the test framework.
  • package: the value should be a dot-separated path to the test file.
  • host: the name of the host that runs the test. Overwritable via the ALLURE_HOST_NAME environment variable. It's used to visualize the tests on the timeline.
  • thread: an identifier of a thread or a worker process that executes the test. Overwritable via the ALLURE_THREAD_NAME environment variable. It's used to visualize the tests on the timeline.

Default suite and BDD labels are subject to issue #1068.

The current implementation state

Package language framework package host thread
allure-codeceptjs 🔲 🔲 🔲
allure-cucumberjs 🔲
allure-cypress 🔲 🔲 🔲
allure-jasmine 🔲 🔲 🔲 🔲 🔲
allure-jest ⚠️
allure-mocha
allure-playwright ⚠️
allure-vitest
newman-reporter-allure 🔲 ⚠️ 🔲

The legend:

  • ✅ - the label is implemented; the implementation is consistent.
  • ⚠️ - the label is implemented, but the implementation differs from other packages.
  • 🔲 - the implementation is missing.

The inconsistencies:

  1. ⚠️ allure-jest:
    • package': a value is deduced from the path to the test file's directory, not to the test file itself.
  2. ⚠️ allure-playwright:
    • language: the casing of the value (JavaScript) doesn't match the corresponding values by other packages in this repo (javascript).
  3. ⚠️ newman-reporter-allure:
    • host: a value is always localhost.

Additional info

Helper functions to create some default labels:

import { getHostLabel, getThreadLabel } from "allure-js-commons/sdk/reporter";
import { getEnvironmentLabels } from "allure-js-commons/sdk/reporter";
@delatrie delatrie added this to the 3.0 milestone Jul 26, 2024
@delatrie
Copy link
Collaborator Author

The issue with missing package labels in allure-cucumberjs is also reported here: #736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant