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
Copy file name to clipboardExpand all lines: docs/sources/v0.47.x/examples/oauth-authentication.md
+201Lines changed: 201 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,207 @@ export function authenticateUsingAzure(tenantId, clientId, clientSecret, scope,
61
61
62
62
{{< /code >}}
63
63
64
+
### Azure B2C
65
+
66
+
The following example shows how you can authenticate with Azure B2C using the [Client Credentials Flow](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-oauth-code#client-credentials-flow).
67
+
68
+
This example is based on a JMeter example found at the [azure-ad-b2c/load-tests](https://github.com/azure-ad-b2c/load-tests) repository.
69
+
70
+
To use this script, you need to:
71
+
72
+
1.[Set up your own Azure B2C tenant](https://learn.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-tenant)
73
+
* Copy the tenant name, it will be used in your test script.
74
+
1.[Register a web application](https://learn.microsoft.com/en-us/azure/active-directory-b2c/tutorial-register-applications?tabs=app-reg-ga)
75
+
* Register a single page application with the redirect URL of: https://jwt.ms. That's needed for the flow to receive a token.
76
+
* After the creation, you can get the Application (client) ID, and the Directory (tenant) ID. Copy both of them, they'll be used in your test script.
77
+
1.[Create a user flow so that you can sign up and create a user](https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-user-flows)
78
+
* Create a new user, and copy the username and password. They'll be used in the test script.
79
+
80
+
You can find the settings in the B2C settings in the Azure portal if you need to refer to them later on. Make sure to fill out all the variables for the `B2CGraphSettings` object, as well as replace `USERNAME` and `PASSWORD` in `export default function`.
|[gRPC Fault](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/grpc)| Fault affecting gRPC requests from a target |
14
14
|[HTTP Fault](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/http)| Fault affecting HTTP requests from a target |
15
+
|[Pod Termination Fault](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/pod-termination)| Fault terminating a number of target Pods |
description: 'xk6-disruptor: Pod Termination Fault attributes'
4
+
weight: 03
5
+
---
6
+
7
+
# Pod Termination
8
+
9
+
A Pod Termination Fault allows terminating either a fixed number or a percentage of the pods that matching a selector or back a service.
10
+
11
+
A Pod Termination fault is defined by the following attributes:
12
+
13
+
| Attribute | Type | Description |
14
+
| ------------- | ------ | --------|
15
+
| count | integer or percentage | the number of pods to be terminated. It can be specified as a integer number or as a percentage, for example `30%`, that defines the fraction of target pods to be terminated|
16
+
17
+
{{% admonition type="note" %}}
18
+
19
+
If the count is a percentage and there are no enough elements in the target pod list, the number is rounded up.
20
+
For example '25%' of a list of 2 target pods will terminate one pod.
21
+
If the list of target pods is not empty, at least one pod is always terminated.
22
+
23
+
{{% /admonition %}}
24
+
25
+
## Example
26
+
27
+
This example defines a PorTermination fault that will terminate `30%` of target pods
Copy file name to clipboardExpand all lines: docs/sources/v0.47.x/javascript-api/xk6-disruptor/poddisruptor/_index.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: 'PodDisruptor'
3
3
excerpt: 'xk6-disruptor: PodDisruptor class'
4
-
weight: 02
4
+
weight: 200
5
5
---
6
6
7
7
# PodDisruptor
@@ -17,6 +17,7 @@ To construct a `PodDisruptor`, use the [PodDisruptor() constructor](https://graf
17
17
|[PodDisruptor.injectGrpcFaults()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/poddisruptor/injectgrpcfaults)| Inject [gRPC faults](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/grpc) in the target Pods |
18
18
|[PodDisruptor.injectHTTPFaults()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/poddisruptor/injecthttpfaults)| Inject [HTTP faults](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/http) in the target Pods |
19
19
| PodDisruptor.targets() | Returns the list of target Pods of the PodDisruptor |
20
+
|[PodDisruptor.terminatePods()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/poddisruptor/terminate-pods)| executes a [Pod Termination fault](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/pod-termination) in the target Pods |
|[ServiceDisruptor.injectGrpcFaults()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/servicedisruptor/injectgrpcfaults)| Inject [gRPC faults](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/grpc) in the target Pods |
18
18
|[ServiceDisruptor.injectHTTPFaults()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/servicedisruptor/injecthttpfaults)| Inject [HTTTP faults](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/http) in the target Pods |
19
+
| ServiceDisruptor.targets() | Returns the list of target Pods of the ServiceDisruptor |
20
+
|[ServiceDisruptor.terminatePods()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/servicedisruptor/terminate-pods)| executes a [Pod Termination fault](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/pod-termination) in the target Pods|
Copy file name to clipboardExpand all lines: docs/sources/v0.47.x/results-output/end-of-test/custom-summary.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ They determine where k6 displays or saves the content:
72
72
73
73
The value of a key can have a type of either `string` or [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
74
74
75
-
You can return mutiple summary outputs in a script.
75
+
You can return multiple summary outputs in a script.
76
76
As an example, this `return` statement sends a report to standard output and writes the `data` object to a JSON file.
Copy file name to clipboardExpand all lines: docs/sources/v0.47.x/using-k6/scenarios/executors/shared-iterations.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ weight: 01
9
9
The `shared-iterations` executor shares iterations between the number of VUs.
10
10
The test ends once k6 executes all iterations.
11
11
12
-
For a shortcut to this executor, use the [vus](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options/reference#vus) and [iterations](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options/reference#iterations) options.
12
+
For a shortcut to this executor, use the [`vus`](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options/reference#vus) and [`iterations`](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options/reference#iterations) options.
13
13
14
14
{{% admonition type="note" %}}
15
15
@@ -37,7 +37,7 @@ This executor is suitable when you want a specific number of VUs to complete a f
37
37
number of total iterations, and the amount of iterations per VU is unimportant.
38
38
If the **time to complete** a number of test iterations is your concern, this executor should perform best.
39
39
40
-
An example use case is for quick performance tests in the developement build cycle.
40
+
An example use case is for quick performance tests in the development build cycle.
41
41
As developers make changes, they might run the test against the local code to test for performance regressions.
42
42
Thus the executor works well with a _shift-left_ policy, where emphasizes testing performance early in the development cycle, when the cost of a fix is lowest.
0 commit comments