Is this the same as Mock4Net? #21

Closed
opened 2025-12-29 14:21:05 +01:00 by adam · 11 comments
Owner

Originally created by @phillee007 on GitHub (Jan 31, 2017).

Originally assigned to: @StefH on GitHub.

Hi there,

I was about to start my own project for a .Net version of WireMock when I found your repo. However, I also saw the Mock4Net project which looks much the same. Is yours a newer version of that, or is it just using some of the same code and enhancing it?

Essentially - should I use WireMock.Net or Mock4Net?

Thanks,
Phil

Originally created by @phillee007 on GitHub (Jan 31, 2017). Originally assigned to: @StefH on GitHub. Hi there, I was about to start my own project for a .Net version of WireMock when I found your repo. However, I also saw the Mock4Net project which looks much the same. Is yours a newer version of that, or is it just using some of the same code and enhancing it? Essentially - should I use WireMock.Net or Mock4Net? Thanks, Phil
adam added the question label 2025-12-29 14:21:05 +01:00
adam closed this issue 2025-12-29 14:21:05 +01:00
Author
Owner

@StefH commented on GitHub (Jan 31, 2017):

Hello @phillee007 ,

You should use this project.

This project is based on Mock4Net, however a lot of new functionality has been added.

Currently I'm working to on the Admin-Interface, when that's in good shape, I will create a new NuGet.

In the meantime, maybe you can do some testing and help me developing certain features?

@StefH commented on GitHub (Jan 31, 2017): Hello @phillee007 , You should use this project. This project is based on Mock4Net, however a lot of new functionality has been added. Currently I'm working to on the Admin-Interface, when that's in good shape, I will create a new NuGet. In the meantime, maybe you can do some testing and help me developing certain features?
Author
Owner

@phillee007 commented on GitHub (Jan 31, 2017):

Thanks for the quick reply. I would be happy to give it a go and see how it performs. Good timing on starting this project - it's a common need I've seen before for .Net projects!

The main thing I envision us using it for (in the short term) is to start the standalone server and use it as part of an automation UI test suite, which would test our ui that relies on canned backend services being preconfigured. E.g.

  • Start the test run
  • Start the standalone server
  • Each test would upload json stubs to the standalone server http endpoint, then do it's UI test steps
  • When the UI made calls to the backend (configured to point to the wiremock standalone endpoint) it would receive the canned results.
  • Kill the standalone server at the end of the test run

We would be using it to stub both soapui/xml request/response,, and rest-style json request/response, so provided that it has support for url and request matching and we can upload our json stubs to the standalone server, and hopefully it will all work! It will have to work with ssl too.

I was personally going to write my own self-hosted web api project to do this, but it would be quicker to give this a go first and see if it has the features I need. Alternatively, running Wiremock in the jre would be another step too, but I doubt we'll need that...

@phillee007 commented on GitHub (Jan 31, 2017): Thanks for the quick reply. I would be happy to give it a go and see how it performs. Good timing on starting this project - it's a common need I've seen before for .Net projects! The main thing I envision us using it for (in the short term) is to start the standalone server and use it as part of an automation UI test suite, which would test our ui that relies on canned backend services being preconfigured. E.g. - Start the test run - Start the standalone server - Each test would upload json stubs to the standalone server http endpoint, then do it's UI test steps - When the UI made calls to the backend (configured to point to the wiremock standalone endpoint) it would receive the canned results. - Kill the standalone server at the end of the test run We would be using it to stub both soapui/xml request/response,, and rest-style json request/response, so provided that it has support for url and request matching and we can upload our json stubs to the standalone server, and hopefully it will all work! It will have to work with ssl too. I was personally going to write my own self-hosted web api project to do this, but it would be quicker to give this a go first and see if it has the features I need. Alternatively, running Wiremock in the jre would be another step too, but I doubt we'll need that...
Author
Owner

@StefH commented on GitHub (Jan 31, 2017):

