Skip to content
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

"mergeFeaturesWithRetest" functionality is not working as expected. #184

Open
AnjanaKulasinghe opened this issue Sep 28, 2020 · 4 comments

Comments

@AnjanaKulasinghe
Copy link

AnjanaKulasinghe commented Sep 28, 2020

I have an Automation FW with following setup.

Java: 11
Cucumber: 6.6.0
TestNG: 7.1.0
Cucumber Maven Reporting: 5.3.0

I use Cucumber ReRun with a file mechanism and by the end of the execution I have two json files (If there are any retry tests)
cucumber.json
cucumber-retry.json
(Files attached)
Archive.zip

Here's my CucumberReporting plugin

        <plugin>
            <artifactId>maven-cucumber-reporting</artifactId>
            <executions>
                <execution>
                    <configuration>
                        <classifications>
                            <Environment>${run.env}</Environment>
                            <ExcludedTags>${exclude.tag}</ExcludedTags>
                            <IncludedTags>${include.tag}</IncludedTags>
                            <Platform>${platform}</Platform>
                        </classifications>
                        <inputDirectory>${project.build.directory}</inputDirectory>
                        <jsonFiles>
                            <param>*.json</param>
                        </jsonFiles>
                        <outputDirectory>${project.build.directory}/cucumberReport</outputDirectory>
                        <projectName>${project.name}</projectName>
                        <mergeFeaturesWithRetest>true</mergeFeaturesWithRetest>
                        <mergeFeaturesById>true</mergeFeaturesById>
                        <checkBuildResult>false</checkBuildResult>
                        <skipEmptyJSONFiles>true</skipEmptyJSONFiles>
                    </configuration>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <id>report-generation</id>
                    <phase>package</phase>
                </execution>
            </executions>
            <groupId>net.masterthought</groupId>
            <version>${cucumber.reporting.version}</version>
        </plugin>

Expected:
Based on the comments, if there's a test with same ID in different json files; report should display only the latest execution with these configs are true.

<mergeFeaturesWithRetest>true</mergeFeaturesWithRetest>
<mergeFeaturesById>true</mergeFeaturesById>

Actual:
Generated report still shows the retry attempts.

@konarx
Copy link

konarx commented May 26, 2021

any progress with this? I'm facing the same issue.

@damianszczepanik
Copy link
Owner

No progress so far.
Have you tried to use https://github.com/damianszczepanik/cucumber-reporting/blob/master/src/test/java/LiveDemoTest.java to verify whether this is maven problem or core library it self?

@tarasmytlovych
Copy link

@AnjanaKulasinghe @konarx

I had the same issue.
I have managed to resolve it by removing mergeFeaturesById and leaving just mergeFeaturesWithRetest.

This removed the duplicated scenarios from the report, but the Jenkins pipeline is still marked as failed even though all tests pass after rerun

@JithinPillai1592
Copy link

JithinPillai1592 commented Jun 26, 2024

I think this is similar to:
#914 and #940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants