chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
Is it possible to use TypeMock in a environment e.g. on a deployment server for demo purpose?

More exactly: I first develop the UI and all services are mocked. When I deploy the solution to server with no development tools I can't demonstrate the UI because TypeMock won't run.

Is there a way to do so?
Thanks.
Sven
asked by sneumann (720 points)

7 Answers

0 votes
Sven hi

Using typemock on a deployment server is a licnesed feature (we call this "Auto Deploy"). Normally you will need to purchase an Enterprise license for this.

However, our new version (4.0) which will be released very soon (a Beta was released yesterday), includes a 30 days evaluation that will enable you to do so.
The details can be found in our guide under "Installing TypeMock.Net->Auto Deploying TypeMock.NET.

hopes this help
answered by lior (13.2k points)
0 votes
Hi lior,
I did not manage it to work on a deployment server.

- I used the Beta and installed it on the deployment server.
- I executed the MSBuild script as described in "Auto Deploying TypeMock.NET" without any changes except path settings. I did not change any license settings.
- When running MSBuild I get the exception that I need a enterprise license.

What's wrong?
Thanks.
Sven
answered by sneumann (720 points)
0 votes
Sven hi,

I think I mistook your meanning on what a build server is.
I thought that you were trying to run your tests on a Server that has no TypeMock installed on.

According to your last post, I believe that you meant a server with no development tools on (i.e. Visual studio)

If the later is correct you can simply run typemock using TMockRunner.exe application located in the typemock installation dir.
the command line should look something like:
TMockRunner nunit-Console <YourDll>.

Check TypeMock guide under "Running TypeMock.NET" for more information.

Hope this helps
answered by lior (13.2k points)
0 votes
Hi Lior,

yes, that's it!

As documented TMockRunner needs an executable for the program parameter.

But what to do when I have mocked an ASP.NET application which runs using the IIS?

Sven
answered by sneumann (720 points)
0 votes
Sven hi,

I get the feeling that you are not using TypMock as a mocking tool for running Uni-tests, but instead you use TypeMock as a stubbing tool (replace parts of your system which are not ready). Is this correct?

In anycase what you can try is the following:

1) Activate TypeMock continously by setting the following in your server environment:
Cor_Enable_Profiling=0x1
COR_PROFILER={B146457E-9AED-4624-B1E5-968D274416EC}
this activate mocking for all .net which is running on the machine and should catch your ASP code as well.

2) Force a restart of IIS in order for aspnet_wp.exe to picks up these new values

3) run your application

However, depending on your exact implementation, using TypeMock this way will make everything go slower so expect some delays in the loading time.

I hope this will enable you to run the demo,
if possible keep me posted how it went, or if it still doesnt work
answered by lior (13.2k points)
0 votes
Hi Lior,

thanks to you! Now it works the way I want to use it!!!

We are using the TypeMock Version 3.6.1. Does this works with TypeMock Version 4 too?

Of course, we are using TypeMock as mocking tool for our Unit-Tests. But as mentioned in my first post, our Development-Strategy is to develop first gui which accesses Services to retrieve data etc. But the only thing we have from the Services is the contract (or Interface).
So TypeMock provides an excellent Framework to implement fast and easily mock the services. Than the gui can be shown and discussed before having the services in place.

So, again. This is how we use TypeMock (mocking for Unit-Tests and demonstration) and it is very helpful for our Development-Cycle.

Thanks, again.
Sven
answered by sneumann (720 points)
0 votes
Sven hi

Im glad I could help you .

Yes. This works with Version 4.0 as well.

Thank you for the details, its nice to hear of other usages for TypeMock beside using it for Uni-Tests.
answered by lior (13.2k points)
...