WireMockInspector 1.0.29
dotnet tool install --global WireMockInspector --version 1.0.29
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local WireMockInspector --version 1.0.29
#tool dotnet:?package=WireMockInspector&version=1.0.29
nuke :add-package WireMockInspector --version 1.0.29
WireMockInspector
WireMockInspect is a cross-platform UI app that facilitates WireMock troubleshooting.
How to install
WireMockInspector is distributed as dotnet tool
so it can be easily installed on Windows/MacOS/Linux
with the following command
dotnet tool install WireMockInspector --global --no-cache --ignore-failed-sources
After installation, you can easily run the app by executing wiremockinspector
command.
How to update
dotnet tool update WireMockInspector --global --no-cache --ignore-failed-sources
Features
- Presents a list of requests received by
WireMock
server. - Combines request data with associated mapping.
- Presents a list of all available mappings with the definition
- Generate C# code for defining selected mappings
- WireMockServer settings editor
- Presents a list of all available scenarios along the details
- Visualise Scenario flow and current state
Using WireMockInspector from test code
Install WireMockInspector dotnet tool
dotnet tool install WireMockInspector --global --no-cache --ignore-failed-sources
Install
WireMock.Net.Extensions.WireMockInspector
nuget packet to your test projectExample usage in the code
using var wireMock = WireMockServer.Start(new WireMockServerSettings() { StartAdminInterface = true, Port = 9095 }); // Call Inspect() run WireMockInspect and attach it to the current WireMockServer instance wireMock.Inspect();
If you don't have an access to WireMockServer instance then you can call the extension method directly:
WireMockServerExtensions.Inspect("http://localhost:9095");
Code generator
WireMockInspect offers two methods for generating C# code to create mappings, which is particularly useful when used in conjunction with the WireMock.NET proxy feature. The first method is accessible via the 'Code' tab for a selected mapping. Here, you can view the code provided by the endpoint http://localhost:9095/__admin/mappings/code/MAPPING_GUID:
The second method involves using the 'Code' tab for a selected request.
This approach employs a completely different mechanism for code generation. You can customize the generated code by using a custom liquid template:
- Download the default template and save it to your directory at
%LOCALAPPDATA%\WireMockInspector\templates\
. - Rename the file appropiately to reflect its purpose
- Modify the template according to your requirements.
- In the WireMockInspector, under the 'Show Options' section on the 'Code' tab, select your customized template from combo box.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
1.0.29 | 1,099 | 7/31/2024 |
1.0.28 | 168 | 7/31/2024 |
1.0.27 | 160 | 7/31/2024 |
1.0.26 | 272 | 7/11/2024 |
1.0.25 | 898 | 1/22/2024 |
1.0.24 | 244 | 1/21/2024 |
1.0.23 | 261 | 1/18/2024 |
1.0.22 | 508 | 1/6/2024 |
1.0.21 | 496 | 12/17/2023 |
1.0.20 | 799 | 11/18/2023 |
1.0.19 | 432 | 11/3/2023 |
1.0.18 | 725 | 7/27/2023 |
1.0.17 | 535 | 7/26/2023 |
1.0.16 | 583 | 7/24/2023 |
1.0.15 | 494 | 7/23/2023 |
1.0.14 | 509 | 7/22/2023 |
1.0.13 | 531 | 7/15/2023 |
1.0.12 | 602 | 5/20/2023 |
1.0.11 | 383 | 5/15/2023 |
1.0.10 | 351 | 5/11/2023 |
1.0.9 | 453 | 5/9/2023 |
1.0.8 | 613 | 4/22/2023 |
1.0.7 | 474 | 4/21/2023 |
1.0.6 | 530 | 4/19/2023 |
1.0.5 | 400 | 4/16/2023 |
1.0.0 | 497 | 5/6/2023 |