This is indeed exactly the way you can use it. With one minor difference, starting the standalone server and stopping it is not needed, it's easier to deploy this standalone server somewhere and keep it running, and just clean the requests / mappings if needed before each test.

@StefH commented on GitHub (Jan 31, 2017): This is indeed exactly the way you can use it. With one minor difference, starting the standalone server and stopping it is not needed, it's easier to deploy this standalone server somewhere and keep it running, and just clean the requests / mappings if needed before each test.
Author
Owner

@phillee007 commented on GitHub (Jan 31, 2017):

That sounds reasonable. Perhaps at the beginning of the test run we could
fire a request to verify that the mockserver is running, and only start it
if needed? Or we could just fail that test run and someone could manually
start the mockserver :-)

I agree that cleaning the mock request/response state would be easier (and
probably faster) than stopping/starting each time.

On 31/01/2017 11:51 PM, "Stef Heyenrath" notifications@github.com wrote:

This is indeed exactly the way you can use it. With one minor difference,
starting the standalone server and stopping it is not needed, it's easier
to deploy this standalone server somewhere and keep it running, and just
clean the requests / mappings if needed before each test.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/StefH/WireMock.Net/issues/19#issuecomment-276332400,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEEFowrNWpj6kdJs0GTwDXV8ulOpXBBRks5rXxI1gaJpZM4LyO8P
.

@phillee007 commented on GitHub (Jan 31, 2017): That sounds reasonable. Perhaps at the beginning of the test run we could fire a request to verify that the mockserver is running, and only start it if needed? Or we could just fail that test run and someone could manually start the mockserver :-) I agree that cleaning the mock request/response state would be easier (and probably faster) than stopping/starting each time. On 31/01/2017 11:51 PM, "Stef Heyenrath" <notifications@github.com> wrote: > This is indeed exactly the way you can use it. With one minor difference, > starting the standalone server and stopping it is not needed, it's easier > to deploy this standalone server somewhere and keep it running, and just > clean the requests / mappings if needed before each test. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/StefH/WireMock.Net/issues/19#issuecomment-276332400>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AEEFowrNWpj6kdJs0GTwDXV8ulOpXBBRks5rXxI1gaJpZM4LyO8P> > . >
Author
Owner

@StefH commented on GitHub (Feb 1, 2017):

In some time I will release a new NuGet with more supported Admin-Interfaces.

Or do you have any more questions or change requests ? *You are actually the first user, so ll feedback is useful.)

@StefH commented on GitHub (Feb 1, 2017): In some time I will release a new NuGet with more supported Admin-Interfaces. Or do you have any more questions or change requests ? *You are actually the first user, so ll feedback is useful.)
Author
Owner

@phillee007 commented on GitHub (Feb 1, 2017):

I'm not sure we'll use the admin interface straight away unless we need to
debug failing tests (although this may turn out yo be important if there
are issues).

The main use will be stubbing soap responses using url and xpath request
matching, over https. I.might not actually use it properly for a few weeks,
but will let you know how it goes once our first test is up & running :-)

On 2/02/2017 2:21 AM, "Stef Heyenrath" notifications@github.com wrote:

In some time I will release a new NuGet with more supported
Admin-Interfaces.

Or do you have any more questions or change requests ? *You are actually
the first user, so ll feedback is useful.)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/StefH/WireMock.Net/issues/19#issuecomment-276655406,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEEFozapXKXcmSViJw7RS43cq8CMfWCwks5rYIa_gaJpZM4LyO8P
.

@phillee007 commented on GitHub (Feb 1, 2017): I'm not sure we'll use the admin interface straight away unless we need to debug failing tests (although this may turn out yo be important if there are issues). The main use will be stubbing soap responses using url and xpath request matching, over https. I.might not actually use it properly for a few weeks, but will let you know how it goes once our first test is up & running :-) On 2/02/2017 2:21 AM, "Stef Heyenrath" <notifications@github.com> wrote: > In some time I will release a new NuGet with more supported > Admin-Interfaces. > > Or do you have any more questions or change requests ? *You are actually > the first user, so ll feedback is useful.) > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/StefH/WireMock.Net/issues/19#issuecomment-276655406>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AEEFozapXKXcmSViJw7RS43cq8CMfWCwks5rYIa_gaJpZM4LyO8P> > . >
Author
Owner

@StefH commented on GitHub (Feb 1, 2017):

Ah ok. You want to start a mock server which hardcodes the responses?

Actually I think that the http rest admin interface really makes the wiremock powerfull anf flexible for testing.

@StefH commented on GitHub (Feb 1, 2017): Ah ok. You want to start a mock server which hardcodes the responses? Actually I think that the http rest admin interface really makes the wiremock powerfull anf flexible for testing.
Author
Owner

@phillee007 commented on GitHub (Feb 1, 2017):

Cool.

Stub responses would be uploaded over http during the test execution, so
each test can define the stubs it needs. Is that part of the admin
interface? If so, then yes we'd definitely use it :-)

On 2/02/2017 8:59 AM, "Stef Heyenrath" notifications@github.com wrote:

Ah ok. You want to start a mock server which hardcodes the responses?

Actually I think that the http rest admin interface really makes the
wiremock powerfull anf flexible for testing.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/StefH/WireMock.Net/issues/19#issuecomment-276764859,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEEFo5Rnxioz5pSqtwrIjJEYhmIvc_0Iks5rYOQ9gaJpZM4LyO8P
.

@phillee007 commented on GitHub (Feb 1, 2017): Cool. Stub responses would be uploaded over http during the test execution, so each test can define the stubs it needs. Is that part of the admin interface? If so, then yes we'd definitely use it :-) On 2/02/2017 8:59 AM, "Stef Heyenrath" <notifications@github.com> wrote: > Ah ok. You want to start a mock server which hardcodes the responses? > > Actually I think that the http rest admin interface really makes the > wiremock powerfull anf flexible for testing. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/StefH/WireMock.Net/issues/19#issuecomment-276764859>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AEEFo5Rnxioz5pSqtwrIjJEYhmIvc_0Iks5rYOQ9gaJpZM4LyO8P> > . >
Author
Owner

@StefH commented on GitHub (Feb 1, 2017):

Correct. The admin interface is really usefull in automatic test scenarios.

For more detail on the admin interface, take a look at the wiki from this project here. (if you need a bit more, check also the original documentation on the java wiremock.org website

@StefH commented on GitHub (Feb 1, 2017): Correct. The admin interface is really usefull in automatic test scenarios. For more detail on the admin interface, take a look at the wiki from this project here. (if you need a bit more, check also the original documentation on the java wiremock.org website
Author
Owner

@StefH commented on GitHub (Feb 5, 2017):

Are you currently using the code from this project, or the NuGet ?

@StefH commented on GitHub (Feb 5, 2017): Are you currently using the code from this project, or the NuGet ?
Author
Owner

@phillee007 commented on GitHub (Feb 5, 2017):

I downloaded the project from github :-) I had a go at starting the example
console app over http/https & it works well

On 5/02/2017 11:37 PM, "Stef Heyenrath" notifications@github.com wrote:

Are you currently using the code from this project, or the NuGet ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/StefH/WireMock.Net/issues/19#issuecomment-277510367,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEEFo0sR29-o4idnEEydr0R2pT_rKsj6ks5rZaaEgaJpZM4LyO8P
.

@phillee007 commented on GitHub (Feb 5, 2017): I downloaded the project from github :-) I had a go at starting the example console app over http/https & it works well On 5/02/2017 11:37 PM, "Stef Heyenrath" <notifications@github.com> wrote: > Are you currently using the code from this project, or the NuGet ? > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/StefH/WireMock.Net/issues/19#issuecomment-277510367>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AEEFo0sR29-o4idnEEydr0R2pT_rKsj6ks5rZaaEgaJpZM4LyO8P> > . >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#21