@@ -149,7 +149,7 @@ type Scenario =
149
149
/// Initializes scenario and all its dependencies.
150
150
/// You can use it to prepare your target system, populate the database, or read and apply the JSON configuration for your scenario.
151
151
/// Scenario init will be invoked before warm-up and bombing phases.
152
- /// If Scenario init throws an exception, the NBomber load test will stop the execution.
152
+ /// If Scenario init throws an exception, the NBomber load test will stop the execution.
153
153
/// </summary>
154
154
/// <param name="scenario">Represent configuration data that is needed to build a scenario.</param>
155
155
/// <param name="initFunc">Represent lambda function that will be invoked to start Scenario initialization.
@@ -162,7 +162,7 @@ type Scenario =
162
162
/// Cleans scenario's resources and all its dependencies.
163
163
/// This method should be used to clean the scenario's resources after the test finishes.
164
164
/// Scenario clean will be invoked after warm-up and bombing phases.
165
- /// If Scenario clean throws an exception, the NBomber logs it and continues execution.
165
+ /// If Scenario clean throws an exception, the NBomber logs it and continues execution.
166
166
/// </summary>
167
167
/// <param name="scenario">Represent configuration data that is needed to build a scenario.</param>
168
168
/// <param name="cleanFunc">Represent lambda function that will be invoked to start Scenario cleaning.
@@ -172,7 +172,7 @@ type Scenario =
172
172
{ scenario with Clean = Some cleanFunc.Invoke }
173
173
174
174
/// <summary>
175
- /// This method sets duration of warm-up phase.
175
+ /// This method sets duration of warm-up phase.
176
176
/// </summary>
177
177
/// <param name="scenario">Represent configuration data that is needed to build a scenario.</param>
178
178
/// <param name="duration">By default warm-up duration is 30 seconds.</param>
@@ -195,7 +195,7 @@ type Scenario =
195
195
/// <param name="scenario">Represent configuration data that is needed to build a scenario.</param>
196
196
/// <param name="loadSimulations">Default value is: Simulation.KeepConstant(copies: 1, during: TimeSpan.FromMinutes(1))</param>
197
197
/// <example>
198
- /// <code>
198
+ /// <code>
199
199
/// scenario.WithLoadSimulations(
200
200
/// Simulation.RampingConstant(copies: 50, during: TimeSpan.FromMinutes(1)) // ramp-up from 0 to 50 copies
201
201
/// Simulation.KeepConstant(copies: 50, during: TimeSpan.FromMinutes(1))
@@ -212,7 +212,7 @@ type Scenario =
212
212
/// For such cases, you can disable Scenario iteration auto restart.
213
213
/// By default, when a Step returns a failed Response or unhandled exception was thrown,
214
214
/// NBomber will automatically mark the whole iteration as failed and restart it.
215
- /// If you want to disable auto restart of Scenario iteration you should set 'shouldRestart: false'.
215
+ /// If you want to disable auto restart of Scenario iteration you should set 'shouldRestart: false'.
216
216
/// </summary>
217
217
/// <param name="scenario">Represent configuration data that is needed to build a scenario.</param>
218
218
/// <param name="shouldRestart">The default value is true.
@@ -223,10 +223,10 @@ type Scenario =
223
223
224
224
/// <summary>
225
225
/// This method overrides the default value of MaxFailCount for Scenario.
226
- /// MaxFailCount is incremented on every failure or failed Response.
226
+ /// MaxFailCount is incremented on every failure or failed Response.
227
227
/// When a scenario reaches MaxFailCount, NBomber will stop the whole load test.
228
228
/// In the case of cluster mode, MaxFailCount is tracked per each NBomber instance exclusively.
229
- /// It doesn't aggregate across the cluster. So if on any NBomber node MaxFailCount is reached, NBomber will stop the whole load test.
229
+ /// It doesn't aggregate across the cluster. So if on any NBomber node MaxFailCount is reached, NBomber will stop the whole load test.
230
230
/// </summary>
231
231
/// <param name="scenario">Represent configuration data that is needed to build a scenario.</param>
232
232
/// <param name="maxFailCount">The default value is 5_000.</param>
@@ -239,7 +239,7 @@ type Scenario =
239
239
[<Extension>]
240
240
type NBomberRunner =
241
241
242
- /// Registers scenarios in NBomber environment.
242
+ /// Registers scenarios in NBomber environment.
243
243
static member RegisterScenarios ( [<ParamArray>] scenarios : ScenarioProps []) =
244
244
scenarios |> Seq.toList |> FSharp.NBomberRunner.registerScenarios
245
245
@@ -261,7 +261,7 @@ type NBomberRunner =
261
261
context |> FSharp.NBomberRunner.withTargetScenarios( names)
262
262
263
263
/// <summary>
264
- /// Sets test suite name.
264
+ /// Sets test suite name.
265
265
/// </summary>
266
266
/// <param name="context">NBomberContext</param>
267
267
/// <param name="testSuite">Default value is: "nbomber_default_test_suite_name".</param>
@@ -270,7 +270,7 @@ type NBomberRunner =
270
270
context |> FSharp.NBomberRunner.withTestSuite( testSuite)
271
271
272
272
/// <summary>
273
- /// Sets test name.
273
+ /// Sets test name.
274
274
/// </summary>
275
275
/// <param name="context">NBomberContext</param>
276
276
/// <param name="testName">Default value is: "nbomber_default_test_name".</param>
@@ -279,7 +279,7 @@ type NBomberRunner =
279
279
context |> FSharp.NBomberRunner.withTestName( testName)
280
280
281
281
/// <summary>
282
- /// Sets output report file name.
282
+ /// Sets output report file name.
283
283
/// </summary>
284
284
/// <param name="context">NBomberContext</param>
285
285
/// <param name="reportFileName">Default name: "nbomber_report-{CurrentTime}"</param>
@@ -288,7 +288,7 @@ type NBomberRunner =
288
288
context |> FSharp.NBomberRunner.withReportFileName( reportFileName)
289
289
290
290
/// <summary>
291
- /// Sets output report folder path.
291
+ /// Sets output report folder path.
292
292
/// </summary>
293
293
/// <param name="context">NBomberContext</param>
294
294
/// <param name="reportFolderPath">Default folder path: "./reports".</param>
@@ -312,15 +312,15 @@ type NBomberRunner =
312
312
context |> FSharp.NBomberRunner.withoutReports
313
313
314
314
/// <summary>
315
- /// Sets real-time reporting interval.
315
+ /// Sets real-time reporting interval.
316
316
/// </summary>
317
317
/// <param name="context">NBomberContext</param>
318
318
/// <param name="interval">Default value: 10 sec, min value: 5 sec</param>
319
319
[<Extension>]
320
320
static member WithReportingInterval ( context : NBomberContext , interval : TimeSpan ) =
321
321
context |> FSharp.NBomberRunner.withReportingInterval interval
322
322
323
- /// Sets reporting sinks.
323
+ /// Sets reporting sinks.
324
324
/// ReportingSink provides functionality for saving real-time and final statistics.
325
325
[<Extension>]
326
326
static member WithReportingSinks ( context : NBomberContext , [<ParamArray>] reportingSinks : IReportingSink []) =
@@ -352,16 +352,16 @@ type NBomberRunner =
352
352
context |> FSharp.NBomberRunner.loadConfig( path)
353
353
354
354
/// <summary>
355
- /// Loads infrastructure configuration by file path or by HTTP URL.
356
- /// </summary>
355
+ /// Loads infrastructure configuration by file path or by HTTP URL.
356
+ /// </summary>
357
357
/// <param name="context"></param>
358
358
/// <param name="path">File path or HTTP URL to JSON config.</param>
359
359
/// <example>
360
360
/// <code>
361
361
/// // load by file path
362
362
/// NBomberRunner.LoadInfraConfig("./my-test/infra-config.json")
363
363
/// // load by URL
364
- /// NBomberRunner.LoadInfraConfig("https://my-test/infra-config.json")
364
+ /// NBomberRunner.LoadInfraConfig("https://my-test/infra-config.json")
365
365
/// </code>
366
366
/// </example>
367
367
[<Extension>]
@@ -376,7 +376,7 @@ type NBomberRunner =
376
376
[<Extension>]
377
377
static member WithMinimumLogLevel ( context : NBomberContext , level : LogEventLevel ) =
378
378
context |> FSharp.NBomberRunner.withMinimumLogLevel level
379
-
379
+
380
380
/// <summary>
381
381
/// Sets logger configuration.
382
382
/// Make sure that you always return a new instance of LoggerConfiguration.
@@ -396,14 +396,24 @@ type NBomberRunner =
396
396
397
397
/// <summary>
398
398
/// This method enables or disables hints analyzer.
399
- /// Hints analyzer - analyzes statistics at the end of the test to provide hints in case of finding the wrong usage of NBomber or some environmental issues.
400
- /// </summary>
399
+ /// Hints analyzer - analyzes statistics at the end of the test to provide hints in case of finding the wrong usage of NBomber or some environmental issues.
400
+ /// </summary>
401
401
/// <param name="context">NBomberContext</param>
402
402
/// <param name="enable">The default value is false.</param>
403
403
[<Extension>]
404
404
static member EnableHintsAnalyzer ( context : NBomberContext , enable : bool ) =
405
405
context |> FSharp.NBomberRunner.enableHintsAnalyzer enable
406
406
407
+ /// <summary>
408
+ /// This method enables or disables to forcibly halt all tests at the end of the simulation even though NBomber is overloaded.
409
+ /// Use when you need to stop your test at a precise time even if your NBomber is overloaded and can have a short lag.
410
+ /// </summary>
411
+ /// <param name="context">NBomberContext</param>
412
+ /// <param name="enable">The default value is false.</param>
413
+ [<Extension>]
414
+ static member EnableStopTestForcibly ( context : NBomberContext , enable : bool ) =
415
+ context |> FSharp.NBomberRunner.enableStopTestForcibly enable
416
+
407
417
/// Runs scenarios.
408
418
[<Extension>]
409
419
static member Run ( context : NBomberContext ) =
@@ -412,7 +422,7 @@ type NBomberRunner =
412
422
| Error msg -> failwith msg
413
423
414
424
/// <summary>
415
- /// Runs scenarios with CLI arguments.
425
+ /// Runs scenarios with CLI arguments.
416
426
/// </summary>
417
427
/// <param name="context">NBomberContext</param>
418
428
/// <param name="args">CLI args</param>
@@ -433,7 +443,7 @@ type NBomberRunner =
433
443
type Simulation =
434
444
435
445
/// <summary>
436
- /// Adds or removes a given number of Scenario copies(instances) with a linear ramp over a given duration.
446
+ /// Adds or removes a given number of Scenario copies(instances) with a linear ramp over a given duration.
437
447
/// Each Scenario copy behaves like a long-running thread that runs continually(by specified duration) and will be destroyed when the current load simulation stops.
438
448
/// Use it for a smooth ramp up and ramp down.
439
449
/// Usually, this simulation type is used to test databases, message brokers, or any other system that works with a static client's pool of connections and reuses them.
@@ -476,7 +486,7 @@ type Simulation =
476
486
/// </summary>
477
487
/// <param name="rate">The injection rate of Scenario copies. It configures how many concurrent copies will be injected at a time.</param>
478
488
/// <param name="interval">The injection interval. It configures the interval between injections. </param>
479
- /// <param name="during">The duration of load simulation.</param>
489
+ /// <param name="during">The duration of load simulation.</param>
480
490
static member Inject ( rate : int , interval : TimeSpan , during : TimeSpan ) =
481
491
LoadSimulation.Inject( rate, interval, during)
482
492
0 commit comments