Showing posts with label MTM. Show all posts
Showing posts with label MTM. Show all posts

Tuesday, 29 September 2015

Resolve Common Errors - Run Automated Tests with VS Release Management 2013


There is a tool available in Release Management 2013 to execute automated tests, once the deployment completes. image
image
How to setup this is well explained in article here. http://nakedalm.com/execute-tests-release-management-visual-studio-2013/
With the custom component set as below in release template, you should be able to excute tests.image
Below are few issues you might encounter, and steps to fix them.
*******************************************************************************************************
Error 01:
Cannot process argument transformation on parameter
'PlanId'. Cannot convert value "40426" to type "System.Int16". Error: "Value was either too large or too small for an Int16."  Unfortunately this error comes with the component reporting a “succeed”. But log shows the failure. This error is discussed here.
image
This is obvious error if you have more TFS projects and larger IDs for work items above 32767. You would not be able to use the Microsoft provided tool  image
To Resolve:
You need to get the TCM.ps1 from the tool and edit it. Downloading it from RM tools is not possible simply because downloading or any other modification is not available for Microsoft published tools.image
In the deployment agent machine, deployment agent user’s temporary folder (component log contains this path with the error), you can find the file.
C:\RMT\RM\T\RM\XX-MTM-Test\201509241626076897123-31\TcmExec.ps1
In this example users temp path is set to  C:\RMT. Default path is C:\users\username\AppData\Local\Temp\.. as shown below. (More info here) image
Copy this script and change the Int16 parameters highlighted below to Int.image
image
Then create a new tool in Release Management using the powershell script.New MTM RM Tool
Set arguments as follows.
-File ./TcmExec.ps1 -Title "__TestRunTitle__" -PlanId __PlanId__ -SuiteId __SuiteId__ -ConfigId __ConfigId__ -Collection "__TfsCollection__" -TeamProject "__TeamProject__" -TestEnvironment "__TestEnvironment__" -BuildDirectory "__BuildDirectory__"
Change the component in the template to use the new tool created, instead of provided “MTM Automated Tests Manager”.image
*******************************************************************************************************
Error 02:
If MTM (Microsoft test Manager)  not available in the deployment server below error occurs.“ERROR: Unable to locate C:\RMT\RM\T\RM\XX-MTM-Test\IDE\TCM.exe”image
To Resolve:
It is mandatory to have MTM(Microsoft test Manager) installed on the server that is initiating the tests. For this purpose separate machine is setup with deployment agent and it is installed with Visual Studio Test Professional 2013. It is not recommended to install Visual Studio in the target deployment server (DevInt/QA/UAT servers should be similar to Production, without having Visual Studio in them). Better option is to keep a separate machine attached to each environment to trigger tests after deployment.image
image
This is used in the Release template to execute tests after deployment.image
*******************************************************************************************************
Error 03:
With new tool test execution failed with below error.
“TF30063: You are not authorized to access http://yourtfs:8080/tfs/collection.” image
To Resolve:
Add the deployment agent user configured in test initiating machine, to the Test Service Users in the relevant project collection.image
*******************************************************************************************************
Error 04:
After fixing all above issues, tests initiated after the deployment with release template. image
This time reading results fails with “A Visual Studio testing sku must be installed to use this command.”image
To Resolve:
As discussed in this forum thread only working solution was to install “Visual Studio Ultimate (2013)” in the machine which is acting as deployment agent, triggering the tests using the component in the release template.
*******************************************************************************************************
With all above fixed test were executed successfully and results were shown in the tool log.image image

Monday, 22 July 2013

MTM - Enable Screen Capture for Testing

There is build in screen capture capability coming with MTM/VS 2012. It is another cool feature giving great input for the developers when they try to reproduce the bugs. Simply you do not have to complain as developers, that I cannot reproduce in my machine, because I am not sure what the QA has done. Now you can see each of the actions QA performed for testing.

Lets look at how to enable the screen capturing in MTM (Microsoft Test Manager).

First you have to open MTM and connect to a test plan.





Then go to plan properties and create new test settings or you can modify an existing setting


Give a name to settings


Set roles



Go to Data and Diagnostics and enable Screen and Voice Recording



You can set additional options by  clicking on configure


That it and you are done.



Now when you run tests with the test plan screen recording will start automatically.






When you create a bug it captured video will be added to the bug, and the action recording will give more info. as well.



The Bug now has a link to the captured video of the test actions performed.


You can play the video in a media player.







Popular Posts