Saturday, 10 October 2015

Increase Default Timeout of Copying Test Binaries to Test Client – Allow Release Management to Run Tests with Increased Timeout

Default timeout for downloading test binaries to execute automated tests in a lab environment is 5 minutes. This might not be enough if the test assemblies are high in size, and test client machine is in a different location from the build drop LAN having low bandwidth.
If running via RM server, MTM Test runner, test hangs on active and never get executed.image
trx file opened in Visual Studio Ultimate shows the exact issue.image
Warning    9/25/2015 7:27:10 PM    Warning: Test Run deployment issue: The assembly or module 'Microsoft.Xrm.Sdk.Deployment' directly or indirectly referenced by the test container '\\builddrop\testautomation\xxx.automation.nonui.dll' was not found.   
Error    9/25/2015 7:32:15 PM    Agent vstfs:///LabManagement/TestMachine/36 exceeded deployment timeout period.    vstfs:///LabManagement/TestMachine/36
How to resolve
The testcontroller deploys the test binaries and their dependencies from the build drop location to the test agent machines so that test agent can run them. The timeout for that activity is called deployment timeout.
Test setting should be created and set the deploy time out in the test settings, following instructions here. The command to execute is below.
UpdateTestSettings /collection:http://abc:8080/tfs/DefaultCollection /teamProject:myProject /settingsname:My2_0_App /bucketSize:200 /deploymentTimeout:600000
Next step is providing test settings to the test run via the RM server, MTM Test runner. For this TcmExec.ps1 explained here, has a parameter for test settings.0
To provide this in the RM tool (custom tool created using the TcmExec.ps1 explained here), add a parameter as shown below.image
This will not be applied to existing components created with the RM tool. Update them to have the SettingsName parameter.2 image
This allows the SettingsName to be supplied to the test via Release Management Template.4
Test now executes after successfully downloading the test binaries to the test client.image

No comments: