InterviewSolution
| 1. |
How Can We Do Unit Testing Using Vsts Test? |
|
Answer» In order to do unit testing USING VSTS right click on the visual studio solution explorer and select add new project. In the TEST project right click and select add new test you should be popped with a dialog box as shown in the below figure. From the dialog box select ‘Basic Unit test’. In order to create a function which will execute our unit test you need to attribute the function with “[TestMethod]”. If you remember in Nunit it was ‘[Test]’. The assert function does not CHANGE. Once you have done the unit testing coding compile the same, click on test, run and select ‘Tests in the current context”. Once you do the previous test, the test starts running from PENDING to in PROGRESS and finally showing the results.
In order to do unit testing using VSTS right click on the visual studio solution explorer and select add new project. In the test project right click and select add new test you should be popped with a dialog box as shown in the below figure. From the dialog box select ‘Basic Unit test’. In order to create a function which will execute our unit test you need to attribute the function with “[TestMethod]”. If you remember in Nunit it was ‘[Test]’. The assert function does not change. Once you have done the unit testing coding compile the same, click on test, run and select ‘Tests in the current context”. Once you do the previous test, the test starts running from pending to in progress and finally showing the results.
|
|