Skip to content
Alexander Held edited this page Dec 25, 2019 · 2 revisions

Start the MockServer

You can choose between:

  1. Start the MockServer right inside your unit tests.
  2. Run the MockServer as a docker container on your machine in the background

1. Start the MockServer right inside your unit tests.

Install the nuget package NinjaTools.FluentMockServer.TestContainers and see XUnit Integration

dotnet add package NinjaTools.FluentMockServer.TestContainers
Install-Package NinjaTools.FluentMockServer.TestContainers

2. Run the MockServer as a docker container on your machine in the background

To run the mockserver in it's default configuration please run following command.

docker run -d --rm -P mockserver/mockserver

To run the mockserver in it's default configuration please run following command.

docker run -d --rm <HostPort>:1080  mockserver/mockserver

For additional options please follow the instruction on http://mock-server.com/where/docker.html