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

Generation of the Serenity emailable reports #2669

Closed
prashantigs opened this issue Jan 21, 2022 · 8 comments
Closed

Generation of the Serenity emailable reports #2669

prashantigs opened this issue Jan 21, 2022 · 8 comments

Comments

@prashantigs
Copy link

prashantigs commented Jan 21, 2022

Hi there.

Issue: No serenity-summary.html in **\target\site\serenity

Currently i am using
serenityCoreVersion = '3.1.1'
junitVersion = '4.11 '
assertJVersion = '3.21.0'
logbackVersion = '1.2.3'
serenityCucumberVersion = '2.3.2'
Gradle version: 7.3.3

emailable report added in build.gradle

buildscript {
project.ext {
serenityVersion = '2.4.24'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath('net.serenity-bdd:serenity-gradle-plugin:' + serenityVersion)
classpath("net.serenity-bdd:serenity-single-page-report:2.4.24")
}
}

serenity {
reports = ["single-page-html"]
}

After setting the dependency in the build.gradle as instructed in the above documentation, and triggering the aggregate lifecycle, the only .html file I see generated is the usual acceptance report (index.html).

Is the emailable report supposed to be generated alongside the acceptance report, and what should the generated filename be?

@globalworming
Copy link
Collaborator

should be next to the reports index.html called serenity-summary.html

@prashantigs
Copy link
Author

prashantigs commented Jan 22, 2022

I tried multiple times but no luck.. no file name called serenity-summary.html
image

@wakaleo
Copy link
Member

wakaleo commented Jan 22, 2022

You have serenity-core at 3.1.1 and serenity-single-page-report at 2.4.24. Make sure all the Serenity libraries use the same version.

@wakaleo
Copy link
Member

wakaleo commented Jan 22, 2022

To generate the additional reports in Gradle, use the reports goal.

@prashantigs
Copy link
Author

I tried all these but unable solve the problem. Please find my gradle file below

defaultTasks 'clean', 'test', 'aggregate'

apply plugin: 'java'
apply plugin: 'net.serenity-bdd.aggregator'

group 'org.automationserenity'
version '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

buildscript {
project.ext {
serenityVersion = '2.4.34'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath('net.serenity-bdd:serenity-gradle-plugin:' + serenityVersion)
classpath("net.serenity-bdd:serenity-single-page-report:3.1.1")
}

}

serenity {
reports = ["single-page-html"]
}
sourceCompatibility = 1.8
targetCompatibility = 1.8

ext {
slf4jVersion = '1.7.7'
serenityCoreVersion = '3.1.1'
junitVersion = '4.11 '
assertJVersion = '3.21.0'
logbackVersion = '1.2.3'
serenityCucumberVersion = '2.3.2'
}

dependencies {
implementation 'org.junit.jupiter:junit-jupiter:5.7.0'
implementation group: 'io.cucumber', name: 'cucumber-java', version: '6.11.0'
implementation group: 'net.serenity-bdd', name: 'serenity-cucumber6', version: '2.3.2'

testImplementation "net.serenity-bdd:serenity-core:${serenityCoreVersion}",
        "net.serenity-bdd:serenity-junit:${serenityCoreVersion}",
        "net.serenity-bdd:serenity-screenplay:${serenityCoreVersion}",
        //   "net.serenity-bdd:serenity-cucumber6:${serenityCucumberVersion}",

        "junit:junit:${junitVersion}",
        "org.assertj:assertj-core:${assertJVersion}"
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
implementation group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.14'
implementation group: 'org.json', name: 'json', version: '20210307'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.3'
implementation 'com.github.javafaker:javafaker:1.0.2'
implementation group: 'org.apache.poi', name: 'poi', version: '5.0.0'
testImplementation group: 'com.jayway.restassured', name: 'rest-assured', version: '2.9.0'
testImplementation group: 'io.rest-assured', name: 'rest-assured', version: '3.2.0'
implementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '3.0.0'
implementation group: 'org.jboss.aerogear', name: 'aerogear-otp-java', version: '1.0.0'

// implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.0.0-beta-4'
implementation group: 'commons-configuration', name: 'commons-configuration', version: '1.10'
implementation group: 'net.serenity-bdd', name: 'serenity-reports', version: '3.1.1'
// https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.0.0'
// https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple
implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1'
implementation group: 'net.serenity-bdd', name: 'serenity-zalenium', version: '2.3.13'
// https://mvnrepository.com/artifact/io.appium/java-client
implementation group: 'com.applitools', name: 'eyes-selenium-java3', version: '3.208.2'
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.6.0'

}

test {
testLogging.showStandardStreams = true
systemProperties System.getProperties()
}

tasks.withType(Test) {
maxParallelForks = Runtime.runtime.availableProcessors()

filter {

    includeTestsMatching "*TestRunner"
}

}

gradle.startParameter.continueOnFailure = true
test.finalizedBy(aggregate, reports)
apply plugin: 'maven-publish'

dependencies {
implementation 'org.mongodb:mongodb-driver:3.12.10'
implementation group: 'org.mongodb', name: 'mongo-java-driver', version: '3.12.8'

}

@prashantigs
Copy link
Author

Please anyone let me know whats wrong i am doing here.. i tried multiple ways but did not find exact solution

@wakaleo
Copy link
Member

wakaleo commented Feb 13, 2022

You are mixing Serenity versions:

  • serenity-single-page-report:3.1.1
  • implementation group: 'net.serenity-bdd', name: 'serenity-cucumber6', version: '2.3.2'
  • implementation group: 'io.cucumber', name: 'cucumber-java', version: '6.11.0'
  • implementation group: 'net.serenity-bdd', name: 'serenity-zalenium', version: '2.3.13'

And others. Fix the dependency conflicts and your reports should generate normally.

@wakaleo
Copy link
Member

wakaleo commented Feb 18, 2022

Closing for lack of activity - presuming resolved.

@wakaleo wakaleo closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants