We have several Silverlight module tests that successfully run in VS 2010. I am using the Silverlight unit test environment ( http://silverlight.codeplex.com ).
Example:
[TestMethod]
[Asynchronous]
[TimeoutAttribute(60100)]
public void LoadOrgStructure()
{
_loadOrgStructureStart = getCurrentTicks();
OrgStructureMemberDAC.Instance.GetOrganisationStructure(new EventHandler<GetOrganisationStructureOrgStructureMemberVOCompletedEventArgs>(delegate(object s, GetOrganisationStructureOrgStructureMemberVOCompletedEventArgs e)
{
if (getElapsedMilliseconds(_loadOrgStructureStart) <= 60000)
{
if (e.Error != null)
{
throw e.Error;
}
else if (e.Result.Error != null)
{
throw new AssertFailedException(e.Result.Error.Message);
}
else
{
Assert.IsNotNull(e.Result.Result);
Assert.IsTrue(e.Result.Result.Count > 0);
Assert.IsNotNull(e.Result.Result[0].ChildMemberLstObj);
Assert.IsTrue(e.Result.Result[0].ChildMemberLstObj.Count > 0);
EnqueueTestComplete();
}
}
}));
}
When I run this test in VS 2010, the browser window is open and the test runs successfully. Now I want to run such asynchronous tests with my TFS-2010-Build. But I don’t know how to start this build test. Is it possible?
Herbi source
share