Fenrir.Core
0.1.7
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
<PackageReference Include="Fenrir.Core" Version="0.1.7" />
<PackageVersion Include="Fenrir.Core" Version="0.1.7" />
<PackageReference Include="Fenrir.Core" />
paket add Fenrir.Core --version 0.1.7
#r "nuget: Fenrir.Core, 0.1.7"
#:package Fenrir.Core@0.1.7
#addin nuget:?package=Fenrir.Core&version=0.1.7
#tool nuget:?package=Fenrir.Core&version=0.1.7
Fenrir
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
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 | Versions 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. |
-
.NETStandard 2.0
- JsonDiffPatch.Net (>= 2.1.0)
- Microsoft.CSharp (>= 4.5.0)
- System.Threading.Tasks.Dataflow (>= 4.9.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.