We are moving to Visual Studio Team Services online and I am having trouble getting JustMock to work in the builds. I am getting the error "The profiler must be enabled to mock, arrange or execute the specified target". After a lot of Googling and trial and error I edited the build definition we are using per the instructions found here : http://www.telerik.com/help/justmock/integration-tfs-2013.html
However, this is still not working. I don't think VSTS uses the XAML build definitions anymore, and I cannot force the build to use them.
Is there any way to get JustMock and the profiler to work with VSTS? This is a big issue for us before I we purchase the license for the next version of JustMock. We've invested a lot into the unit tests and not having Continuous Integration is not an option.
Thanks,
Andrew
16 Answers, 1 is accepted
We don't have official support for Visual Studio Team Services. We have clients who managed to make it work using a dedicated runner host. That way you could regsvr32 the profiler.
Unfortunately we couldn't make that work for the shared host runner. I would assume that is a security issue, but we haven't received confirmation from Microsoft. Feel free to give it a try, though.
Regards,
Svetlozar
Telerik by Progress

I am really sorry, but we can't give you a time frame for official Visual Studio Team Services support.
Regards,
Svetlozar
Telerik by Progress

Unfortunately we do not have support for Visual Studio Team Services, yet.
Regards,
Kamen Ivanov
Progress Telerik

Indeed JustMock now supports VSTS. We have released extensions which wraps the VSTest task and are a direct replacement of VSTest task. They are available as part of the JustMock installation or can be downloaded from the VSTS marketplace.
Please have in mind that the build agent will need to be on premises. This limitation is because the JustMock profiler should run as administrator and such permission is not available on shared host.
Regards,
Mihail
Progress Telerik

Hi Mihail,
have your developers tested this on some kind of fresh & clean local build server?
I get the error below. As mentioned in "https://github.com/Microsoft/vsts-task-lib/issues/274" this is a deployment-error of the VSTS-Extension and nothing to fix on the client-side.
2018-02-16T09:18:37.3452497Z module.js:471
2018-02-16T09:18:37.3452497Z throw err;
2018-02-16T09:18:37.3452497Z ^
2018-02-16T09:18:37.3452497Z
2018-02-16T09:18:37.3452497Z Error: Cannot find module 'vsts-task-lib/task'
2018-02-16T09:18:37.3452497Z at Function.Module._resolveFilename (module.js:469:15)
2018-02-16T09:18:37.3452497Z at Function.Module._load (module.js:417:25)
2018-02-16T09:18:37.3452497Z at Module.require (module.js:497:17)
2018-02-16T09:18:37.3452497Z at require (internal/module.js:20:19)
2018-02-16T09:18:37.3452497Z at Object.<anonymous> (C:\_vsw\_tasks\JustMockVSTest_dfc18792-8901-4297-a4de-6edef6796070\2.0.0\runvstest.js:2:12)
2018-02-16T09:18:37.3452497Z at Module._compile (module.js:570:32)
2018-02-16T09:18:37.3452497Z at Object.Module._extensions..js (module.js:579:10)
2018-02-16T09:18:37.3452497Z at Module.load (module.js:487:32)
2018-02-16T09:18:37.3452497Z at tryModuleLoad (module.js:446:12)
2018-02-16T09:18:37.3452497Z at Function.Module._load (module.js:438:3)
2018-02-16T09:18:37.3452497Z ##[error]Exit code 1 returned from process: file name 'C:\VS_Build_Agent\agent\externals\node\bin\node.exe', arguments '"C:\_vsw\_tasks\JustMockVSTest_dfc18792-8901-4297-a4de-6edef6796070\2.0.0\runvstest.js"'.
2018-02-16T09:18:37.3452497Z ##[section]Finishing: JustMock VSTest - testAssemblies
Regards, Daniel
Can you provide more information on the setup? Like did you install the TFS on the local build server? Which version? Or you have used VSTS with an agent on that local build server?
Also, which extension have you installed as there are two extensions for supporting different types of TFS?
Any additional information you think is relevant is welcomed.
Regards,
Mihail
Progress Telerik

Hi Mihail,
I am using VSTS with a local agent and therefore Extension #2 as this is the only one which can be installed on VSTS.
I can get the extension running if I also install node.js with npm and adding an "npm install"-task in frontend of the JustMock-Test-Task in the build definition, pointing to the directory "C:\_vsw\_tasks\JustMockVSTest_dfc18792-8901-4297-a4de-6edef6796070\2.0.0".
But that should definitely not be necessary as it is in the vendors responsibilty to ship all necessary packages within their extension, as stated in my link in my previous post.
Regards, Daniel
Thank you for the information.
We are already working on a fix. Hopefully this weak we will update the extension.
Regards,
Mihail
Progress Telerik
The extension in the Visual Studio Team Services marketplace is fixed. Thank you for your collaboration.
Regards,
Mihail
Progress Telerik

Hi
Are there any plans for JustMock to work on the hosted VSTS.
Running an internal or dedicated build server is not an option for us.
We need to decide whether or not we replace all our unit tests with another mocking framework.
Thanks
Nick
As the JustMock profiler needs to be registered into the Windows registry we need to research if such access permissions are available in hosted VSTS environment. We already have this logged as a feature request into our internal backlog. I have created a public item for this feature request in our feedback portal as well. This way you could subscribe to the item and receive status updates. Once we start working on the task the item will be updated.
Regarding when this feature can be expected, I can't provide you an exact time frame as it is not scheduled yet.
Could you share with us some approximate date for when you would like to migrate to hosted VSTS? If you consider this an internal information you could open a support ticket and share the information there.
Regards,
Mihail
Progress Telerik

Hello,
We will need this feature to. We need to run Telerik in a Hosted Environment.
Regards
I am happy to hear that you also have an interest in this feature. Could I ask you to like the feature request in our feedback portal? This way you will help us better prioritize our backlog.
You could also subscribe to the feature request, this way you will receive updates when we start working on it.
Regards,
Mihail
Progress Telerik