KiBoards.Xunit
0.2.5
dotnet add package KiBoards.Xunit --version 0.2.5
NuGet\Install-Package KiBoards.Xunit -Version 0.2.5
<PackageReference Include="KiBoards.Xunit" Version="0.2.5" />
<PackageVersion Include="KiBoards.Xunit" Version="0.2.5" />
<PackageReference Include="KiBoards.Xunit" />
paket add KiBoards.Xunit --version 0.2.5
#r "nuget: KiBoards.Xunit, 0.2.5"
#addin nuget:?package=KiBoards.Xunit&version=0.2.5
#tool nuget:?package=KiBoards.Xunit&version=0.2.5
KiBoards
Provides visualization of unit test results using Elasticsearch and Kibana for the xUnit test framework.
Quick Start
In just a few simple steps, you can have your unit test results stored in Elasticsearch and visualized with Kibana dashboards.
Create a new xUnit test project.
Add the KiBoards NuGet package to the project.
Configure the test framework:
- Include the xUnit test framework attribute:
Place this attribute once in your project, right after the[assembly: TestFramework("KiBoards.TestFramework", "KiBoards.Xunit")]
using
statements and before thenamespace
declaration.
- Include the xUnit test framework attribute:
Simple Unit Test Example:
[assembly: TestFramework("KiBoards.TestFramework", "KiBoards.Xunit")] namespace Tests { public class UnitTest1 { [Fact] public void TestSomething() { // Your test logic goes here } } }
Test Results and Dashboard Generation:
- After your tests execute, the results are saved to an Elasticsearch host defined by the
KIB_ELASTICSEARCH_HOST
environment variable. The default is http://localhost:9200. - Specify the
KIB_KIBANA_HOST
environment variable (default ishttp://localhost:5601
) to automatically build Kibana dashboards. Dashboards are created in a separate Kibana space called KiBoards.
- After your tests execute, the results are saved to an Elasticsearch host defined by the
Customizing Your Kibana Space
KiBoards uses a test startup class to create and configure a Kibana space automatically. You can customize this space by setting a few environment variables. The example below demonstrates how to configure your own space by overriding defaults.
Example: Custom Test Startup
using System.Reflection;
using Xunit.Abstractions;
[assembly: KiboardsTestStartup("TestStartup.Startup")]
[assembly: KiBoardsSavedObjects()]
[assembly: TestFramework("KiBoards.TestFramework", "KiBoards.Xunit")]
namespace TestStartup;
public class Startup
{
public Startup(IMessageSink messageSink)
{
// Set a custom variable that will be indexed as "variables.VERSION" into Elasticsearch.
Environment.SetEnvironmentVariable(
"KIB_VAR_VERSION",
Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion
);
// Optionally, configure your own Kibana space by setting these environment variables:
// - KIB_SPACE_ID: Specifies the ID of the Kibana space (default is "kiboards"). Must be all lowercase letters with no spaces.
// - KIB_SPACE_NAME: Human-friendly name for the space (e.g., "My Space")
// - KIB_SPACE_INITIALS: Specifies the initials for the space (default is "Ki")
// - KIB_SPACE_COLOR: The color code for the space badge (default is "#000000")
// - KIB_SPACE_DESCRIPTION: Description of the Kibana space (default is "KiBoards dashboards")
//
// For example, to create a space with ID "myspace", you can set:
// Environment.SetEnvironmentVariable("KIB_SPACE_ID", "myspace");
// Environment.SetEnvironmentVariable("KIB_SPACE_NAME", "My Custom Space");
}
}
Environment Variables and Their Purpose
KiBoards uses several environment variables to configure its connection to Elasticsearch and Kibana, as well as to customize the appearance and behavior of the Kibana space. The table below summarizes these variables:
Variable Name | Default Value | Description |
---|---|---|
KIB_ELASTICSEARCH_HOST |
http://localhost:9200 |
The full URL of your Elasticsearch instance where test results are stored. |
KIB_KIBANA_HOST |
http://localhost:5601 |
The full URL of your Kibana instance used to build dashboards. |
KIB_KIBANA_ACCEPT_ANY_CERT |
false |
If set to "1" or "true" , accepts any SSL certificate (useful for local/test environments with self-signed certificates). |
KIB_SPACE_ID |
kiboards |
The ID of the Kibana space to be created or updated. Must be lowercase, no spaces. |
KIB_SPACE_NAME |
KiBoards |
The display name for the Kibana space (can include spaces and uppercase letters). |
KIB_SPACE_INITIALS |
Ki |
The initials to display on the space badge within Kibana. |
KIB_SPACE_COLOR |
#000000 |
The color code for the space badge in Kibana. |
KIB_SPACE_DESCRIPTION |
KiBoards dashboards |
A brief description of the Kibana space, shown in the Kibana UI. |
KIB_DISABLE_FEATURES |
(not set) | Comma-separated list of Kibana features to disable in the space (e.g., ml,dev_tools,canvas ). |
KIB_DEFAULT_ROUTE |
/app/dashboards |
The default route/path users are directed to when accessing the space. |
KIB_DARK_MODE |
0 |
If set to "1" or "true" , enables dark mode in Kibana for the space. |
How It Works
Kibana Connection and Status Check:
- The system reads
KIB_KIBANA_HOST
to establish a connection with your Kibana instance. - It repeatedly checks the status of Kibana until it confirms that Kibana is “available.”
- The system reads
Kibana Space Creation/Update:
- A Kibana space is created (or updated if it already exists) using the defined environment variables.
- The space ID defaults to
KIB_SPACE_ID
(or"kiboards"
if not set), and additional properties such as name, initials, color, and description are configured via their corresponding variables.
Dashboard Configuration:
- After the space is configured, the system sets a default route (
KIB_DEFAULT_ROUTE
) and applies dark mode settings (KIB_DARK_MODE
) as defined by the environment variables. - Test results and imported saved objects (in
.ndjson
format) are then pushed to the configured space.
- After the space is configured, the system sets a default route (
Custom Variables:
- You can also set custom variables (e.g.,
KIB_VAR_VERSION
) which are indexed into Elasticsearch along with your test results.
- You can also set custom variables (e.g.,
By adjusting these environment variables, you can tailor KiBoards’ behavior to fit your specific testing and visualization requirements, including configuring a completely customized Kibana space.
This project was created using JandaBox.
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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.1
- KiBoards.Abstractions (>= 0.1.0)
- NEST (>= 7.17.5)
- xunit (>= 2.9.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on KiBoards.Xunit:
Package | Downloads |
---|---|
KiBoards
KiBoards offers the capability to visualise test cases and test run results in Kibana. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.2.5 | 87 | 5/24/2025 |
0.2.4 | 72 | 5/24/2025 |
0.2.4-main.1 | 30 | 5/24/2025 |
0.2.4-kiboards-management.11 | 105 | 5/22/2025 |
0.2.4-kiboards-management.10 | 102 | 5/22/2025 |
0.2.4-kiboards-management.9 | 106 | 5/21/2025 |
0.2.4-kiboards-management.7 | 106 | 5/18/2025 |
0.2.3 | 122 | 5/18/2025 |
0.2.3-variable-test-run-id.3 | 140 | 5/16/2025 |
0.2.3-ssl-connection.5 | 135 | 5/16/2025 |
0.2.3-ssl-connection.4 | 152 | 5/16/2025 |
0.2.3-ssl-connection.3 | 150 | 5/16/2025 |
0.2.3-ssl-connection.2 | 146 | 5/16/2025 |
0.2.3-ssl-connection.1 | 149 | 5/16/2025 |
0.2.3-main.3 | 59 | 5/18/2025 |
0.2.3-main.1 | 143 | 5/16/2025 |
0.2.2 | 167 | 5/5/2025 |
0.2.1 | 118 | 5/4/2025 |
0.2.0 | 82 | 5/3/2025 |
0.1.3 | 343 | 11/7/2023 |
0.1.2 | 138 | 11/6/2023 |
0.1.1 | 156 | 10/27/2023 |
0.1.0 | 282 | 10/17/2023 |