This is a migrated thread and some comments may be shown as answers.

Unit Tests Failing In MsBuild on TFS 2010

1 Answer 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 13 Jan 2015, 02:20 PM
Hello,

I have unit tests that are working fine locally in Visual Studio 2013, but when the build runs on TFS and attempts to run the Unit Tests it fails with the following:

Test method WingsServicesTests.Unit.LoanIntegrationServiceTests.AddressNeedsUpdating_GetSingleValueFromField threw exception:
Telerik.JustMock.Core.ElevatedMockingException: Cannot mock 'Boolean IsHostUp()'. The profiler must be enabled to mock, arrange or execute the specified target

I searched the forums and found referneces to this article: http://www.telerik.com/help/justmock/integration-msbuild-tasks.html

I was not sure where the items referenced in that article should be placed, so I put them in all 3 project files in the solution, including the test project, but it still doesn't work.I have set both "Perform Code Analysis" and "Analyze Test Impact" to false in the build definition, thinking that those might be the problem if they try to do code coverage.Any help would be appreciated.

Thanks,
Andrew

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 15 Jan 2015, 02:59 PM
Hello Andrew,

If you are using the TFS code activity workflow for configuring your build process, you will need to follow the steps in this article.

If you are directly executing MS Build tasks in order to build your project and then run the tests, you will need to add the JustMockStart and JustMockStop tasks in your MSBuild targets.

I hope this helps. Please, let me know if you need further assistance.

Regards,
Kaloyan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Andrew
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or