You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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 !
17
19
18
20
### 💥 Breaking Changes
19
21
20
22
- Deleted support for Extensions, use dependency injection instead.
21
23
-
24
+
22
25
### 🐛 Bug Fixes
23
26
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.
25
35
26
36
## v4.1.1
27
37
28
38
### 🛠 Technical
29
39
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.
31
42
And can no longer be downloaded via Nuget Packages.
32
43
33
-
34
44
## v4.1.0
35
45
36
46
### ✨ Features
47
+
37
48
- DoggyDog now log when an infrastructure is initialized, reset, or destroyed normally.
38
49
- You can now use `testsettings.json` to disable DoggyDog for the entire test project.
50
+
39
51
```json
40
52
{
41
53
"Environment": {
@@ -48,6 +60,7 @@
48
60
49
61
- For debugging purpose, the test suite can now wait for DoggyDog to be launched manually.
50
62
- Enable this mode by setting `ManualLaunch` to true in the `testsettings.json` file.
63
+
51
64
```json
52
65
{
53
66
"Watchdog": {
@@ -81,40 +94,50 @@ NotoriousTest now has a new mascot, the DoggyDog ! 🐶🐶🐶
81
94
DoggyDog is a watchdog that clean infrastructures that may have been left dirty by previous tests,
82
95
and make sure that your tests are running in a clean environment.
83
96
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.
85
99
- DoggyDog use a registry to track all your infrastructures, and execute their cleaner.
86
100
-[Cleaner(CleanerType)] attribute to specify the cleaner of your infrastructures.
87
101
88
102
#### Infrastructure extensions 💥NEW💥
89
103
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. )
91
106
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`.
94
109
95
110
- Introducing a new concept called infrastructure extension, meant to be used to react to infrastructure setup.
96
111
- New interface `IInfrastructureExtension`, provide hooks such as `OnBeforeInitialize` to extends Infrastructure.
97
112
- Configuration is now handled by extensions classes.
98
113
- Use `EnsureExtension<MyExtension>()` or `EnsureExtension(new MyExtension())` to register an extension.
99
114
- 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.
106
123
107
124
#### Settings 💥NEW💥
125
+
108
126
- By registering a `SettingsExtension`, you can now load settings from `testsettings.json` to configure infrastructure.
109
127
- Automatically loaded from the infrastructure name as config key.
110
128
111
129
#### 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.
113
133
- Output configuration is now handled by an extension built-in Infrastructure base class.
114
134
- 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
@@ -129,44 +152,59 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
129
152
```
130
153
131
154
#### 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.
133
158
- 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`.
137
164
- SqlServer, PostgreSql and Sqlite packages are using theses classes.
138
165
139
166
### Dependency Injection 💥NEW💥
140
167
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.
143
172
- Available by default: ContextId, ITestSettingsProvider.
144
173
145
174
#### Logging 💥NEW💥
146
175
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.
148
178
- Every framework has it's own `ITestLogger` implementation that is registered in DI.
149
179
150
180
#### Web
181
+
151
182
- 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`.
153
185
-`WebEnvironment` has been deleted. Use extensions to retrieve/add WebApplication.
154
186
155
187
### 💥 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`).
157
191
- .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.
160
196
161
197
### Integrations
198
+
162
199
#### Sqlite integration 💥NEW💥
163
200
164
201
-`SqliteInfrastructure` is now available in the `NotoriousTest.Sqlite` package.
165
202
166
203
#### Test Frameworks integration 💥NEW💥
167
204
168
205
- 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.
170
208
- New samples for every frameworks are available in the samples folder.
171
209
172
210
## v3.1.0
@@ -185,7 +223,8 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
185
223
186
224
### ✨ Features
187
225
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.
189
228
190
229
### 🛠 Technical
191
230
@@ -195,30 +234,32 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
195
234
196
235
### 🐛 Bug Fixes
197
236
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.
199
239
200
240
## v2.3.0
201
241
202
242
### ✨ Features
203
243
204
244
-**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).
207
247
-**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).
210
250
211
251
### 🛠 Technical
212
252
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.
214
255
215
256
## v2.2.0
216
257
217
258
### ✨ Features
218
259
219
260
- 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`
222
263
- Removal of `IConfigurationProducer` and `IConfigurationConsumer`, as it was not necessary.
223
264
-`Order` property is now nullable and thus optional.
224
265
@@ -230,24 +271,30 @@ Each extension is self-contained, reusable across infrastructures, and hooks int
230
271
### 🐛 Bug Fixes
231
272
232
273
- 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>`.
234
276
235
277
## v2.1.0
236
278
237
279
### ✨ Features
238
280
239
281
- Added the `AutoReset` property to toggle infrastructure reset on or off.
240
282
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)
242
285
243
286
## v2.0.0
244
287
245
288
### ✨ Features :
246
289
247
290
-**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