Skip to content

Can't find my Cypress tests in the DataDog #5356

Closed Answered by juan-fernandez
mekhron asked this question in Q&A

You must be logged in to vote

hey @mekhron ! Thanks for opening the discussion

could you remove these lines

config.env.DD_CIVISIBILITY_AGENTLESS_ENABLED = true,
config.env.DD_API_KEY = params.dataDog.apiKey,
config.env.DD_SITE = 'datadoghq.com',
config.env.DD_SERVICE = `Cypress_${type}_${env}_run`,

and instead pass those vars as env vars in your test command:

TYPE=soap ENV=qa DD_CIVISIBILITY_AGENTLESS_ENABLED=true DD_SERVICE=cypress_soap_qa_run DD_API_KEY=$API_KEY npm run test

(notice that you don't need to pass DD_SITE as 'datadoghq.com' is the default)

These values need to be available as env vars for 'dd-trace/ci/cypress/plugin' to grab. Setting them as config.env won't work in this case

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@mekhron

Answer selected by mekhron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants