DataDog / dd-trace-js

JavaScript APM Tracer
https://docs.datadoghq.com/tracing/
Other
647 stars 306 forks source link

Playwright test execution results are not reported to DataDog #2766

Closed AnatoliiHanziuk closed 1 year ago

AnatoliiHanziuk commented 1 year ago

Expected behaviour Test execution results captured after execution tests in GitHub Workflow should be sent to DataDog and visible in CI tests

Actual behaviour Test execution results are invisible in CI tests

Steps to reproduce

  1. Install dd-trace of version 3.13.1: pnpm install -D
  2. Add command to execute Playwright tests to package.json:
    "scripts": {
    "test": "npx playwright test"
    },
  3. Create GH Workflow with following env variables being set:
    DATADOG_SERVICE: my-service
    DATADOG_SITE: datadoghq.eu
    DD_ENV: ci
    DD_CIVISIBILITY_AGENTLESS_ENABLED: true
  4. Execute add execution command for tests as a part of GH Workflow:
    - name: Execute tests
    run: NODE_OPTIONS="-r dd-trace/ci/init" pnpm test

Environment

"devDependencies": {
    "@datadog/datadog-ci": "^2.3.1",
    "dd-trace": "^3.13.1",
    "@playwright/test": "^1.30.0"
}
juan-fernandez commented 1 year ago

hi @AnatoliiHanziuk! Thanks for the report.

I see an issue with your site configuration: it should be DD_SITE: datadoghq.eu. We could probably improve our docs around that. I'll see what I can do.

Additionally, is DD_API_KEY env var being set with the correct datadog API key?

AnatoliiHanziuk commented 1 year ago

Closing the issue. Not an issue - misconfiguration of the env variable name.