badeball / cypress-cucumber-preprocessor

Run cucumber/gherkin-syntaxed specs with Cypress
MIT License
1.32k stars 147 forks source link

Bug - Cucumber reports getting overwritten when a new feature file is executed #1212

Closed ShaharM7 closed 2 months ago

ShaharM7 commented 3 months ago

Current behavior

When I am running multi-feature files - using a specific config file of cypress:

import {defineConfig} from 'cypress'
import defu from 'defu';
import defaultConfig from "../../cypress.config";

export default defineConfig(
    defu({
            e2e: {
                specPattern: [
                    'cypress/e2e/letters-tests/a-letter-tests/a*'
                ]
            },
        },
        defaultConfig
    )
);

Then after the running, I see the test results generate a JSON file (because I enabled it before), but I run for example 10 tests but I see only one test result - it shows only the last test that was run and not all the tests that were run.

Desired behavior

See in the JSON file report - all the tests that I run for specific cypress config file

Test code to reproduce

Please try to run an example: npx cypress run -b chrome -C cypress/config/a.config.ts the file: a.config.ts you can see above - all the tests are cucumber tests -->

Versions

Checklist

badeball commented 3 months ago

[..] but I run for example 10 tests but I see only one test result

When you say "run 10 tests" here, do you mean invoking $ cypress run (or similar) 10 times?

badeball commented 3 months ago

In any case, you need to provide a reproducible example.

ShaharM7 commented 3 months ago

@badeball I mean that - O run one time :

npx cypress run

And the test result continues only the result of the last test

badeball commented 3 months ago

Then you need to provide a reproducible example that illustrates the issue.

badeball commented 2 months ago

Closing due to lack of a reproducible example. Feel free to open up another issue if anything changes in this regard.