Unit Testing Unit testing is a software development process in which the smallest testable parts of an application, called units, are indivi...
Unit Testing
Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. This testing methodology is done during the development process by the software developers and sometimes QA staff.
Below are the steps to add unit test in Azure pipeline
- Open an existing project in VS and add a new project (right-click on Solution and select Add ---> NewProject-->UnitTest for .NetCore)
- Add the code for unit Test and commit in the local repository and push it to remote Azure Repos.
- Create an Azure pipeline to refer above repository and add the below code for the unit test task.
- - task: DotNetCoreCLI@2
- inputs:
- command: test
- projects: '**/*Test/*.csproj'
- arguments: '--configuration $(buildConfiguration)'
- Save and Run the pipeline.
- Once the pipeline is executed successfully then check the Job summary and you will find the Test tab and you can see the test result in the pipeline
COMMENTS