WireMockInspector 1.0.29

dotnet tool install --global WireMockInspector --version 1.0.29                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local WireMockInspector --version 1.0.29                
This package contains a .NET tool you can call from the shell/command line.
#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.

alternate text is missing from this package README image

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

alternate text is missing from this package README image

Using WireMockInspector from test code

  1. Install WireMockInspector dotnet tool

     dotnet tool install WireMockInspector --global --no-cache --ignore-failed-sources
    
  2. Install WireMock.Net.Extensions.WireMockInspector nuget packet to your test project

  3. Example 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:

alternate text is missing from this package README image

The second method involves using the 'Code' tab for a selected request.

alternate text is missing from this package README image

This approach employs a completely different mechanism for code generation. You can customize the generated code by using a custom liquid template:

  1. Download the default template and save it to your directory at %LOCALAPPDATA%\WireMockInspector\templates\ .
  2. Rename the file appropiately to reflect its purpose
  3. Modify the template according to your requirements.
  4. In the WireMockInspector, under the 'Show Options' section on the 'Code' tab, select your customized template from combo box.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.29 826 7/31/2024
1.0.28 142 7/31/2024
1.0.27 142 7/31/2024
1.0.26 222 7/11/2024
1.0.25 872 1/22/2024
1.0.24 218 1/21/2024
1.0.23 251 1/18/2024
1.0.22 482 1/6/2024
1.0.21 485 12/17/2023
1.0.20 781 11/18/2023
1.0.19 422 11/3/2023
1.0.18 706 7/27/2023
1.0.17 525 7/26/2023
1.0.16 572 7/24/2023
1.0.15 476 7/23/2023
1.0.14 498 7/22/2023
1.0.13 513 7/15/2023
1.0.12 592 5/20/2023
1.0.11 372 5/15/2023
1.0.10 341 5/11/2023
1.0.9 443 5/9/2023
1.0.8 595 4/22/2023
1.0.7 464 4/21/2023
1.0.6 520 4/19/2023
1.0.5 391 4/16/2023
1.0.0 479 5/6/2023