Fenrir.Core 0.1.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package Fenrir.Core --version 0.1.7
                    
NuGet\Install-Package Fenrir.Core -Version 0.1.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fenrir.Core" Version="0.1.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fenrir.Core" Version="0.1.7" />
                    
Directory.Packages.props
<PackageReference Include="Fenrir.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fenrir.Core --version 0.1.7
                    
#r "nuget: Fenrir.Core, 0.1.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Fenrir.Core@0.1.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fenrir.Core&version=0.1.7
                    
Install as a Cake Addin
#tool nuget:?package=Fenrir.Core&version=0.1.7
                    
Install as a Cake Tool

Fenrir

NuGet NuGet

Purpose

Fenrir is a service testing framework that load tests, stresses, and compares results of micro-services. Requests are generated from data sources (web-service, database, flat file, etc.) or predefined in json following comparable request format. It supports image, json, xml, and text comparison targets. It is meant to be flexible and to be integrated into development pipelines.

Console

Fenrir is packaged as a dotnet console tool. It exposes many of the features the core framework provides.

Prerequisites

dotnet core sdk 2.0.3 or greater

Install

$ dotnet tool install fenrir -g

Usage

Pre-generated Json httpRequest Tree file

$ fenrir request -f ./jsonrequest.json -t 20

Generator Plugin

$ fenrir generator "Plugin Name" -t 20

Simple Load Test

$ fenrir simple "http://your.service.io/some/get" -t 20 -c 200

Console Help

help

Plugins

The console supports plugins that same way the framework does with one caveat, the plugin director is located under the current users home directory in the ".fenrir" sub directory.

+-- ~/.fenrir
|   +--plugins
|      +-- {plugin project dir}
|          +-- {plugin name}.dll

Framework

RequestTreeAgent

At the center of this framework is RequestTreeAgent. Its main function is to take a HttpRequestTree and flattening the tree into sets of parallelizable requests that are then requested at some level of concurrency.

IRequestGenerator

Interface for integrating with Fenrir extension system for 3rd party development of request generators.

Comparison Request Json

Fenrir supports input via the Json httpRequest Tree Schema. This format enables describing http requests in a consumable format.

[
    {
        "pre": [
            {
                "url":"http://www.example.com/preThings",
                "method":"post",
                "payload": {
                    "headers": [
                        {
                            "name": "Content-Type",
                            "value": "application/json"
                        }
                    ],
                    "body": {
                        "what":"thing2"
                    }
                },
                "expectedResult": {
                    "code": 201,
                    "payload": {
                        "headers": [
                            {
                                "name": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "what":"thing2"
                        }
                    }
                }
            }
        ],
        "url":"http://www.example.com/things/123",
        "method":"get",
        "expectedResult": {
            "code": 200,
            "payload": {
                "headers": [
                    {
                        "name": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "body": {
                    "id":"123",
                    "what":"thing"
                }
            }
        }
    }
]

Request Plugins

Fenrir supports a plugin model for generating requests programmatically. Plugins implement the "IRequestGenerator" interface. This interface allows you to extend the functionality of fenrir and dynamically generate request for various scenarios (load testing, service environment comparison, etc.).

    public class TestPlugin : IRequestGenerator
    {
        public Guid Id => Guid.Parse("pre-generated guid");

        public string Name => "Plugin Name";

        public string Description => "Provides a detailed description for console";
        
        public List<Option> Options { get; set; } = new List<Option>
        {
            new Option(new OptionDescription("FirstOption", "1", "option description"))
        };

        public IEnumerable<Request> Run()
        {
            var count = int.Parse(Options[0].Value);
            for(int i = 0; i < count; i++)
            {
                yield return new Request();
            }
        }
    }

Development

dotnet restore
dotnet build

Dependencies

  • dot net core v2.0.3

How to run tests

dotnet test

Contribution guidelines

  • Writing tests
  • Code review
  • Other guidelines

Acknowledgements

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 729 9/24/2020
0.1.18 628 7/21/2020
0.1.17 561 7/21/2020
0.1.16 581 7/21/2020
0.1.15 602 5/23/2020
0.1.14 613 5/22/2020
0.1.13 609 5/7/2020
0.1.12 675 3/30/2020
0.1.9 740 8/5/2019
0.1.7 812 4/23/2019
0.1.6 997 3/5/2019
0.1.4 822 12/8/2018