-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
3.8.1 : correct environmental variables are provided only for the very first test #3177
Comments
updated the repo, the problem definitely exists also in rest interactions. |
Thanks for identifying this issue. Can you propose a PR for a fix? |
@wakaleo honestly I'm not that sure, according my investigation it comes from the fact that different threads set the environmentVariables differently (but I could not identify the moment, when it happened), and I have some doubts I can correctly resolve it. I will give it a try, but with the current lack of time it won't be soon. |
This may be an improbable lead but I dug into a few reports ( #3165 , #3017 -- they seem linked) So I was looking at the diff of everything from Then, to current I found this file: https://github.com/serenity-bdd/serenity-core/blob/main/serenity-model/src/main/java/net/serenitybdd/core/environment/ConfiguredEnvironment.java which
|
Have you tried with version 3.9.7? |
Now I did. This is where it gets interesting: the second test seems to run with But that isn't in fact the URL I would have expected (or, configured in the class extending PageObject). |
The underlying issue seems to be fixed, at least in v4.0.1 the environments will be passed on to the second and third tests correctly. |
Hi, I updated the serenity version from 3.4.2 to 3.8.1 and now I have the following problem.
The first test using the environmental variable (url) to open the page in the browser runs normally,
however, all following are failing with:
net.serenitybdd.screenplay.actions.UnknownPageException
This happens because starting from the second test
private EnvironmentStrategy environmentStrategyDefinedIn(EnvironmentVariables environmentVariables)
returns USE_NORMAL_PROPERTIES, while the first running test gets: ENVIRONMENT_CONFIGURED_AND_NAMED
this happens, of course, not without the reason. when the first running test gets to
public OpenPageWithName(String pageName)
the
public static EnvironmentVariables currentEnvironmentVariables()
returns environmentValiables, containing those which are started with "environments.", (all in all in the test repo I've created for this issue) 85, while the next one only 60.The test repo to reproduce is:
https://github.com/TagiraNara/TestSerenity
The text was updated successfully, but these errors were encountered: