I'm new to gradle and learning as I go. I've tests that I can kick off using gradle command in my terminal. The issue I'm running into is that I have to keep two copies of the same test, one for QA and one for Staging environment. They are similar tests the reason for this is that I have no idea how to set up gradle in a way that I can just tell it to run testA on QA or Staging My Current gradle.build file looks like this
dependencies {
testCompile 'org.testng:testng:6.14.3'
compile 'org.seleniumhq.selenium:selenium-java:3.141.59'
compile 'io.github.bonigarcia:webdrivermanager:3.3.0'
compile 'org.slf4j:slf4j-nop:1.7.25'
}
test {
useTestNG()
}
My current gradle command looks like this for QA
gradle test --tests testlandingpageQA
or for Staging
gradle test --tests testlandingpageDev
I need a solution where end user can pick which environment to run this test on.