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

Unit Tests Failing In MsBuild on TFS 2012

3 Answers 107 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 03 Jun 2015, 08:40 AM

Like the user in this thread I'm having a problem getting my unit tests running in TFS. In my case, I'm running TFS 2012. However, having read through the thread I assumed that the process to fix it would be the same.

A little more reading and I found this documentation article and I followed the steps shown there. In my case I followed the "Steps for integrating JustMock in updated build configurations (DefaultTemplate.11.1.xaml)".

I set up the Build Controller to get the required assemblies (jm01.png)

I modified the build template (jm02.png)

After checking in the modified template I ran my build. It failed.

"Test method Genesis.Service.Implementation.Tests.Digests.WeeklyDigestFixture.ShouldCallAllSections threw exception: 
Telerik.JustMock.Core.ElevatedMockingException: Cannot mock 'Int32 get_DigestsToBeIncludedOn()'. The profiler must be enabled to mock, arrange or execute the specified target.
"

 Thinking I must have missed a step and that the profiler wasn't working I investigated further.

jm03.png and jm04.png, however, suggest that I didn't.

So why are my tests failing?

3 Answers, 1 is accepted

Sort by
0
Stuart Hemming
Top achievements
Rank 2
answered on 03 Jun 2015, 09:42 AM
Just FYI, I have just upgraded both JustMock and the workflow DLLs to version 2015.2.512.4 and got the same result.
0
Accepted
Stefan
Telerik team
answered on 04 Jun 2015, 09:08 AM
Hi Stuart,

Do you have JustMock installed on the build agent executing the build?

Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Stuart Hemming
Top achievements
Rank 2
answered on 05 Jun 2015, 10:41 AM

Initially, I had just the JustMock.dll on the build server and just one test was failing; the only test using JustMock.

Following your post I've installed the full product on the Build Server and the issue is resolved.

Thx

Tags
General Discussions
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Stuart Hemming
Top achievements
Rank 2
Stefan
Telerik team
Share this question
or