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

how to change window target folder in serenity 4.0 #3250

Open
3 tasks
jecardenasri01 opened this issue Sep 1, 2023 · 10 comments
Open
3 tasks

how to change window target folder in serenity 4.0 #3250

jecardenasri01 opened this issue Sep 1, 2023 · 10 comments
Labels

Comments

@jecardenasri01
Copy link

jecardenasri01 commented Sep 1, 2023

What happened?

Hi experts.
study material:
https://serenity-bdd.github.io/docs/reference/serenity-properties
https://johnfergusonsmart.com/configuring-different-output-directories-serenity-bdd-maven/

My project is a gradle implement serenity 4.0.0-beta-3.
I want my report to be saved on my local drive c
i tried change output directory of serenity screenplay to my folder "C:\SeleniumEvidencias" :

i tried whit :
execute by cmd : gradle clean test --tests Ru_busquedaGoogle -Dwebdriver.driver=chrome -Dserenity.outputDirectory=C:/SeleniumEvidencias

i tried whit
aggregate lines on serenity.properties
serenity.project.name = "My Special Project"
serenity.test.root = "src.resources.feature"
serenity.outputDirectory = C:/SeleniumEvidencias

this is my structure for proyect :

image

but this is result
image
image

What did you expect to happen?

i need the report on disk local c :
image

Serenity BDD version

4.0.0-beta-3

JDK version

17.0.7

Execution environment

windows
chrome

How to reproduce the bug.

https://github.com/jecardenasri01/serenity-screenplay-4.0.0-beta-3

How can we make it happen?

  • work on this myself (with Serenity BDD team guidance)
  • Hire the Serenity BDD team to build it for me
  • add it to the Serenity BDD backlog and wait for a volunteer
@wakaleo
Copy link
Member

wakaleo commented Sep 2, 2023

Use serenity.conf rather than serenity.properties, which is no longer fully supported in Serenity 4.0.0, e.g.

serenity {
  outputDirectory = "reports"
}

@jecardenasri01
Copy link
Author

jecardenasri01 commented Sep 5, 2023

Utilice serenity.conf en lugar de serenity.properties, que ya no es totalmente compatible con Serenity 4.0.0, por ejemplo

serenity {
  outputDirectory = "reports"
}

i tried but it fails too
image
image
image

image
image

@wakaleo
Copy link
Member

wakaleo commented Sep 5, 2023

For Windows, this should work:

serenity {
  outputDirectory = "C:/Users/john/report"
}

or

serenity {
  outputDirectory = "report"
}

@jecardenasri01
Copy link
Author

Index and others files cannot move to new folder

new folder
image

target folder still in inteli j idea
image

my serenity.conf
image

since the target folder is not moved the index fails
image

@jecardenasri01
Copy link
Author

For Windows, this should work:

serenity {
  outputDirectory = "C:/Users/john/report"
}

or

serenity {
  outputDirectory = "report"
}

Cannot move all files to new folder (comment preview)

only move page source cannot generate index.html, only move pagesources ,screenshot ,browser chrome properties

image

@wakaleo
Copy link
Member

wakaleo commented Sep 5, 2023

I am not able to reproduce this - did you run mvn serenity:aggregate or grade aggregate?

@jecardenasri01
Copy link
Author

I am not able to reproduce this - did you run mvn serenity:aggregate or grade aggregate?

yes i tried manually or for command line but result failed .

you can execute my proyect and add these command ?

i cant understand why failed on windows move evidences

How to reproduce the bug.
https://github.com/jecardenasri01/serenity-screenplay-4.0.0-beta-3

@wakaleo
Copy link
Member

wakaleo commented Sep 5, 2023

Try using the latest versions of JUnit

@jecardenasri01
Copy link
Author

jecardenasri01 commented Sep 5, 2023

JUnit

i tryed actualized all libraruies but failed to move files.
my build is wrong?

image

image


serenity build.gradle


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

repositories {
mavenCentral()
mavenLocal()
}

buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.serenity-bdd:serenity-gradle-plugin:4.0.1"
}
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "net.serenity-bdd.serenity-gradle-plugin"

sourceCompatibility = 11
targetCompatibility = 11

ext {
serenity_version = '4.0.1'
junit_platform_launcher_version="1.10.0"
junit_platform_suite_version="1.10.0"
junit_jupiter_engine_version="5.10.0"
junit_vintage_engine_version="5.10.0"
cucumber_junit_platform_engine_version="7.2.3"
logback_classic_version="1.2.10"
assertj_core_version="3.23.1"
}

dependencies {
dependencies {
testImplementation "net.serenity-bdd:serenity-core:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-cucumber:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-screenplay:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-screenplay-webdriver:${serenity_version}"
testImplementation "net.serenity-bdd:serenity-ensure:${serenity_version}"
testImplementation "org.junit.platform:junit-platform-launcher:${junit_platform_launcher_version}"
testImplementation "io.cucumber:cucumber-junit-platform-engine:${cucumber_junit_platform_engine_version}"
testImplementation "org.junit.platform:junit-platform-suite:${junit_platform_suite_version}"
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_engine_version}"
testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_engine_version}"
implementation "ch.qos.logback:logback-classic:${logback_classic_version}"
testImplementation "org.assertj:assertj-core:${assertj_core_version}"
}
}

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

gradle.startParameter.continueOnFailure = true

test.finalizedBy(aggregate)

`


an my serenity conf


`
drivers {
windows {
webdriver.chrome.driver = src/test/resources/webdriver/chromedriver.exe
webdriver.gecko.driver = src/test/resources/webdriver/geckodriver.exe
webdriver.ie.driver = src/test/resources/webdriver/msedgedriver.exe
}
}

chrome.switches = """remote-allow-origins=*;ignore-certificate-errors;start-maximized;incognito """

webdriver {

//driver = "edge"
driver = "chrome"
//driver = "chrome"
autodownload = true

timeouts {
script = 15000
pageLoad = 15000
implicit = 15000
}

}
serenity {
outputDirectory = "C:/Users/Imagemaker/Desktop/reporte"
}

`

@wakaleo
Copy link
Member

wakaleo commented Sep 5, 2023

Possibly a Windows/Gradle-specific issue.

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

No branches or pull requests

2 participants