I need to execute the automation script build in maven java on a remote machine (not on a local machine).
Please suggest the best approach to run automation scripts on remote machine and what I would need from the infrastructure team
Should I request a dedicated AWS instance from the infrastructure team to run the automation scripts on a remote machine? How to I configure any CICD tolls like GitHub actions or Jenkins to run a dedicated machine?
Should I use Selenium Grid or Dockerized Selenium Grid, will the execution be slow in Selenium Grid?
Jenkins, if that is the CI you use has plugins and documentation to you use containers and run scripts remotely. You pretty much have to dive in and learn which tool suits your needs with the economy you seek. For example running selenium in a dockerised grid will limit you to running headless tests, you may want to keep your options open in some places.
Grid probably runs better outside of containers though, as containers are a “serial” tool, you use it and then discard it, while grid is a “pool” tool that is intended to fill and empty over time dynamically always leaving a bit of free workers ready for use.
There is no single best approach even within the same enterprise, you will often have a hybrid of strategies in place for remote workload execution.
If you have budget available and want to eliminate the heavy lifting of environment set up and maintenance, you could easily have your Jenkins instance build your tests project and have the these executed on Browserstack Automate.
Find the stack that the devs use for everything else.
Get a developer to walk you through for example the pipeline for unit tests(if you can’t figure it out by yourself already).
Adapt your framework to be executed similarly to the unit tests.
Check the compatibility of the platform you’ll use for custom things that you require(storing screenshots, reports, archiving execution files, execution history, etc…)
Anything that you’ll customize and diverging from what the company or developers already use constantly, means you’ll most probably be left in charge of maintaining that new infrastructure(even without help from devs or devops).
I’ve encountered a couple of places like that and makes things horrible to scale with new versions, updates, upgrades, migrations, hardware changes, new people.
This is exactly my mantra as well. Automation code should be as closely related to production code as possible, in terms of tech stack and infrastructure.