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

Test run error from Profiler not same version as JuckMock

4 Answers 128 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 12 Mar 2015, 02:16 PM
I've lately started receiving errors from my test runs stating (I think) that I need to upgrade the version of the profiler running on my build server. This is following an update I make to the JustMock version I use in my test projects (version details are in the below error message).

1) Test Error : CustomerExperience.Domain.Test.Integration.MailMergeTest.DateFormattingIsSuccessful
Telerik.JustMock.Core.MockException : Telerik.JustMock.dll version: 2015.1.224.3
Telerik.CodeWeaver.Profiler.dll version: 2014.3.1021.2
Register the updated Telerik.CodeWeaver.Profiler.dll.
at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.ResolveRepository(UnresolvedContextBehavior unresolvedContextBehavior)
at Telerik.JustMock.Core.Context.MockingContext.ResolveRepository(UnresolvedContextBehavior unresolvedContextBehavior)
at Telerik.JustMock.Mock.<Create>b__92[T]()
at Telerik.JustMock.Core.ProfilerInterceptor.GuardInternal[T](Func`1 guardedAction)
at CustomerExperience.Domain.Test.Integration.MailMergeTest.DateFormattingIsSuccessful() in d:\Program Files (x86)\Jenkins\jobs\Customer Experience\workspace\source\CustomerExperience.Domain.Test\Integration\MailMergeTest.cs:line 50

I could just go ahead and update the profiler on the build server. The issue is that the same server runs tests for several other projects which haven't been updated in the same way that mine has.

Can anyone suggest a fix?

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 Mar 2015, 07:01 AM
Hi Andy,

JustMock supports installation-free elevated mocking. This mode of activation will allow you to commit not only the JustMock assembly, but also the profiler module into your source repository and version them in tandem. Originally this feature was developed for situations where installation was not possible, but it is also well-suited for your case. However, this mode of operation does not support 3rd party profiler integration.

Alternatively, you may set up a second build server for this version of JustMock.

Regards,
Stefan
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.

 
0
Andy
Top achievements
Rank 1
answered on 13 Mar 2015, 08:19 AM
Hi Stefan, thanks for the reply. Forgive my ignorance, but how do I wire the JustMockStart MSBuild task into my csproj files?
0
Andy
Top achievements
Rank 1
answered on 13 Mar 2015, 08:51 AM
Forgot to add to last post... for reference I'm running the profiler from the command line, running nunit-console as a child process, as per http://www.telerik.com/help/justmock/scenarios-running-jm-profiler-outside-visual-studio.html
0
Stefan
Telerik team
answered on 13 Mar 2015, 10:49 AM
Hi Andy,

Since you're using the console runner, you should go through the environment (section "Installation-free integration through the environment"). Basically, you just need to add the following line to your test runner script, somewhere before you start the test run:

SET COR_PROFILER_PATH=C:\full\path\to\Telerik.CodeWeaver.Profiler.dll

Substitute the path above with the appropriate path, as described in the "Prerequisites and Caveats" section.

Regards,
Stefan
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
Andy
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Andy
Top achievements
Rank 1
Share this question
or