Closed huiyangns closed 1 year ago
Hey, and thanks for reporting this issue. You need to provide a minimal, reproducible example issues that illustrates the issue.
It's glaringly obvious from your ticket, that you have not yourself gone through the process of trying to reproduce the issue using the information that you've provided me. Instead, you're just assuming you've provided me with everything that's relevant and you're leaving it up to me to test that assumption. This is a huge waste of my time, as almost everyone fails to provide the relevant information. This is why I'm asking everyone in the contributing guidelines, to provide me with a runable example. If it doesn't run, then you've clearly not tested it.
Hi badeball, what you said makes sense I will provide a runable example asap Thanks for reply
Hi badeball, I may find the cause of this issue
In my cypress.config.js file, I use cypress-cloud to run test in parallel way. This plugin seems to intercept logs which should be printed in cucumber-messages.ndjson file.
When I comment out cloudPlugin(on, config);
, everything is good
.....
const { cloudPlugin } = require("cypress-cloud/plugin");
....
e2e: {
.....
async setupNodeEvents(on, config) {
await preprocessor.addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin.default(config)],
})
);
cloudPlugin(on, config);
return require('./tests/cypress/plugins/index.js')(on, config)
},
},
Current behavior
I built a docker image to run test against our project. when finishing test, I found most logs are missing in cucumber-messages.ndjson. The file only contains two lines. So json and html report cannot be generated correctly
As a comparison, if I run test directly without using docker image, everything is ok
npx cypress run --env TAGS='@test' --headless --browser chrome --e2e
Desired behavior
Expect cucumber-messages.ndjson contains the whole log
Test code to reproduce
Here is the config in package.json
Here is the docker file
RUN chmod 755 /root ENV CYPRESS_CACHE_FOLDER=/root/.cache/Cypress
USER node
docker run --ipc=host --net test_default -v /test:/app -v /app/node_modules -w /app -it --rm cypress:test bash
node@0034608b232a:/app$ DEBUG=cypress:electron,cypress-configuration,cypress-cucumber-preprocessor npx cypress run --env TAGS='@test' --headless --bro wser chrome --e2e libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) [890:0701/054702.987154:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported. cypress-cucumber-preprocessor resolved configuration { cypress-cucumber-preprocessor stepDefinitions: [ 'tests/cypress/integration/common/*/.js' ], cypress-cucumber-preprocessor filterSpecs: true, cypress-cucumber-preprocessor messages: { cypress-cucumber-preprocessor enabled: true, cypress-cucumber-preprocessor output: 'tests/cypress/cucumber-json/cucumber-messages.ndjson' cypress-cucumber-preprocessor }, cypress-cucumber-preprocessor json: { cypress-cucumber-preprocessor args: undefined, cypress-cucumber-preprocessor enabled: true, cypress-cucumber-preprocessor formatter: 'tests/cypress/cucumberJsonFormatter/cucumber-json-formatter', cypress-cucumber-preprocessor output: 'tests/cypress/cucumber-json/report.json' cypress-cucumber-preprocessor }, cypress-cucumber-preprocessor html: { cypress-cucumber-preprocessor enabled: true, cypress-cucumber-preprocessor output: 'tests/cypress/cucumber-json/cucumber-report.html' cypress-cucumber-preprocessor } cypress-cucumber-preprocessor } +0ms