How To Optimize Automation Using Azure DevOps

2 MIN READ

In this blog, we are discussing a feature of DevOps by which we can optimize automation. Manual testing is out fashioned yet it is still important but if we work on big projects we always feel the testing phase should be performed rapidly. Here at moreYeahs we are optimizing automation using DevOps.

We are using selenium to do automation for testing of the dynamics CRM project. Using the .net Unit test project we created test cases. Under the TestClasses, we defined TestMethod which is basically test cases.

Test Classes categories type of test. For best practice, we should always have some basic test cases which need to be performed each time we create a new build to do further development.

microsoft azure devops automation

Before doing all these we need to write test cases that contain test steps. The Test Steps describe the execution steps and expected results for each test step. The results of the comparison between the expected and actual outcomes are used to mark each step as pass or fail.

azure devops dashboard
login into dynamics window

Save test case and copy its id.

Now we need to associate this test to our unit project for it we need to place code on the repository. From the test explorer, we need to associate the test as below.

associate the test case
create in azure DevOps’s test case

You need to add the ID of the test case created in azure DevOps’s test case.

test case in ID column directly opens into azure DevOps

You got the link of a test case in ID column which directly opens into azure DevOps.

Here we are ready enough to use one of the most useful features of DevOps which provide true automation. The Azure Pipelines service enables you to automatically build, test, and make your code available to other users. It works with almost any type of language or project. Azure Pipelines combines continuous integration (CI) and continuous delivery (CD) to continuously test and build your code, and then deliver it. 

Azure Pipeline is its self topic which I will cover in the next blog. Here I would like to discuss the pipeline that will automate the test cases.

create a configuration of test plan in Azure DevOps

Before creating a pipeline we need to create a configuration of test plan in Azure DevOps. The configuration is a platform on which the test code will run. Like which OS to use, which browser to use, etc. All these definitions provided in the configuration.

configuration to run its test cases.

We need to assign a configuration to test suits so suits will use configuration to run its test cases.

add test cases into a pipeline and configure

Now we are good to use the pipeline’s vsTest task add it into a pipeline and configure it below.

Select test plan from the dropdown, select test suits, and select test configuration.

check Test mix contains UI test as it is automation we need to check this.  

Save and queue the pipeline and run it

Save and queue the pipeline and run it. you can see real-time logs as tasks are running.

get a summary of test cases


We can get a summary of test cases also we can get logs of fail test cases. All these features going to provide ease in the development process and help develop more effective softwares.

Contact Us