GithubHelp home page GithubHelp logo

spacialcircumstances / gradle-cucumber-reporting Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 10.0 315 KB

A gradle plugin to generate pretty HTML reports for Cucumber from json report files.

License: GNU Lesser General Public License v2.1

Groovy 100.00%
cucumber cucumber-jvm gradle-plugin reports testing

gradle-cucumber-reporting's People

Contributors

enov avatar ervuks avatar ipastusi avatar nvobilisetti avatar spacialcircumstances avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gradle-cucumber-reporting's Issues

document the jdk versions used per plugin version

My project is using JDK 11. When trying to use

plugins {
    id "com.github.spacialcircumstances.gradle-cucumber-reporting" version "0.1.16"
}

I get an error :

What went wrong:
java.lang.UnsupportedClassVersionError: com/github/spacialcircumstances/gradle/ReportsPlugin has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 55.0
com/github/spacialcircumstances/gradle/ReportsPlugin has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 55.0

I know I could upgrade on my side to JDK 12, but I can't for now because of company policy.

I looked at the commits quickly, but couldn't find the version from which you started to use JDK 12 to compile and publish the plugin.

Could you add a section in readme indicating from which verison onward of the plugin JDK 12 needs to be used ? This way I could use the version just before for now.

Thanks !

Consolidate all reports into one location

Hi,

How would I consolidate all reports generated by Cucumber in separate subprojects in a multi-project into one single report?

I have a multi-project with three of the subprojects containing Cucumber features and reports, but they are all in a directory of the subproject. I would like to have a single report available with all reports of the subprojects consolidated.
Thanks.

Skipped scenarios are marked as failed

Background - It's possible to have scenarios which should be run against one configuration, and another - for opposite one. In such case runner should skip those scenarios which shouldn't be run against current config.

Underlying project https://github.com/damianszczepanik/cucumber-reporting provides such capability by passing additional config line:
configuration.setNotFailingStatuses(Collections.singleton(Status.SKIPPED));

Знімок екрана  о 15 53 47

Thanks in advance

output json file to use in jenkins reporting

Use case:
Different cucumber runner files generate report at different locations.
The plugin generates one html report if we provide path to individual .json files

How can I get the output json file which will have combined details? so that the same json file can be used to generate reports using the cucumber-report plugin in jenkins (which takes input as json file)

Getting Error while trying to run plugin with AWS Codebuild job

Issue Description: The plugin works fine when I run the generateCucumberReports task on my local but when the same task is run during AWS Codebuild job then it fails with following error.

Root project name is already set in settings.gradle file
rootProject.name='someprojectname'

FAILURE: Build failed with an exception.

  • Where:
    Build file '/codebuild/output/someprojectname/build.gradle' line: 2

  • What went wrong:
    An exception occurred applying plugin request [id: 'com.github.spacialcircumstances.gradle-cucumber-reporting', version: '0.0.11']

Failed to apply plugin [id 'com.github.spacialcircumstances.gradle-cucumber-reporting']
Could not find property 'displayName' on root project 'someprojectname'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

How to skip some Gradle task to avoid the report generation failed?

Hi,
I would like to know, in my Gradle Cucumber project, surely includes some test tasks for trigger the Cucumber test cases, and these tasks are surely will be generated the cucumber report by the gradle-cucumber-reporting plugin automatically as I configured testTasksFinalizedByReport as true.

But some tasks such checkstyle it is not the cucumber testing task, for example I run this task by command gradle check, and finally also will trigger the cucumber report generation but failed with no cucumber.json file found in the target directory.

So my question is how I can set the cucumber-reporting plugin to skip some testing task to generate the report after the task completed by some straight forward method?
as I don't want to disabled this configuration testTasksFinalizedByReport and then configure every cucumber testing task that add doLast() that to generate the cucumber report.

Thanks.

All test suites are finalizedBy your reporting task

Hi,
I'm in a situation where I have a unit test suite, and separate Cucumber test suite. Unfortunately, by including your plugin, if I want to just run the unit tests, then it will fail as you do a finalizedBy generate cucumber report task.
As far as I can tell there is no way to clear a finalizedBy after it's been set. Might be wrong there.
Julian

Why my Screenshot attach on hooks ?

Hi,

i have different example report screenshot attach
currently i got report like this:
Screen Shot 2019-10-25 at 15 04 35

but my expectation like this:
Screen Shot 2019-10-25 at 15 05 03

Current After Hook Code

import io.cucumber.core.api.Scenario;

@After
public void after(Scenario scenario) {
      if (scenario.isFailed()) {
        scenario.embed(((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES), "image/png");
        scenario.write("Scenario Fail");
      }
}

Anyone can explain about this ?
Thanks :)

damianszczepanik/cucumber-reporting change Configuration class

  • What went wrong:
    Execution failed for task ':psd2-tests:generateCucumberReports'.

No signature of method: net.masterthought.cucumber.Configuration.setParallelTesting() is applicable for argument types: (java.lang.Boolean) values: [false]

It is looks like they have removed unused parameter "parallelTesting" at 8th of October.

Failed to apply plugin

When applying the plugin in the build.gradle file, the build returns the following error:
An exception occurred applying plugin request [id: 'com.github.spacialcircumstances.gradle-cucumber-reporting', version: '0.1.2']

Failed to apply plugin [id 'com.github.spacialcircumstances.gradle-cucumber-reporting']
Could not get unknown property 'displayName' for root project 'MyTestProject' of type org.gradle.api.Project.

do you know what might be causing this?

Gradle build fail

Hey,
The plugin needs the Cucumber.json file to execute. I want to build my project, in some cases, without running the cucumber tests (to save time), therefore no Cucumber.json will be generated. However, I will still have the Plugin and Configuration in my build.gradle file, and so when doing "gradle build" in the terminal the generateCucumberReport plugin will execute and fail my build. Is there a way for the plugin to not execute when it does not detect the Cucumber.json and just skip its execution (optional config?)?
Thank you.

Gradle build fails when plugin is added

Hi,
When I follow instructions in readme and add the plugin, my build command fails with
No report files found, aborting...
My cucumberTest task gets executed later and I would like to tie this with cucumberTest task. Any way to bypass the plugin during build task?
Thanks,
Nikhil

Option to specify the report name

Would it be possible to expose an option to specify the report name in the config?

I'm seeing "root project 'myapp'" and I dunno where it has got the 'root project' aspect from?

The only reference to the project name I have is in settings.gradle

rootProject.name = 'myapp'

Publish new version to Gradle plugin portal

I saw this plugin was recently submitted to plugins.gradle.org, and I must admit I've made a grave mistake and rejected it when I meant to accept it.

I'm sorry about that. Could I request you please re-submit it whenever you have a chance?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.