How to transport a Selenium package to a client environment?

39 Views Asked by At

I need to develop a automation package using selenium and send it over to a different location and completely different environment so that it will aid in the testing's happening there. It has to be able to be integrated with Jenkins for the build run. Also it should be a data driven package.

how will I be able to do that?

1

There are 1 best solutions below

1
Alex Karamfilov On

You need to create repository and upload the tests there and provide access to the client. You can use service like Github or Gitlab. You can have private repository for up to 3 contributors. You can parametrize the test using property file or system property variables. If you need more information about how the system properties work you can check this article: https://www.baeldung.com/java-system-get-property-vs-system-getenv

Something like this:

System.getProperty("log_dir", "/tmp/log");
mvn clean test -DpropertyName=value

If you want to send the project like a jar file then it will be like:

System.getProperty("baseUrl", "https://mywebsite.com");
java -jar jarName -DbaseUrl=https://someotheraddress.com