Skip to content

Commit 0b5e1fa

Browse files
docs: Update readme
1 parent a346a2a commit 0b5e1fa

1 file changed

Lines changed: 102 additions & 55 deletions

File tree

CHANGELOG.md

Lines changed: 102 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,53 @@
11
# Changelog
22

33
## v5.0.0
4+
45
### ✨ Features
56

67
- Dependency injection is now at the Environment level
7-
- Create a `IDependencyInjectionConfigurator`
8-
```csharp
9-
public class DependencyInjectionConfigurator : IDependencyInjectionConfigurator
10-
{
11-
public IServiceCollection ConfigureServices(IServiceCollection services) => services;
12-
}
13-
```
14-
- Add a `[InjectionConfigurator(typeof(DependencyInjectionConfigurator))]` to the test class.
15-
- You could add multiple `InjectionConfiguratorAttribute` to the same test class (or parents), they will all be used.
16-
- Add dependencies to the environment/infrastructure constructor !
8+
- Create a `IDependencyInjectionConfigurator`
9+
```csharp
10+
public class DependencyInjectionConfigurator : IDependencyInjectionConfigurator
11+
{
12+
public IServiceCollection ConfigureServices(IServiceCollection services) => services;
13+
}
14+
```
15+
- Add a `[InjectionConfigurator(typeof(DependencyInjectionConfigurator))]` to the test class.
16+
- You could add multiple `InjectionConfiguratorAttribute` to the same test class (or parents), they will all be
17+
used.
18+
- Add dependencies to the environment/infrastructure constructor !
1719

1820
### 💥 Breaking Changes
1921

2022
- Deleted support for Extensions, use dependency injection instead.
2123
-
24+
2225
### 🐛 Bug Fixes
2326

24-
- Fixed a bug where SqliteInfrastructure could not delete the file because it was still used by another process. Triggering DoggyDog cleaning.
27+
- Fixed a bug where SqliteInfrastructure could not delete the file because it was still used by another process.
28+
Triggering DoggyDog cleaning.
29+
30+
### 📦 Dependencies
31+
32+
- Upgraded 'Microsoft.Data.Sqlite' and 'Microsoft.Data.Sqlite.Core' to 11.0.0-preview.5.26302.115 because 10.0.5 has a
33+
high
34+
vulnerability on SQlite provider.
2535

2636
## v4.1.1
2737

2838
### 🛠 Technical
2939

30-
- Internal packages (such as NotoriousTest.Runtimes|Watchdog|SqliteRegistry|TestSettings) are now includes in NotoriousTest.
40+
- Internal packages (such as NotoriousTest.Runtimes|Watchdog|SqliteRegistry|TestSettings) are now includes in
41+
NotoriousTest.
3142
And can no longer be downloaded via Nuget Packages.
3243

33-
3444
## v4.1.0
3545

