Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Bug Report
name: Bug Report
description: Report a bug or unexpected behaviour in NotoriousTest
title: "[Bug] "
labels: ["bug"]
Expand Down Expand Up @@ -49,11 +49,11 @@ body:
attributes:
label: Test framework
options:
- Not applicable
- xUnit
- NUnit
- MSTest
- TUnit
- Not applicable
validations:
required: true

Expand Down
198 changes: 99 additions & 99 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,47 @@
# Changelog
# Changelog

## v2.0.0

### ✨ Features :

- **Complete overhaul of configuration management:**
- **`AsyncConfiguredInfrastructure`** and **`AsyncConfiguredInfrastructure<TConfig>`**: Provides access to the `Configuration` property via an infrastructure.
- **`IConfigurationConsumer`** and **`IConfigurationProducer`**: Used to indicate whether a component consumes or produces configuration.
- **`AsyncConfiguredEnvironment`**: An environment managing the provisioning of a global configuration from configuration infrastructures.
- **`WebApplication`** is now automatically provided with configuration by the `AsyncWebEnvironment`.

For more information, see the [Advanced Functionalities - Configuration](./README.md#configuration) and [Advanced Functionalities - Web](./README.md#web).

## v2.1.0

### ✨ Features

- Added the `AutoReset` property to toggle infrastructure reset on or off.

For more information, see the [Advanced Functionalities - Advanced control over Infrastructure Reset](./README.md#advanced-control-over-infrastructure-resets)

## v2.2.0
## v4.1.0

### ✨ Features

- Introduced `ContextId` to uniquely identify infrastructures. For example, you can name your database with it.
- In standalone mode, `ContextId` will be a random GUID.
- Within an Environment, `ContextId` will be the environment identifier `Environment.EnvironmentId`
- Removal of `IConfigurationProducer` and `IConfigurationConsumer`, as it was not necessary.
- `Order` property is now nullable and thus optional.
- DoggyDog now log when an infrastructure is initialized, reset, or destroyed normally.
- You can now use `testsettings.json` to disable DoggyDog for the entire test project.
```json
{
"Environment": {
"DisableWatchdog": false
}
}
"Watchdog": {
"ManualLaunch": false
}
```

### 🛠 Technical

- Implemented multiple unit tests to enhance reliability.
- Several changes to improve consistency in package usage (naming, methods, etc.).

### 🐛 Bug Fixes

- Fixed a bug where `EnvironmentId` generated a new GUID on every reference.
- Fixed a bug where the configuration was erased when using an object as the configuration in `AsyncConfiguredEnvironment<TConfig>`.

## v2.3.0

### ✨ Features

- **NotoriousTest.TestContainers** is now available as a separate package.
- Provides a simple way to use TestContainers in your tests.
- For more information, see the [Advanced Functionalities - TestContainers](./README.md#testcontainers).
- **NotoriousTest.SqlServer** is now available as a separate package.
- Provide your tests with a SqlServer ready-to-use infrastructure !
- For more information, see the [Advanced Functionalities - SqlServer](./README.md#sql-server).

### 🛠 Technical
- For debugging purpose, the test suite can now wait for DoggyDog to be launched manually.
- Enable this mode by setting `ManualLaunch` to true in the `testsettings.json` file.
```json
{
"Watchdog": {
"ManualLaunch": false
}
}
```

- Simplified management of generic types in the `AsyncConfiguredInfrastructure` and `AsyncConfiguredEnvironment` classes.
By doing this, the environment will set parameters trough User Environment Variables.
Launch DoggyDog with the --from-env flag to read those parameters.

## v2.3.1
## v4.0.2

### 🐛 Bug Fixes

- Fixed a bug in **NotoriousTest.SqlServer** where the `SqlServerContainerAsyncInfrastructure` did not changes the database connection to point to the newly created database.

## v3.0.0

### ✨ Features

- `ConfiguredInfrastructure` and `AsyncConfiguredInfrastructure` are replaced with `IConfigurableInfrastructure` interfaces. Every infrastructures can be marked as configurable just by implementing this interface.

### 🛠 Technical

- Added C4 model architecture schema

## v3.1.0

### ✨ Features
- Fixed a bug where DoggyDog could not resolve shared frameworks assembly, preventing cleaners from being executed.

- Added PostgreSql integration
## v4.0.1

### 🛠 Technical
### 🐛 Bug Fixes

- `GetInfrastructuresAsync` in AsyncEnvironment is no longer Async
- Migrate to slnx
- Extended target frameworks: NotoriousTest now builds for .NET 6, .NET 8, and .NET 9 (previously only .NET 6)
- Fixed a bug where internal packages of NotoriousTest were not available at installation.

## v4.0.0

Expand Down Expand Up @@ -181,45 +141,85 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
- Find them within `NotoriousTest.XUnit`, `NotoriousTest.NUnit`, `NotoriousTest.MSTest` and `NotoriousTest.TUnit` packages.
- New samples for every frameworks are available in the samples folder.

## v4.0.1
## v3.1.0

### 🐛 Bug Fixes
### ✨ Features

- Fixed a bug where internal packages of NotoriousTest were not available at installation.
- Added PostgreSql integration

## v4.0.2
### 🛠 Technical

- `GetInfrastructuresAsync` in AsyncEnvironment is no longer Async
- Migrate to slnx
- Extended target frameworks: NotoriousTest now builds for .NET 6, .NET 8, and .NET 9 (previously only .NET 6)

## v3.0.0

### ✨ Features

- `ConfiguredInfrastructure` and `AsyncConfiguredInfrastructure` are replaced with `IConfigurableInfrastructure` interfaces. Every infrastructures can be marked as configurable just by implementing this interface.

### 🛠 Technical

- Added C4 model architecture schema

## v2.3.1

### 🐛 Bug Fixes

- Fixed a bug where DoggyDog could not resolve shared frameworks assembly, preventing cleaners from being executed.
- Fixed a bug in **NotoriousTest.SqlServer** where the `SqlServerContainerAsyncInfrastructure` did not changes the database connection to point to the newly created database.

## v4.1.0
## v2.3.0

### ✨ Features
- DoggyDog now log when an infrastructure is initialized, reset, or destroyed normally.
- You can now use `testsettings.json` to disable DoggyDog for the entire test project.
```json
{
"Environment": {
"DisableWatchdog": false
}
}
"Watchdog": {
"ManualLaunch": false
}
```

- **NotoriousTest.TestContainers** is now available as a separate package.
- Provides a simple way to use TestContainers in your tests.
- For more information, see the [Advanced Functionalities - TestContainers](./README.md#testcontainers).
- **NotoriousTest.SqlServer** is now available as a separate package.
- Provide your tests with a SqlServer ready-to-use infrastructure !
- For more information, see the [Advanced Functionalities - SqlServer](./README.md#sql-server).

### 🛠 Technical

- For debugging purpose, the test suite can now wait for DoggyDog to be launched manually.
- Enable this mode by setting `ManualLaunch` to true in the `testsettings.json` file.
```json
{
"Watchdog": {
"ManualLaunch": false
}
}
```
- Simplified management of generic types in the `AsyncConfiguredInfrastructure` and `AsyncConfiguredEnvironment` classes.

By doing this, the environment will set parameters trough User Environment Variables.
Launch DoggyDog with the --from-env flag to read those parameters.
## v2.2.0

### ✨ Features

- Introduced `ContextId` to uniquely identify infrastructures. For example, you can name your database with it.
- In standalone mode, `ContextId` will be a random GUID.
- Within an Environment, `ContextId` will be the environment identifier `Environment.EnvironmentId`
- Removal of `IConfigurationProducer` and `IConfigurationConsumer`, as it was not necessary.
- `Order` property is now nullable and thus optional.

### 🛠 Technical

- Implemented multiple unit tests to enhance reliability.
- Several changes to improve consistency in package usage (naming, methods, etc.).

### 🐛 Bug Fixes

- Fixed a bug where `EnvironmentId` generated a new GUID on every reference.
- Fixed a bug where the configuration was erased when using an object as the configuration in `AsyncConfiguredEnvironment<TConfig>`.

## v2.1.0

### ✨ Features

- Added the `AutoReset` property to toggle infrastructure reset on or off.

For more information, see the [Advanced Functionalities - Advanced control over Infrastructure Reset](./README.md#advanced-control-over-infrastructure-resets)

## v2.0.0

### ✨ Features :

- **Complete overhaul of configuration management:**
- **`AsyncConfiguredInfrastructure`** and **`AsyncConfiguredInfrastructure<TConfig>`**: Provides access to the `Configuration` property via an infrastructure.
- **`IConfigurationConsumer`** and **`IConfigurationProducer`**: Used to indicate whether a component consumes or produces configuration.
- **`AsyncConfiguredEnvironment`**: An environment managing the provisioning of a global configuration from configuration infrastructures.
- **`WebApplication`** is now automatically provided with configuration by the `AsyncWebEnvironment`.

For more information, see the [Advanced Functionalities - Configuration](./README.md#configuration) and [Advanced Functionalities - Web](./README.md#web).
2 changes: 1 addition & 1 deletion Documentation/5-architecture.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 🏛️ Architecture Guidelines
# 🏛️ Architecture Guidelines

NotoriousTest gives you three complementary tools: **Infrastructures**, **Extensions**, and **Dependency Injection**.
Each has a distinct responsibility. Keeping them separated makes your test setup readable, reusable, and easy to maintain.
Expand Down
5 changes: 5 additions & 0 deletions NotoriousTest.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<File Path="NotoriousTest/LICENSE.txt" />
<File Path="README.md" />
</Folder>
<Folder Name="/Docs/Templates/">
<File Path=".github/ISSUE_TEMPLATE/bug_report.yml" />
<File Path=".github/ISSUE_TEMPLATE/feature_request.yml" />
<File Path=".github/PULL_REQUEST_TEMPLATE.md" />
</Folder>
<Folder Name="/src/" />
<Folder Name="/src/1. Core/">
<Project Path="DoggyDog/DoggyDog.csproj" Id="8408dd70-9d47-4f50-bab4-bcd86e50bc3d" />
Expand Down
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## ![Logo](./Documentation/Images/NotoriousTest.png)
## ![Logo](./Documentation/Images/NotoriousTest.png)


__Clean, isolated, and maintainable integration testing for .NET__
Expand All @@ -14,6 +14,8 @@ If you plan to use this NuGet package, let me know in the [Tell me if you use th

## Summary
- [Purpose](#purpose)
- [Why should you use Notorious Test ?](#why-should-you-use-notorious-test-)
- [Why should you not use Notorious Test ?](#why-should-you-not-use-notorious-test-)
- [Hello World](#hello-world)
- [Setup](#setup)
- [Define a Basic Infrastructure](#define-a-basic-infrastructure)
Expand All @@ -29,10 +31,8 @@ If you plan to use this NuGet package, let me know in the [Tell me if you use th

## Purpose

Have you ever had to write and rewrite boilerplate code to set up a database, reset data between each test, or tear down containers?
All that setup required to keep your integration tests fully isolated, and ensure their maintainability, reproducibility, and efficiency.

**NotoriousTest** removes the need to build all of that yourself.
Notorious Test is a testing framework designed to simplify the setup and management of integration tests in .NET applications.
It provides a structured way to define and manage test environments, allowing developers to focus on writing tests rather than dealing with the complexities of infrastructure setup and teardown.

The concept is simple:

Expand All @@ -43,6 +43,29 @@ The concept is simple:
**NotoriousTest** will automatically manage the **lifecycle of your infrastructures.**
Even after the tests have crashed unexpectedly, thanks to the DoggyDog 🐶.

## Why should you use Notorious Test ?

Notorious Test, as every software programming tool, is not made for everyone. It is designed to solve a specific problem, and if you don't have that problem, it may not be the right tool for you.
Notorious Test is made for you if :

- You have a Platform Engineering team, Dev Experience team, that could setup shared infrastructures for your needs and share them as a company framework.
- You are working on code base that handle multiple external dependencies (databases, APIs, message buses, etc.).
- And therefore, your application require a lot of infrastructure configuration (e.g. appsettings.json)
- You want to setup integration test as fast as possible, with a focus on writing tests rather than writing boilerplate code to setup and teardown your environment.
- You are working on a large team and want to have a consistent and maintainable approach to integration testing.
- Your integration tests are not isolated by design (such as multi-tenant applications).
- You can't use Docker (and therefore TestContainers) in your environment, but still want to have a mecanism that clean your environment after a unexpected crash.

If 2 or more of these points apply to you, Notorious Test is probably a good fit for your project.

## Why should you not use Notorious Test ?

- Your application is a small project that doesn't have a lot of external dependencies.
- Integration Tests are not a priority for your project, and you prefer to focus on unit tests or manual testing.
- You don't want to have a dependency on a third-party library for your testing framework.
- TestContainers may be sufficient to all you needs.
- You prefer to mock your dependencies rather than using real ones in your tests.

## Hello World

## Setup
Expand Down
Loading