-
Notifications
You must be signed in to change notification settings - Fork 320
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
[BUG]: Cypress integration does not work with the --specs option #5237
Comments
hey @fcano-ut ! Thanks for the report. Can you confirm that you followed instructions in https://docs.datadoghq.com/tests/setup/javascript/?tab=cypress#cypress-version-10-or-later? There are at least two files you need to modify:
const { defineConfig } = require('cypress')
module.exports = defineConfig({
e2e: {
setupNodeEvents: require('dd-trace/ci/cypress/plugin'), // this is the DD bit
supportFile: 'cypress/support/e2e.js'
},
// .. config continues here
}) Additionally you need to add this line to your require('dd-trace/ci/cypress/support')
// Also supported:
// import 'dd-trace/ci/cypress/support'
// Your code can be after this line
// Cypress.Commands.add('login', (email, pw) => {}) From your comment it seems the |
I'm sorry @juan-fernandez , I got confused when copying the examples, but definitely this change is made in the support file:
As a side-note, we might not be blocked by this bug. I'm not sure yet. We have a Knapsack Pro subscription and I'll try to parallelize tests using the Cypress integration, which might end up fixing our problem 🤔 |
Temporarily all I can say is that using Knapsack Pro, I can bypass this issue. However I still have the same problem where the "tests" tab is empty, only filtering by "suite" shows the list of tests. The Fail or Success status of "suites" is not being reported. I think it's an entirely different problem. I'm having this issue:
My guess is that the I think this might be a different issue, but probably the original issue is also still valid. It's not blocking us anymore. Sorry I'm mixing two issues into one. I guess what I'm trying to say is that likely these are actually separate issues:
|
hey @fcano-ut, thanks for the extra context. The git error you're seeing is unlikely to lead into errors in the reporting of test data.
this shouldn't lead to test data missing either. For the next step I'd ask you to run the suite with Is it possible for you to create a small reproducible case in a public repository? |
Sorry about the late reply. I do see some useful logs with A reproduction step of the repo would only work with a Knapsack Pro key, it's not so easy right now to create one, I would have to go through company bureaucracy to even get access to a key. There's also suddenly a lot of other priorities for me to be working on right now so I might have to let this one hang for a while... If I reach through support I guess it would be faster since I would be able to share the debug logs with them. I'm assuming the only data that would leak are the test assertions themselves, that they could keep confidential. I didn't see any tokens in the output... 🤔 |
yeah going through support might be the best course of action here. No tokens in the output indeed, just test data |
Tracer Version(s)
5.35.0
Node.js Version(s)
20.18
Bug Report
We do test parallelization, running tests with code like this:
$TESTS
is an array with a series of comma-separated files to run on each matrix task.After configuring the Cypress integration, we don't seem to get report on individual tests. instead everything is grouped into "suites"
The suite's name is that of the first test ran for the given job, so data is arbitrarily grouped into "suites" whose name only represent the first test ran.
Also I'd expect the "tests" tab to be populated, but it's not.
Feels like the plugin is only working "partially" and not doing everything it should be doing 🤔
Reproduction Code
No response
Error Logs
I've tried running with
DD_TRACE_DEBUG: true
andDD_TRACE_LOG_LEVEL: error
, which adds some warnings:Tracer Config
All DD imports were added at the beginning of the files
These variables were added to the github action that runs tests
Operating System
GitHub Runner (Ubuntu)
Bundling
Unsure
The text was updated successfully, but these errors were encountered: