Introduction
Testing is a core part of the application development process. With Visual Studio Online, users can not only plan and develop their application online, they also can use the power of the cloud to manage their test planning and test execution.
Visual Studio Online offers the following features for testing:
- Creating Test Plans
- Creating tests
- Executing tests
- Load testing
We will look at a few of these features in more detail.
Creating a Test Plan with Visual Studio Online
To create a test plan, navigate to your Visual Studio Online account, select your team project, and create a backlog if you have not done so already. You can refer to http://www.developer.com/microsoft/managing-projects-backlog-with-visual-studio-online/ to see how to do create your team project and backlog.
On the top of your project dashboard, click the “Test” link.
Figure 1: The Test link is highlighted
If you do not have a test plan already created, you will be greeted with a message stating that you need to create a test plan before you can create test cases.
Figure 2: The Click Here link is highlighted
Click the marked link to create a test plan.
Figure 3: Creating a test plan
Enter details for the test plan. You can choose the name, area path, as well as the iteration you want your test plan to target. Click Create to create the test plan.
What we have created above is the basic test plan. If you hover your mouse over the “+” sign on the left navigation bar, you can see the various test suites that we can create once we have a test plan.
Figure 4: Viewing the test suites
We can see that we can create a static suite, a requirements-based suite, a query-based suite, or shared steps.
The next step after creating a test plan is to add a test suite that you want to target.
Figure 5: Adding a test suite
In Figure 5, you can see that I have created a requirements-based test suite.
Creating Tests
Once you have the test plan and the test suites created, the next step includes creating the tests. To begin creating tests, you need to select the test suite and then click the New link as shown in Figure 6.
Figure 6: Clicking the New button
Select “New test case”.
Figure 7: Selecting New Test Case
You will be presented with a dialog to enter the details of the new test case
Figure 8: Entering the new test case details
Enter the details for your test and click “Save and Close”.
Figure 9: Ready to save and close
You also can create tests using a grid. To do that, select “New test case using grid”.
Figure 10: Selecting a new test case using grid
You will be presented with a screen as shown in Figure 11.
Figure 11: The new, blank grid
You now can add test cases and then click the Save button to save your tests.
Figure 12: Saving your tests
Once you have added your test, you can go back to your test suite and view the tests in aggregate.
Figure 13: Viewing your tests
Executing Tests
To execute your tests, choose your test suite and select “Run”.
Figure 14: Running a test
When you choose to run, you have a popup window that lists the tests. You can choose the result of each step you have executed.
Figure 15: Choosing your results
Here is a screen that shows my annotation for the test execution.
Figure 16: Showing the annotations
You also can choose the result of the test run by clicking the icon on the top right.
Figure 17: Choosing the test run results
You have option to choose among “Pass Test”, “Fail Test”, “Pause Test”, “Block Test”, and “Not Applicable”.
For this case, I am going to choose to pass the test.
Figure 18: Passing the test
Once you have finished the test case, you can choose to continue with the next test or save and close the run. If you choose to continue with the next test, click the “Next” link on the top right.
Figure 19: Clicking Next to continue
After you complete your test run, you can see the test dashboard to view the test results in aggregate.
Figure 20: Viewing the test results
Any failures will be shown in red.
You can see how Visual Studio Online makes test planning and testing easy and cloud-based.
Summary
In this article, we learned about managing the testing of your application using Visual Studio Online. I hope you have found this information useful.
About the Author
Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the .NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul.patel@hotmail.com.