Monthly Archives: January 2014

Listing test plans, test suites using TCM

Listing test plans, test suites using TCM

Location tcm.exe is located in \Program Files\Microsoft Visual Studio 11.0\Common7\IDE on any machine that has Visual Studio Ultimate, Visual Studio Premium, or Visual Studio Test Professional installed
You can get a list of test artifacts from the command line by using the following tcm commands:
      • tcm plans /list
      • tcm suites /list
      • tcm configs /list
              • tcm testenvironments /list
This is very important as It is required identify test plan id, test suite id and test case id in order to upload results of a test case, which defined on Microsoft Test Manager during the test automation process. It is possible to identify ids of test plan and test cases through UI. But test suite id need to get through by executing below query
test_suite_list
Ref: http://msdn.microsoft.com/en-us/library/ff942472.aspx

Testing the Application Using Microsoft Test Manager

Creating a test plan
This post explain that how to create a test plan, test suite and link with test cases(Acceptance test if any)

At the start of a sprint, find out what you need to test. Discussing test cases is a great way to help the team understand the detail of what your users need. Tests planned in this way provide a clear target for the test/development team. Basically following diagram shows the hierarchey of test plan in Test Manager.
structure
1. Connect to a Team Project from Test Manager
It is required to connect TFS for accessing any pre-defined team projects. Open Microsoft test manager, then add tfs server as below;
tfs_server
 2. Once project is opened, click on ‘Add’ to create a new test plan [Example: Functional Testing]
add
 Enter a name for new test plan as below
Testplan
 3. Click on ‘Select’ to open new test plan
Open_plan
 A new window opens with the newly created test plan. Just need to consider about adding new test suites to this test plan for new functionalities. But creating test suites are not essential.
4. To create test suite, right-click on the test plan and click on ‘New suite’
test_suite
 5. Once this test suite is added, our test plan will be having below hierarchy
Test_suite_created
 6. Add test cases – It is time to add test cases for our test suite. In this example I use ‘Microsoft Visual Studio Scrum 2013’ as TFS process template. Therefor my test cases will be ‘Acceptance tests’ associate with ‘Product backlog’ items (Story)For more information about process template, please read
http://msdn.microsoft.com/en-us/library/ms400752.aspx
 7. I would like to add a query based test case to my test suite (Sample suite).
Please follow below steps;
 7.1 Click on ‘Add’ to add existing test cases (as below)
test_case_add
 7.2 Click on ‘Run’ to execute the query on query window (below)
run_query_test_case
 7.3 This query will be returned all the acceptance tests under ‘Team’ project, then select one of the test case (e.g. 5422 Example Test Case). Finally click on ‘Add test cases’ to add this test case to the test suite (see below)
query_results
 7.4. After adding this test case to the test suite, the test plan will appears as below#
Final_test_plan
 7.5 Now it is required to open the test case and define the test steps and expected results. To do this select test case and click on ‘Open’
open_test_case
Describe the test case
In this example I am adding a sample test case to verify the addion functionality of the standard windows calculator. Therefore I can add a positive non-decimal test case to verify this functionality as follows
Testcase_Desc
To Run test cases;8.Then click on ‘Test’ (top menu) to execute/run tests,select_run_test_case
 9.0 Then select your test case and click on ‘Run’ to execute the test case
run_test
 10. Click on ‘Start Test’ to run the test
test_start
 11. Open Windows claculator parallel to Microsoft Test Manager
 12. Select the test step, then define the status as below
results_update
 13. After completion of the test, click on ‘End test’, then Save and close (top-right hand coner)
 14. This will close the test window and display the results as below
final_result