serenity-bdd/serenity-core

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Multiple environment configuration in serenity.conf file #3343

santhoshkumar-ponnusamy posted onGitHub

Hi @wakaleo,

I have provided my 'serenity.conf' file below, in that i have 2 different environment configurations.. One for environment and another one for browser selection.

I have to run in 'qa' environment in 'edge' browser.

Command used: mvn clean verify -Denvironment="qa" and -Denvironment="edge"

Its picking the correct browser (edge), but its picking 'default' environment, not the 'qa'.

Am I missing something here, Can you please help me with the maven command.

Serenity.Conf file

############################# Browser Configurations ############################### environments { chrome { webdriver { driver = chrome capabilities { browserName = "chrome" acceptInsecureCerts = true "goog:chromeOptions" { #args = ["headless","--remote-allow-origins=*","--no-sandbox","--disable-dev-shm-usage"] args = ["start-maximized","--remote-allow-origins=*"] } } } } edge { webdriver { driver = edge capabilities { browserName = "MicrosoftEdge" "ms:edgeOptions" { #args = ["test-type", "remote-allow-origins=*","ignore-certificate-errors", "incognito", "headless","disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking"] args = ["test-type", "remote-allow-origins=*","ignore-certificate-errors", "incognito", "disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking"] } } } } firefox { webdriver { driver = firefox capabilities { browserName = "firefox" pageLoadStrategy = "normal" acceptInsecureCerts = true unhandledPromptBehavior = "dismiss" strictFileInteractability = true "moz:firefoxOptions" { #args = ["-headless"], args = ["start-maximized","remote-allow-origins=*"] prefs { "javascript.options.showInConsole": false }, log {"level": "info"}, } } } } }

############################# Environment Configurations ###############################

environments { default { webdriver.base.oasis.url = "https://www.google.com" } dev { webdriver.base.oasis.url = "https://www.amazon.com" } qa { webdriver.base.oasis.url = "https://www.flipkart.com" } }

webdriver.autodownload = true


You can't have two different environments sections, it's not valid HOCON syntax.

posted by wakaleo about 1 year ago

@wakaleo

ok. Then how to handle my scenario.? Any suggestions..?

I need to run my testcases in multiple browsers.. in multiple environments...

posted by santhoshkumar-ponnusamy about 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests