Test run error from Profiler not same version as JuckMock

5 posts, 0 answers
  1. Andy
    Andy avatar
    3 posts
    Member since:
    Jun 2013

    Posted 12 Mar 2015 Link to this post

    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?
  2. Stefan
    Admin
    Stefan avatar
    198 posts

    Posted 13 Mar 2015 Link to this post

    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.

     
  3. DevCraft R3 2016 release webinar banner
  4. Andy
    Andy avatar
    3 posts
    Member since:
    Jun 2013

    Posted 13 Mar 2015 in reply to Stefan Link to this post

    Hi Stefan, thanks for the reply. Forgive my ignorance, but how do I wire the JustMockStart MSBuild task into my csproj files?
  5. Andy
    Andy avatar
    3 posts
    Member since:
    Jun 2013

    Posted 13 Mar 2015 in reply to Stefan Link to this post

    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
  6. Stefan
    Admin
    Stefan avatar
    198 posts

    Posted 13 Mar 2015 Link to this post

    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.

     
Back to Top
DevCraft R3 2016 release webinar banner