jenkinsci / cucumber-reports-plugin

Jenkins plugin to generate cucumber-jvm reports
https://plugins.jenkins.io/cucumber-reports/
GNU Lesser General Public License v2.1
205 stars 233 forks source link

Cucumber Report Status is Passed when no tests are executed #93

Closed violetastegaru closed 7 years ago

violetastegaru commented 7 years ago

I am getting this weird issue when an error in the automation framework prevents the scenarios to be executed. Cucumber report's status is shown as Passed when no test is executed. Please check the attached screenshoot. Is there a way to configure Cucumber-JVM to get failures when this happen. Also the Jenkins build passes.

image

Jenkins plugin version is 3.1.0

damianszczepanik commented 7 years ago

Interesting case that is not supported correctly. Can you attach json report so I can fix it forever?

violetastegaru commented 7 years ago

target.zip I have attached the cucumber reports which are generated. Thank you!

damianszczepanik commented 7 years ago

Will be helpful. Can you also tell me what is the reason that you have features without steps and scenarios?

violetastegaru commented 7 years ago

We have a crash for a spring bean before we start the scenarios, before the General Hooks. The logs are showing 0 Scenarios 0 Steps 0m0.000s

Ex:

Results :

Tests in error: Examples: .Examples: Run 1: Error creating bean with name 'entityManagerFactoryPrimary' defined in com.unibet.test.helper.gordium.config.database.GordiumPrimaryDBRepositoryConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.persistence.EntityManagerFactory]: Factory method 'entityManagerFactoryPrimary' threw exception; nested exception is org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile Run 2: Error creating bean with name 'entityManagerFactoryPrimary' defined in com.unibet.test.helper.gordium.config.database.GordiumPrimaryDBRepositoryConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.persistence.EntityManagerFactory]: Factory method 'entityManagerFactoryPrimary' threw exception; nested exception is org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile Run 3: Error creating bean with name 'entityManagerFactoryPrimary' defined in com.unibet.test.helper.gordium.config.database.GordiumPrimaryDBRepositoryConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.persistence.EntityManagerFactory]: Factory method 'entityManagerFactoryPrimary' threw exception; nested exception is org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile Run 4: Error creating bean with name 'entityManagerFactoryPrimary' defined in com.unibet.test.helper.gordium.config.database.GordiumPrimaryDBRepositoryConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.persistence.EntityManagerFactory]: Factory method 'entityManagerFactoryPrimary' threw exception; nested exception is org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

[ERROR] There are test failures.

damianszczepanik commented 7 years ago

So this is not typical case but rather consequences of other problems?. Anyway failure of the build does not cause features to have zero scenarios and steps.

violetastegaru commented 7 years ago

Hi Damian, yes it is a consequence..but if it happens to have Cucumber Report as passed, this passes the build.

damianszczepanik commented 7 years ago

Status of the build is based of steps that are no passing. As i see there is no step which was not passing so the report status is correct. The only thing which should be fixed is division by zero

damianszczepanik commented 7 years ago

Stats are displayed correctly but rules for the passing of failing didn't change. Check the most recent build.