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

gradle -Denvironment = localhost clean test does not work in gradle - it always takes the default value of the serenity.conf #2343

Closed
santiagogf26 opened this issue Dec 23, 2020 · 1 comment

Comments

@santiagogf26
Copy link

santiagogf26 commented Dec 23, 2020

this is the serenity.conf file

environments {
default{
webdriver.base.url = "http://my.super.production.com"
}
localhost {
webdriver.base.url = "http://localhost:8080/"
}
staging {
webdriver.base.url = "http://staging.devatlant.com"
}
}

@santiagogf26 santiagogf26 changed the title How to use mvn verify -Denvironment=staging command for gradle? gradle -Denvironment = localhost clean test does not work in gradle - it always takes the default value of the serenity.conf Dec 23, 2020
@wakaleo
Copy link
Member

wakaleo commented Dec 24, 2020

This is a Gradle question - you need to pass your environment variables to the Gradle test task, since it runs in a separate JVM (see for example https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html)

@wakaleo wakaleo closed this as completed Feb 12, 2022
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

2 participants