title: What is the best way to run selenium tests in AWS CI/CD pipeline
body: <p>I have been assigned a task to integrate the the automation test that I developed to the a AWS CI/CD pipeline, I was researching on how to achieve this task for a while now. After doing some research I found out that a lot of people have used tools like Jenkins/ Docker to achieve this task, even after doing all the research Im still confused on what is the best way to achieve this, here are some of the documents that I found,</p>
  
  <p><a href="http://www.testautomationguru.com/selenium-webdriver-how-to-run-automated-tests-inside-a-docker-container/" rel="noreferrer">http://www.testautomationguru.com/selenium-webdriver-how-to-run-automated-tests-inside-a-docker-container/</a></p>
  
  <p><a href="https://www.pawangaria.com/post/docker/how-to-use-docker-with-webdriver/" rel="noreferrer">https://www.pawangaria.com/post/docker/how-to-use-docker-with-webdriver/</a></p>
  
  <p><a href="https://aws.amazon.com/blogs/devops/using-aws-codepipeline-aws-codebuild-and-aws-lambda-for-serverless-automated-ui-testing/" rel="noreferrer">https://aws.amazon.com/blogs/devops/using-aws-codepipeline-aws-codebuild-and-aws-lambda-for-serverless-automated-ui-testing/</a></p>
  
  <p><a href="https://dzone.com/articles/qa-automation-pipeline-learn-how-to-build-your-own-1" rel="noreferrer">https://dzone.com/articles/qa-automation-pipeline-learn-how-to-build-your-own-1</a></p>
  
  <p>What Im supposed to do is, once the web application the developers are working on is deployed through the pipeline, I will have to run the selenium test through the pipeline to check if the web application is deployed properly. (This is where I need some clarification on what is the best way to achieve this)</p>
  
  <p>I built a maven project with the selenium scripts to check content on the web application for now I have used a dummy url in the scripts, here is the maven project </p>
  
  <p><a href="https://github.com/nimeshdilshan96/pipeline-script-test.git" rel="noreferrer">https://github.com/nimeshdilshan96/pipeline-script-test.git</a> </p>
  
  <p>This is what I have done up-to now, </p>
  
  <ul>
  <li>I have a docker container running in my local PC (this is the docker image that i used <a href="https://hub.docker.com/r/selenium/standalone-chrome" rel="noreferrer">https://hub.docker.com/r/selenium/standalone-chrome</a>)</li>
  <li>I have the maven project which runs the tests on the docker container </li>
  </ul>
  
  <p>At this point Im really confused and stuck on what should be done, here are some questions Im looking answers for,</p>
  
  <ul>
  <li>What is the best way to run selenium tests on a CI/CD pipeline?</li>
  <li>Should the maven project run separately or within the docker container?</li>
  <li>Should the docker container only act as the environment in which tests are executed? </li>
  </ul>
  
  <p>Any help would be appreciated, thanks in advance :) </p>