serenity-bdd / serenity-cucumber-starter

A skeleton project for Serenity BDD and Cucumber JVM
Apache License 2.0
179 stars 286 forks source link

Problem with cucumber and gradle #106

Open bvopro opened 1 year ago

bvopro commented 1 year ago

Impossible to get the report with gradle on the serenity-cucumber-starter, but the project is ok with maven.

➜ /tmp git clone https://github.com/serenity-bdd/serenity-cucumber-starter.git ➜ /tmp cd serenity-cucumber-starter ➜ serenity-cucumber-starter git:(master) mvn clean test

…
[INFO] --- serenity-maven-plugin:3.5.1:aggregate (serenity-reports) @ cucumber-starter ---
[INFO] Test results for 1 tests generated in 901 ms in directory: file:/private/tmp/serenity-cucumber-starter/target/site/serenity/
[INFO] ------------------------------------------------
[INFO] | SERENITY TESTS:               | SUCCESS
[INFO] ------------------------------------------------
[INFO] | Test scenarios executed       | 1
[INFO] | Test cases executed           | 1
[INFO] | Tests passed                  | 1
[INFO] | Tests failed                  | 0
[INFO] | Tests with errors             | 0
[INFO] | Tests compromised             | 0
[INFO] | Tests aborted                 | 0
[INFO] | Tests pending                 | 0
[INFO] | Tests ignored/skipped         | 0
[INFO] ------------------------------- | --------------
[INFO] | Total Duration| 7s 765ms
[INFO] | Fastest test took| 7s 765ms
[INFO] | Slowest test took| 7s 765ms
[INFO] ------------------------------------------------
…

➜ serenity-cucumber-starter git:(master) ./gradlew clean test


FAILURE: Build failed with an exception.

* Where:
Build file '/private/tmp/serenity-cucumber-starter/build.gradle' line: 2

* What went wrong:
Plugin [id: 'net.serenity-bdd.serenity-gradle-plugin', version: '3.5.1'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'net.serenity-bdd.serenity-gradle-plugin:net.serenity-bdd.serenity-gradle-plugin.gradle.plugin:3.5.1')
  Searched in the following repositories:
    Gradle Central Plugin Repository

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

Fix build.gradle with id "net.serenity-bdd.serenity-gradle-plugin" version "3.5.0"

➜ serenity-cucumber-starter git:(master) ./gradlew clean test


> Task :test

Gradle Test Executor 2 STANDARD_ERROR
    SLF4J: No SLF4J providers were found.
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
    SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
    SLF4J: Ignoring binding found at [jar:file:/Users/bvo/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.10/f69d97ef3335c6ab82fc21dfb77ac613f90c1221/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.

> Task :aggregate
Generating Serenity Reports
  - Main report: file:///private/tmp/serenity-cucumber-starter/target/site/serenity/index.html
      - Test Root: null
      - Requirements base directory: null

BUILD SUCCESSFUL in 3s
6 actionable tasks: 5 executed, 1 up-to-date
bvopro commented 1 year ago

I tested different versions for gradle distributionUrl=https://services.gradle.org/distributions/gradle-7.5.1-bin.zip

7.6, 7.5, 7.4, 7.3, 7.2, 7.1, 7.0, 6.9, 6.8, 6.7, 6.6 test executed but without report

ricardomediavilla commented 1 year ago

I just tried

id("net.serenity-bdd.serenity-gradle-plugin") version "3.6.7"

and it builds. Found that info in https://plugins.gradle.org/plugin/net.serenity-bdd.serenity-gradle-plugin

ojrchen09cheno commented 1 year ago

Hi, did you find a fix to this?