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

It's not possible to replace configuration via system properties #2137

Closed
renatomefi opened this issue Jun 21, 2020 · 2 comments
Closed

It's not possible to replace configuration via system properties #2137

renatomefi opened this issue Jun 21, 2020 · 2 comments

Comments

@renatomefi
Copy link
Contributor

Given the following serenity.conf:

webdriver {
  driver = remote
  remote {
    driver = chrome
    url = "http://localhost:4444/wd/hub"
  }
}

More setup information:

  • Gradle 6.4
  • Serenity 2.2.9
  • Serenity Cucumber 2.2.5
  • Cucumber 5.7.0

When I run the test suite via gradle:
./gradlew -Dwebdriver.driver=chrome
I'd expect to have my local driver running, but instead it still runs via the remote driver

Another attempt was to remove the URL, but maybe that's another problem that if it comes empty from the system properties it does seem the replace the final configuration:
./gradlew -Dwebdriver.driver=chrome -Dwebdriver.remote.url=""

My intention is to have sane defaults and allow CI or users to influence it via system properties.

Is there a way to achieve this with Serenity?

Thank you!

@wakaleo
Copy link
Member

wakaleo commented Jul 6, 2020

Have you tried using ./gradlew -Pwebdriver.driver=chrome

@jacquecosta
Copy link

jacquecosta commented Sep 25, 2020

@wakaleo

I am with the same doubt, but in my case I am using Maven.

At the moment I am testing Appium + Serenity and the behavior that I am experiencing is:

Given the following serenity.conf:

environments {
  default{
    context = android
    appium.platformName = Android
    appium.app = appPath
    appium.automationName = UiAutomator2
    appium.deviceName = emulator-5554
  }
}

If I run:

mvn verify -Dappium.platformName=ios -Dappium.avd="iPhone 8" .....

Then the information provided are ignored and the execution stills considering the default on serenity.conf file.

I tried with mvn verify -Penvironment=default but a profile with this name doesn't exists, any idea?

My info:

Serenity Version = 2.0.90
Serenity Cucumber = 1.9.50

@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
Projects
None yet
Development

No branches or pull requests

3 participants