3646
### ✨ Features
47+
3748
- DoggyDog now log when an infrastructure is initialized, reset, or destroyed normally.
3849
- You can now use `testsettings.json` to disable DoggyDog for the entire test project.
50+
3951
```json
4052
{
4153
"Environment": {
@@ -48,6 +60,7 @@
4860

4961
- For debugging purpose, the test suite can now wait for DoggyDog to be launched manually.
5062
- Enable this mode by setting `ManualLaunch` to true in the `testsettings.json` file.
63+
5164
```json
5265
{
5366
"Watchdog": {
@@ -81,40 +94,50 @@ NotoriousTest now has a new mascot, the DoggyDog ! 🐶🐶🐶
8194
DoggyDog is a watchdog that clean infrastructures that may have been left dirty by previous tests,
8295
and make sure that your tests are running in a clean environment.
8396

84-
- Introducing DoggyDog - an executable that clean your infrastructures left behind a test campaign that have been killed unexpectedly.
97+
- Introducing DoggyDog - an executable that clean your infrastructures left behind a test campaign that have been killed
98+
unexpectedly.
8599
- DoggyDog use a registry to track all your infrastructures, and execute their cleaner.
86100
- [Cleaner(CleanerType)] attribute to specify the cleaner of your infrastructures.
87101

88102
#### Infrastructure extensions 💥NEW💥
89103

90-
**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. )
104+
**Infrastructure extensions** introduce a composition model for adding behaviors to your infrastructures. Instead of
105+
creating specialized subclasses to combine multiple concerns (configuration, database seeding, respawn, etc. )
91106
You register extensions on any infrastructure via `EnsureExtension<TExtension>()`.
92-
Each extension is self-contained, reusable across infrastructures, and hooks into the infrastructure lifecycle through dedicated callbacks such as `OnBeforeInitialize`.
93-
107+
Each extension is self-contained, reusable across infrastructures, and hooks into the infrastructure lifecycle through
108+
dedicated callbacks such as `OnBeforeInitialize`.
94109

95110
- Introducing a new concept called infrastructure extension, meant to be used to react to infrastructure setup.
96111
- New interface `IInfrastructureExtension`, provide hooks such as `OnBeforeInitialize` to extends Infrastructure.
97112
- Configuration is now handled by extensions classes.
98113
- Use `EnsureExtension<MyExtension>()` or `EnsureExtension(new MyExtension())` to register an extension.
99114
- Built-in extensions :
100-
- Core
101-
- `OutputConfigurationExtension<TOutputConfiguration>` : Provide a way to output configuration. Included in `Infrastructure` base class.
102-
- `SettingsExtension<TSettings>`: Load from `testsettings.json` your infrastructure configuration. Config key default to infrastructure name, and can be override.
103-
- Database
104-
- `RespawnExtension`: Integration of Respawn package to reset databases between test.
105-
- Included in every database infrastructures by default.
115+
- Core
116+
- `OutputConfigurationExtension<TOutputConfiguration>` : Provide a way to output configuration. Included in
117+
`Infrastructure` base class.
118+
- `SettingsExtension<TSettings>`: Load from `testsettings.json` your infrastructure configuration. Config key
119+
default to infrastructure name, and can be override.
120+
- Database
121+
- `RespawnExtension`: Integration of Respawn package to reset databases between test.
122+
- Included in every database infrastructures by default.
106123

107124
#### Settings 💥NEW💥
125+
108126
- By registering a `SettingsExtension`, you can now load settings from `testsettings.json` to configure infrastructure.
109127
- Automatically loaded from the infrastructure name as config key.
110128

111129
#### Output configuration 🔧 UPDATED 🔧
112-
- Environments no longer require a global configuration object. Configuration is now propagated automatically through extensions.
130+
131+
- Environments no longer require a global configuration object. Configuration is now propagated automatically through
132+
extensions.
113133
- Output configuration is now handled by an extension built-in Infrastructure base class.
114134
- Adding a configuration output will now be made by calling `AddEntry(key, config)`.
115-
- Environment will gather all configuration under all keys and pass to all `IConfigurationConsumer` infrastructures, such as `WebApplicationInfrastructure`.
116-
- `WebApplicationInfrastructure` now maps configuration entries to appsettings format automatically. Generating the section path from the key and config structure.
135+
- Environment will gather all configuration under all keys and pass to all `IConfigurationConsumer` infrastructures,
136+
such as `WebApplicationInfrastructure`.
137+
- `WebApplicationInfrastructure` now maps configuration entries to appsettings format automatically. Generating the
138+
section path from the key and config structure.
117139
- e.g.
140+
118141
```json
119142
// Entry: "Example:Test" → { "Host": "localhost", "Port": 5432 }
120143
// appsettings.json
@@ -129,44 +152,59 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
129152
```
130153

131154
#### Database 💥NEW💥
132-
- Non docker database infrastructure for SqlServer and PostgreSql have been added ! For those who want to run test on existing servers.
155+
156+
- Non docker database infrastructure for SqlServer and PostgreSql have been added ! For those who want to run test on
157+
existing servers.
133158
- New package NotoriousTest.Database provides base classes for docker and non-docker database infrastructures.
134-
- `ExternalDatabaseInfrastructure<TOutputConfiguration, TSettings>`: Base class for non docker database infrastructures, that need a running server to setup.
135-
- `DatabaseSettings` will be loaded directly from the `testsettings.json` file.
136-
- `DockerDatabaseInfrastructure<TContainer>`: Base class for testcontainers powered infrastructure. Takes a `IDatabaseContainer`.
159+
- `ExternalDatabaseInfrastructure<TOutputConfiguration, TSettings>`: Base class for non docker database infrastructures,
160+
that need a running server to setup.
161+
- `DatabaseSettings` will be loaded directly from the `testsettings.json` file.
162+
- `DockerDatabaseInfrastructure<TContainer>`: Base class for testcontainers powered infrastructure. Takes a
163+
`IDatabaseContainer`.
137164
- SqlServer, PostgreSql and Sqlite packages are using theses classes.
138165

139166
### Dependency Injection 💥NEW💥
140167

141-
- Environments now expose an internal DI container, configurable via ConfigureInfrastructureServices(IServiceCollection collection).
142-
- Registered services are automatically injected into every infrastructure, removing the need for manual wiring in Initialize.
168+
- Environments now expose an internal DI container, configurable via ConfigureInfrastructureServices(IServiceCollection
169+
collection).
170+
- Registered services are automatically injected into every infrastructure, removing the need for manual wiring in
171+
Initialize.
143172
- Available by default: ContextId, ITestSettingsProvider.
144173

145174
#### Logging 💥NEW💥
146175

147-
- NotoriousTest now deliver a `ITestLogger` that is injected directly in the `Infrastructure.Logger` property, and can be accessed from everywhere via DI.
176+
- NotoriousTest now deliver a `ITestLogger` that is injected directly in the `Infrastructure.Logger` property, and can
177+
be accessed from everywhere via DI.
148178
- Every framework has it's own `ITestLogger` implementation that is registered in DI.
149179

150180
#### Web
181+
151182
- Web support has been moved to `NotoriousTest.Web`.
152-
- `Environment` now has extensions to retrieve the WebApplication or add a WebApplication. You can find them in the `NotoriousTest.Web` packages, under the `NotoriousTest.Web.Environment.WebEnvironmentExtensions`.
183+
- `Environment` now has extensions to retrieve the WebApplication or add a WebApplication. You can find them in the
184+
`NotoriousTest.Web` packages, under the `NotoriousTest.Web.Environment.WebEnvironmentExtensions`.
153185
- `WebEnvironment` has been deleted. Use extensions to retrieve/add WebApplication.
154186

155187
### 💥 Breaking Changes
156-
- Synchronous classes have been removed. All `Async`-prefixed classes have been renamed without the suffix (e.g. `AsyncInfrastructure``Infrastructure`).
188+
189+
- Synchronous classes have been removed. All `Async`-prefixed classes have been renamed without the suffix (e.g.
190+
`AsyncInfrastructure``Infrastructure`).
157191
- .NET 6 is no longer supported. Minimum target is .NET 8.
158-
- XUnit has been updated to xunit.v3, which introduces breaking changes of its own. See the [xunit.v3 migration guide](https://xunit.net/docs/getting-started/v3/migration).
159-
- Infrastructures are now executed in parrallel if there order are the same. IConfigurationConsumer are run after all infrastructures with the same order.
192+
- XUnit has been updated to xunit.v3, which introduces breaking changes of its own. See
193+
the [xunit.v3 migration guide](https://xunit.net/docs/getting-started/v3/migration).
194+
- Infrastructures are now executed in parrallel if there order are the same. IConfigurationConsumer are run after all
195+
infrastructures with the same order.
160196

161197
### Integrations
198+
162199
#### Sqlite integration 💥NEW💥
163200

164201
- `SqliteInfrastructure` is now available in the `NotoriousTest.Sqlite` package.
165202

166203
#### Test Frameworks integration 💥NEW💥
167204

168205
- NotoriousTest is now compatible with **NUnit**, **MSTest**, **TUnit**, in addition to **xUnit**.
169-
- Find them within `NotoriousTest.XUnit`, `NotoriousTest.NUnit`, `NotoriousTest.MSTest` and `NotoriousTest.TUnit` packages.
206+
- Find them within `NotoriousTest.XUnit`, `NotoriousTest.NUnit`, `NotoriousTest.MSTest` and `NotoriousTest.TUnit`
207+
packages.
170208
- New samples for every frameworks are available in the samples folder.
171209

172210
## v3.1.0
@@ -185,7 +223,8 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
185223

186224
### ✨ Features
187225

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

190229
### 🛠 Technical
191230

@@ -195,30 +234,32 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
195234

196235
### 🐛 Bug Fixes
197236

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

200240
## v2.3.0
201241

202242
### ✨ Features
203243

204244
- **NotoriousTest.TestContainers** is now available as a separate package.
205-
- Provides a simple way to use TestContainers in your tests.
206-
- For more information, see the [Advanced Functionalities - TestContainers](./README.md#testcontainers).
245+
- Provides a simple way to use TestContainers in your tests.
246+
- For more information, see the [Advanced Functionalities - TestContainers](./README.md#testcontainers).
207247
- **NotoriousTest.SqlServer** is now available as a separate package.
208-
- Provide your tests with a SqlServer ready-to-use infrastructure !
209-
- For more information, see the [Advanced Functionalities - SqlServer](./README.md#sql-server).
248+
- Provide your tests with a SqlServer ready-to-use infrastructure !
249+
- For more information, see the [Advanced Functionalities - SqlServer](./README.md#sql-server).
210250

211251
### 🛠 Technical
212252

213-
- Simplified management of generic types in the `AsyncConfiguredInfrastructure` and `AsyncConfiguredEnvironment` classes.
253+
- Simplified management of generic types in the `AsyncConfiguredInfrastructure` and `AsyncConfiguredEnvironment`
254+
classes.
214255

215256
## v2.2.0
216257

217258
### ✨ Features
218259

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

@@ -230,24 +271,30 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
230271
### 🐛 Bug Fixes
231272

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

235277
## v2.1.0
236278

237279
### ✨ Features
238280

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

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

243286
## v2.0.0
244287

245288
### ✨ Features :
246289

247290
- **Complete overhaul of configuration management:**
248-
- **`AsyncConfiguredInfrastructure`** and **`AsyncConfiguredInfrastructure<TConfig>`**: Provides access to the `Configuration` property via an infrastructure.
249-
- **`IConfigurationConsumer`** and **`IConfigurationProducer`**: Used to indicate whether a component consumes or produces configuration.
250-
- **`AsyncConfiguredEnvironment`**: An environment managing the provisioning of a global configuration from configuration infrastructures.
251-
- **`WebApplication`** is now automatically provided with configuration by the `AsyncWebEnvironment`.
252-
253-
For more information, see the [Advanced Functionalities - Configuration](./README.md#configuration) and [Advanced Functionalities - Web](./README.md#web).
291+
- **`AsyncConfiguredInfrastructure`** and **`AsyncConfiguredInfrastructure<TConfig>`**: Provides access to the
292+
`Configuration` property via an infrastructure.
293+
- **`IConfigurationConsumer`** and **`IConfigurationProducer`**: Used to indicate whether a component consumes or
294+
produces configuration.
295+
- **`AsyncConfiguredEnvironment`**: An environment managing the provisioning of a global configuration from
296+
configuration infrastructures.
297+
- **`WebApplication`** is now automatically provided with configuration by the `AsyncWebEnvironment`.
298+
299+
For more information, see the [Advanced Functionalities - Configuration](./README.md#configuration)
300+
and [Advanced Functionalities - Web](./README.md#web).

0 commit comments

Comments
 (0)