I have a requirement in which i have to run Selenium Ui test using docker images for .Net Core in azure pipelines.Is there any way in which this can be accomplished.I did not find any official or verified Docker images.
Any help is appreciated.
If you tried the tutorial @Infern0 mentioned. You can then try adding a Docker task in your azure pipelines.
First you may need to create a docker service connection in your azure devops. Check here for more details. Then you can add a docker task in your pipeline. check here for docker task.
I also found a tutorial here that might be helpful, it describes how to run selenium UI test within docker images.
The author pointed out in the tutorial below command to run a Selenium Grid. And Then
connect the selenium scripts with the selenium hub with driver = RemoteWebDriver(host,caps)
$ docker run -d -p 4444:4444 --name selenium-hub selenium/hub:3.4.0
$ docker run -d --link selenium-hub:hub selenium/node-chrome:3.4.0
If docker is installed in the agent, you can add a powershell or bash task in your pipeline to run docker command.
To conclude, beside using container as 2Infern0 mentioned, you can aslo use script tasks to run docker command or to use docker task.
Hope you find above helpful!
For running e2e tests on browser, there is already build images provided by selenium. More info can be found here: https://github.com/SeleniumHQ/docker-selenium
About building your test framework to image, there is plenty of tutorials in the net, how to produce docker file and put everything required inside. Example: https://logcorner.com/setup-selenium-web-browser-automation-using-asp-net-core-and-docker/
At the end you can just create compose file to run the images.