Releases: Notorious-Coding/Notorious-Test
4.1.0
✨ Features
- DoggyDog now log when an infrastructure is initialized, reset, or destroyed normally.
- You can now use
testsettings.jsonto disable DoggyDog for the entire test project.
{
"Environment": {
"DisableWatchdog": false
}
}🛠 Technical
- For debugging purpose, the test suite can now wait for DoggyDog to be launched manually.
- Enable this mode by setting
ManualLaunchto true in thetestsettings.jsonfile.
{
"Watchdog": {
"ManualLaunch": false
}
}By doing this, the environment will set parameters trough User Environment Variables.
Launch DoggyDog with the --from-env flag to read those parameters.
4.0.2 - Bug Fixes
🐛 Bug Fixes
- Fixed a bug where DoggyDog could not resolve shared frameworks assembly, preventing cleaners from being executed.
4.0.1 - Bug Fixes
🐛 Bug Fixes
- Fixed a bug where internal packages of NotoriousTest were not available at installation.
v4.0.0
✨ Core features
DoggyDog 🐶🐶🐶 💥NEW💥
NotoriousTest now has a new mascot, the DoggyDog ! 🐶🐶🐶
DoggyDog is a watchdog that clean infrastructures that may have been left dirty by previous tests,
and make sure that your tests are running in a clean environment.
- Introducing DoggyDog - an executable that clean your infrastructures left behind a test campaign that have been killed unexpectedly.
- DoggyDog use a registry to track all your infrastructures, and execute their cleaner.
- [Cleaner(CleanerType)] attribute to specify the cleaner of your infrastructures.
Infrastructure extensions 💥NEW💥
Infrastructure extensions introduce a composition model for adding behaviors to your infrastructures. Instead of creating specialized subclasses to combine multiple concerns (configuration, database seeding, respawn, etc. )
You register extensions on any infrastructure via EnsureExtension<TExtension>().
Each extension is self-contained, reusable across infrastructures, and hooks into the infrastructure lifecycle through dedicated callbacks such as OnBeforeInitialize.
- Introducing a new concept called infrastructure extension, meant to be used to react to infrastructure setup.
- New interface
IInfrastructureExtension, provide hooks such asOnBeforeInitializeto extends Infrastructure. - Configuration is now handled by extensions classes.
- Use
EnsureExtension<MyExtension>()orEnsureExtension(new MyExtension())to register an extension. - Built-in extensions :
- Core
OutputConfigurationExtension<TOutputConfiguration>: Provide a way to output configuration. Included inInfrastructurebase class.SettingsExtension<TSettings>: Load fromtestsettings.jsonyour infrastructure configuration. Config key default to infrastructure name, and can be override.
- Database
RespawnExtension: Integration of Respawn package to reset databases between test.- Included in every database infrastructures by default.
- Core
Settings 💥NEW💥
- By registering a
SettingsExtension, you can now load settings fromtestsettings.jsonto configure infrastructure. - Automatically loaded from the infrastructure name as config key.
Output configuration 🔧 UPDATED 🔧
- Environments no longer require a global configuration object. Configuration is now propagated automatically through extensions.
- Output configuration is now handled by an extension built-in Infrastructure base class.
- Adding a configuration output will now be made by calling
AddEntry(key, config). - Environment will gather all configuration under all keys and pass to all
IConfigurationConsumerinfrastructures, such asWebApplicationInfrastructure. WebApplicationInfrastructurenow maps configuration entries to appsettings format automatically. Generating the section path from the key and config structure.- e.g.
// Entry: "Example:Test" → { "Host": "localhost", "Port": 5432 }
// appsettings.json
{
"Example": {
"Test": {
"Host": "localhost",
"Port": 5432
}
}
}Database 💥NEW💥
- Non docker database infrastructure for SqlServer and PostgreSql have been added ! For those who want to run test on existing servers.
- New package NotoriousTest.Database provides base classes for docker and non-docker database infrastructures.
ExternalDatabaseInfrastructure<TOutputConfiguration, TSettings>: Base class for non docker database infrastructures, that need a running server to setup.DatabaseSettingswill be loaded directly from thetestsettings.jsonfile.
DockerDatabaseInfrastructure<TContainer>: Base class for testcontainers powered infrastructure. Takes aIDatabaseContainer.- SqlServer, PostgreSql and Sqlite packages are using theses classes.
Dependency Injection 💥NEW💥
- Environments now expose an internal DI container, configurable via ConfigureInfrastructureServices(IServiceCollection collection).
- Registered services are automatically injected into every infrastructure, removing the need for manual wiring in Initialize.
- Available by default: ContextId, ITestSettingsProvider.
Logging 💥NEW💥
- NotoriousTest now deliver a
ITestLoggerthat is injected directly in theInfrastructure.Loggerproperty, and can be accessed from everywhere via DI. - Every framework has it's own
ITestLoggerimplementation that is registered in DI.
Web
- Web support has been moved to
NotoriousTest.Web. Environmentnow has extensions to retrieve the WebApplication or add a WebApplication. You can find them in theNotoriousTest.Webpackages, under theNotoriousTest.Web.Environment.WebEnvironmentExtensions.WebEnvironmenthas been deleted. Use extensions to retrieve/add WebApplication.
💥 Breaking Changes
- Synchronous classes have been removed. All
Async-prefixed classes have been renamed without the suffix (e.g.AsyncInfrastructure→Infrastructure). - .NET 6 is no longer supported. Minimum target is .NET 8.
- XUnit has been updated to xunit.v3, which introduces breaking changes of its own. See the xunit.v3 migration guide.
- Infrastructures are now executed in parrallel if there order are the same. IConfigurationConsumer are run after all infrastructures with the same order.
Integrations
Sqlite integration 💥NEW💥
SqliteInfrastructureis now available in theNotoriousTest.Sqlitepackage.
Test Frameworks integration 💥NEW💥
- NotoriousTest is now compatible with NUnit, MSTest, TUnit, in addition to xUnit.
- Find them within
NotoriousTest.XUnit,NotoriousTest.NUnit,NotoriousTest.MSTestandNotoriousTest.TUnitpackages. - New samples for every frameworks are available in the samples folder.
3.1.0
3.1.0
✨ Features
- Added PostgreSql integration
🛠 Technical
GetInfrastructuresAsyncin 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)
3.0.0
v3.0.0
✨ Features
ConfiguredInfrastructureandAsyncConfiguredInfrastructureare replaced withIConfigurableInfrastructureinterfaces. Every infrastructures can be marked as configurable just by implementing this interface.
🛠 Technical
- Added C4 model architecture schema
v2.3.1 - Bug Fixes
v2.3.1
🐛 Bug Fixes
- Fixed a bug in NotoriousTest.SqlServer where the
SqlServerContainerAsyncInfrastructuredid not changes the database connection to point to the newly created database.
v2.3.0 - TestContainers and SqlServer integrations available !
✨ 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.
- 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.
🛠 Technical
- Simplified management of generic types in the
AsyncConfiguredInfrastructureandAsyncConfiguredEnvironmentclasses.
v2.2.0 - Environment configuration simplification and addition of ContextId
v2.2.0
✨ Features
- Introduced
ContextIdto uniquely identify infrastructures. For example, you can name your database with it.- In standalone mode,
ContextIdwill be a random GUID. - Within an Environment,
ContextIdwill be the environment identifierEnvironment.EnvironmentId
- In standalone mode,
- Removal of
IConfigurationProducerandIConfigurationConsumer, as it was not necessary. Orderproperty 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
EnvironmentIdgenerated 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 - Advanced Control Over Infrastructure Resets
What's New in v2.1.0
- Advanced Control Over Infrastructure Resets: Use the
AutoResetoption to control whether infrastructures reset automatically between tests.
The AutoReset option allows you to manage the lifecycle of your infrastructures with more precision. For example, in a multi-tenant application, database data is often isolated "by design." In such cases, it may be beneficial to skip the reset for the database infrastructure.