How to run selenium tests in Azure DevOps pipeline | Create Pipeline to run automation test cases |
Vložit
- čas přidán 27. 03. 2022
- In this video, I have explained how to create build , deploy and release Azure pipeline and how to run selenium maven testNG test cases using Azure Pipeline and verifying test results.
Topics to cover-
---------------------------
Setup Azure build release pipelines for maven project
Running Selenium automated test cases on Azure Pipeline using Maven
How to import git repo in azure devops
How to run the pipeline job on self hosted agent
The build and release pipelines in Azure DevOps can be configured to run the automated tests available in your source code.
Create Pipeline to run automation test cases,
Run AUTOMATED TESTS In AZURE DEVOPS PIPELINE
#azuredevops #cicd #devops
Dear Friends
******************************Welcome on My CZcams free learning platform*************************************
Below are most trending courses offered by VAT to get hands-on experience.
Please go and watch below playlists to excel your skills to get Job easily on automation profile, DevOps and Developers.
Azure DevOps fundamentals crash course-
**************************
• Azure DevOps crash course
YAML CI/CD pipelines-Azure DevOps-
*************************
• YAML CI/CD pipelines -...
Variables in Azure DevOps-
*************************
• Variables-Azure DevOps
Triggers in Azure DevOps
*************************
• Triggers-Azure pipelines
Azure DevOps-BDD HTML reporting
*************************
• Azure DevOps Cucumber ...
SonarQube tutorial-
*************************
• sonarqube tutorial
AWS Account and EC2 instance
*************************
• AWS-Tutorial for Begin...
Jenkins CI/CD crash course-
*************************
• Jenkins-CI/CD tool
BDD Cucumber HTML Reporting-
*************************
• BDD Cucumber Framework
GCP account
• Google Cloud Certifica...
*************************
TeamCity
*************************
• TeamCity-CI/CD tool
Selenium Interview Questions
*************************
• Selenium Top Interview...
UiPath RPA
*************************
• Uipath RPA Certification
Appium -Mobile Automation
*************************
• Appium-MobileTestAutom...
Selenium WebDriver Xpaths -
*************************
• Selenium WebDriver wit...
Apache Web Server
*************************
• Apache web server.
GitHub
*************************
• GIT for DevOps
Follow me on below social media-
**************************************
CZcams - / virenautomationtesting
Facebook - / virenautomationtesting
Twitter - / virenautomation
we really need to have some real time videos for this.
Ok sure.. Give me some more details on that to create more videos on it.
This is very helpful, please upload how to test login scenarios of OAuth authentication, because I am getting auth error in headless mode
Sure thanks for your question
I did not understand why we need to create a release pipeline? If in the build pipeline only we mention mvn clean test and all our tests are executed then why do we need to have the release pipeline extra? Can you please explain?
If you want to run your selenium code on two environments at same time or on two agents then we should use release pipeline concept.
We can build selenium code in build pipeline but if you have stage and int two environment for testing then we can deploy selenium build in these environments.
I am making new video on this where you can understand the concept of release pipeline.
Hello please create one video to run Selenium Scripts using YML pipeline , i see on youtube everyone uses classic editor to create pipeline
Sure let me create a video on it. You will get a video this week.
Hi Viren, can you please provide the Pom.XML file dependencies code which will run the test runner file. I mean what dependency to add in Pom.XML file so that it picks test runner file and execute it .
Sure .get it by tomorrow
github.com/gitlogin-sys/TestAutomation/tree/master
what are the agent specifications that you have set? Because the need to know what java we are using and the versions.
We are using Java 11 as of now to run on loca system as agent machine .
Agend is windows 10 64 bit with jdk11
Hi Sir, Please upload a video to run multiple spec files in protractor or any framework in same browser parallely in Jenkins to save execution time. Also execution log should also be generated
Which files do you want to execute
@@virenautomationtesting Multiple javascript spec files
Hi Viren,
after running test, my run didn't appear in Test Plans -> Runs. Could you please help me on this?
Do you have access to test plans tab fully ? Or did you check proper permission for test plans ..it will appear when you run in azure editor . selenium tests will not show here .
Hi Viren, Thanks for all the discussion other day on one of the issue. One more question for you. I updated added the dependency for selenium java and webdrivermanager in pom.xml. Tests are running fine on my machine but getting the following error in azure dev op pipeline. "Can not access io.github.bomigarcia.webdrivermanager bad file. Class file has wrong version 55.0 should be 52.0. Please remove or make sure it appears in correct subdirectory of class path. Please let me know how to solve this error.
Check your manager file in github... If you have added maven dependency then removed manager file from GitHub given path...
@@virenautomationtesting Thanks for your response. I removed it but there are some errors in code. In base class to initiatie browser I have used webdrivermanager "WebDriverManager.chromedriver().arch32().setup();" Probably I need to remove this too right? If I do that how I can pass the driver? Do I need to create a folder and give the path? Is that the only option?
Thanks for great video. Can we pass parameters such as password, Cucumber tags, browser to run and test environment name via DevOps variables and read them in our TestNg or Testrunner file? I am planning to create multiple pipelines(for each test environment and browser) from same github repo and branch.
Yes, you can ... Let create a video on how to pass variable from pipeine to selenium scripts at runtime.
Can we see our Tests Running in the VM (Agent Pool) by logging in to Agent? Or can we see only the command line?
If you have access to agent machine which is windows machine then you can see otherwise on Linux you can't see
@@virenautomationtesting No you can't see..
"No test result files matching D:\a\1\s\**\surefire-reports\TEST-*.xml were found, so publishing JUnit test results is being skipped." Hi Bro, please advise me on this error. I didn't clone the GIT repo to the Azure repo. Is it the reason?
Hi Sumudu ,
Sorry for late response. I think you are using self hosted VM machine. To work with junit reports you need to access the path where junit results are stored.
Try with local self hosted agents
Hi Viren… When I run the pipeline in azure devops, chrome browser is not maximising.. But when I run the test execution in eclipse, chrome browser is maximising.. Can you help me on this please.. For me in azure devops, tests should run in maximize mode
check the resolution of the slave and that it has a graphical interface.
Hi ,
On which agent are you running test cases ? i mean self or MS hosted agents ?
but how to map test cases to respective test scripts
Hi Viren. While running selenium tests on local agent, i am getting git checkout error as 'fatal : unable to access $git repo path, ssl certificate problem : unable to get local issuer certificate. Please help.
I have tried with sslVerify to false, but no help.
This seems azure unable to login to git for checkout.you need to create service connections using token which is created at your git account . Put that token in pipeline first step where git repository details we provide ...
Run a backend channel command on your local agent's git directory. It will work
Hi Viren, Thank you for your amazing videos. We use Azure Dev Ops for running automation tests. Recently some of the tests are throwing 'This task has timed out' error before it execute all tests in that suite. Do you know why it is happening? I would appreciate if you response. Thanks in advance.
What is task version you choose before job run ?
@@distancetraveller Thank you for your response. It is 3.* Let me know if it ok. Thanks
@@tigeressxxx Hi This is viren here .Try to change to task version and check
@@distancetraveller 4.* is fine?
@@tigeressxxx are check to kro phir batoo
So where the test cases ran , i mean in which virtual machine or local machine?
It's on local machine
Thanks for the video.but how to run the test in parallel in azure devopa pipeline
Thank you ☺️ preparing video for parallel run .wait till next week for details video
How do you create a local host ?
Thanks for your question.
Please watch agents configuration video series in this playlist
How to run test cases on Azure devops with selenium with appium?
Setup test cases in azure repo or git and then create ci pipeline to run
@@virenautomationtesting Can you create a video on setting up appium on server and then run the automation script on azure please?
@@user-xg4eo8wj5x hi... Could you please provide me some steps to do if u know manually so that i can create them..
Where did you run selenium tests.. I see only junit test results ...
In beginning, i have shown the eclipse where i have written selenium code with testng. That is selenium tests. Are you fresher or exp in automation ?
thanks
Sounds like u r underwater.