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

Serenity core does not obey the screenshot configuration set by serenity.properties file. #3532

Open
AmarjeetSinghMatharu opened this issue Sep 10, 2024 · 4 comments

Comments

@AmarjeetSinghMatharu
Copy link

What happened?

I am facing a issue where serenity throws error while taking screenshot of the failure case:
[ForkJoinPool-2-worker-3] WARN net.thucydides.core.steps.BaseStepListener - SRP:Found duplicate snapshot 244adc7e2143949efbb6e2446584419b506ca762154a50bee11e86af6bd27737.png

in order the by pass thes messages or disable the serenity capability of taking screen shots I set the following configuration in
Serenity.properties file:
serenity.take.screenshots=DISABLED
as per https://github.com/serenity-bdd/serenity-documentation/blob/master/src/asciidoc/screenshots.adoc
but I still get these errors:
[ForkJoinPool-2-worker-9] INFO com.ford.utils.Util - pause(): waitTime= LONG
[ForkJoinPool-2-worker-3] WARN net.thucydides.core.steps.BaseStepListener - SRP:Found duplicate snapshot 244adc7e2143949efbb6e2446584419b506ca762154a50bee11e86af6bd27737.png
[ForkJoinPool-2-worker-3] WARN net.thucydides.core.steps.BaseStepListener - SRP:Found duplicate snapshot 244adc7e2143949efbb6e2446584419b506ca762154a50bee11e86af6bd27737.png
[ForkJoinPool-2-worker-3] WARN net.thucydides.core.steps.BaseStepListener - SRP:Found duplicate snapshot 244adc7e2143949efbb6e2446584419b506ca762154a50bee11e86af6bd27737.png
[ForkJoinPool-2-worker-3] WARN net.thucydides.core.steps.BaseStepListener - SRP:Found duplicate snapshot 244adc7e2143949efbb6e2446584419b506ca762154a50bee11e86af6bd27737.png
[ForkJoinPool-2-worker-3] WARN net.thucydides.core.steps.BaseStepListener - SRP:Found duplicate snapshot 244adc7e2143949efbb6e2446584419b506ca762154a50bee11e86af6bd27737.png
[ForkJoinPool-2-worker-3] INFO com.ford.steps.HomeSteps - theUserEntersCorrespondingEventForInJumpToEventFieldAndSelectFirstRecordOnHomePage Instantiated
Content of line 10: 31333362636135642D333066632D3464

Please suggest me when this fix will be available:
Following is my configuration:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenitycore.version>4.2.0</serenitycore.version>
    <serenitynavigator.version>4.2.0</serenitynavigator.version>
    <serenity.junit.version>4.2.0</serenity.junit.version>
    <serenity.maven.version>4.2.0</serenity.maven.version>
    <serenity.cucumber.version>4.2.0</serenity.cucumber.version>
    <slf4j-version>2.0.4</slf4j-version>
    <maven-failsafe-plugin.version>3.0.0-M8</maven-failsafe-plugin.version>
    <maven-surefire-plugin.version>3.0.0-M8</maven-surefire-plugin.version>
    <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
    <maven-javadoc-plugin.version>3.3.0</maven-javadoc-plugin.version>
    <junit.version>4.13.2</junit.version>
    <lambdaj.version>2.3.3</lambdaj.version>
    <fest-assert.version>1.4</fest-assert.version>
    <maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
    <serenity-rest-assured.version>4.1.17</serenity-rest-assured.version>
    <jsonassert.version>1.5.0</jsonassert.version>
</properties>

What did you expect to happen?

No response

Serenity BDD version

4.2.0

JDK version

java version "18.0.2.1" 2022-08-18

Execution environment

No response

How to reproduce the bug.

  1. Fail a test case deliberately
  2. Have a more then one thread spawned for test cases execution.

How can we make it happen?

Add it to the Serenity BDD backlog and wait for a volunteer to pick it up

@janmekota
Copy link

janmekota commented Sep 14, 2024

Hi, I also encountered the issue that serenity.take.screenshots=DISABLED is ignored.
We use

  • serenity-core-4.1.4
  • serenity-cucumber-4.1.4
  • JUnit 5
  • Java Amazon Corretto 17
  • trigger test with net.serenitybdd.cucumber.cli.Main --plugin io.cucumber.core.plugin.SerenityReporterParallel

Even though the property -Dserenity.take.screenshots=DISABLED is set the screenshots are still taken.

The codeLevelScreenshotConfiguration is TakeScreenshots.UNDEFINED

@janmekota
Copy link

@wakaleo
Hi John,
please, do you know about this problem with ignoring serenity.take.screenshots=DISABLED?

@murkl
Copy link

murkl commented Sep 17, 2024

With Version 4.1.3 the property serenity.take.screenshots seems to be ignored. If setting serenity.take.screenshots=FOR_FAILURES the screenshots are also created if the tests are successful.

@akhi246
Copy link

akhi246 commented Nov 13, 2024

Hi, I am also facing the same issue as @janmekota . Please let me know if any resolution. @wakaleo @janmekota
I am also using serenity version 4.1.3

We use

serenity-core-4.1.3
serenity-cucumber-4.1.3
JUnit 5
plugin io.cucumber.core.plugin.SerenityReporterParallel
trigger test as mvn verify -Dserenity.take.screenshots=DISABLED and also set this property explicitely in serenity properties, still the screenshots are taken for every step

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

No branches or pull requests

4 participants