-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Enable possibility to generate cucumber.json with dynamic prefix #1055
Comments
Hi @elena-altuhova. I'm not opposed to the idea, but can you ellaborate a bit more on the "some cases" in which this would be "really useful"? |
So our current case, which basically was the reason of this suggestion, is that with an attempt to upgrade to latest Cypress version (from 10 to 12+) we switched from cy2 to cypress-cloud for parallel runs. |
I'm not so sure that this requires any change from the library side. You can configure a dynamic output path during runtime, like shown below. const { defineConfig } = require("cypress");
const { cloudPlugin } = require("cypress-cloud/plugin");
module.exports = defineConfig({
e2e: {
async setupNodeEvents(cypressOn, config) {
const on = require("cypress-on-fix")(cypressOn);
if (config.projectId) {
config.env["jsonOutput"] = `cucumber-report-${new Date().getTime()}.json`;
}
await addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
);
return cloudPlugin(on, config);
},
},
}); |
Just tried it and it works! Thanks a lot for your help! 🥇 |
Current behavior
Currently it's possible to set desired alternative static cucumber.json name/path with json.output property
Desired behavior
Hello @badeball! What do you think about possibility to parametrize json.output property a little bit more? It would be really useful to have a possibility to set 'unique' (ex. timestamp or feature name) name for this json to avoid overwriting test results in some cases
Checklist
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).The text was updated successfully, but these errors were encountered: