mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Is this the same as Mock4Net? #21
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@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?
@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.
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...
@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.
@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:
@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.)
@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:
@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.
@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:
@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 5, 2017):
Are you currently using the code from this project, or the NuGet ?
@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: