Skip to content

Commit 8af03aa

Browse files
Move Explanation pages into Create a new extension
1 parent cdafc65 commit 8af03aa

File tree

6 files changed

+34
-44
lines changed

6 files changed

+34
-44
lines changed

docs/sources/k6/next/extensions/create/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Create a new extension'
33
menuTitle: 'Create a new extension'
4-
description: 'Creating k6 extensions does not have to be a daunting task, but there are some prerequisites to succeed.'
4+
description: 'Learn how to create a k6 extension.'
55
weight: 04
66
---
77

docs/sources/k6/next/extensions/explanations/extensions-registry.md renamed to docs/sources/k6/next/extensions/create/extensions-registry.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: About the Extensions Registry
33
description: Reasons for the registry and what is required to be included.
4-
weight: 01
4+
weight: 600
55
---
66

77
# About the Extensions Registry
@@ -18,7 +18,7 @@ To ensure quality, we need a well-maintained, curated listing of extensions.
1818
Our pledge to the community is to make our best attempt to ensure the listed projects meet certain standards.
1919
While we cannot guarantee the quality of community-provided extensions, we _can_ aid the evaluation by requiring certain consistencies.
2020

21-
## Registry Requirements
21+
## Registry requirements
2222

2323
At minimum, each source code repository must have the following:
2424

@@ -55,7 +55,7 @@ At minimum, each source code repository must have the following:
5555
For example, if latest version of k6 is `v0.100`, the extension must build with at least version `v0.98`.
5656
Be sure to also match the version of Go as determined by the version of k6.
5757

58-
## Naming Conventions
58+
## Naming conventions
5959

6060
Some extensions may be very specific, where others are more general.
6161
Multiple extensions may even be created for the same product with different levels of support based upon version.
@@ -76,7 +76,7 @@ Our goal is to quickly understand the intent of the extension.
7676

7777
{{< /admonition >}}
7878

79-
## Potential for De-listing
79+
## Potential for de-listing
8080

8181
Given our desire to provide the best developer experience when using k6, we reserve the right to de-list any extension we deem is no longer maintaining standards.
8282
Before any action takes place, the extension maintainers will be contacted to be given a chance to rectify the project and thus avoid de-listing.

docs/sources/k6/next/extensions/explanations/go-js-bridge.md renamed to docs/sources/k6/next/extensions/create/go-js-bridge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: About the Go-to-JS bridge
33
description: Technical details about how JavaScript works in the sobek engine.
4-
weight: 02
4+
weight: 700
55
---
66

77
# About the Go-to-JS bridge

docs/sources/k6/next/extensions/explanations/_index.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/sources/k6/next/extensions/explore.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Explore extensions'
33
menuTitle: 'Explore extensions'
4-
description: 'Explore the k6 extension ecosystem to find extensions that meet your requirements.'
4+
description: 'Explore the k6 extension ecosystem to find extensions that fit your use cases.'
55
weight: 01
66
---
77

@@ -13,24 +13,24 @@ These extensions can be used in your test without any additional configuration.
1313

1414
We have two categories of extensions:
1515

16-
| Category | Maintainer | Audited | Cloud support |
17-
| ------------- | ----------------------------------- | ------- | ------------- |
18-
| **Official** | Grafana Labs | ✅ Yes | ✅ Yes |
19-
| **Community** | Community | ✅ Yes | ⚠️ Partial\* |
16+
| Category | Maintainer | Audited | Cloud support |
17+
| ------------- | ------------ | ------- | ------------- |
18+
| **Official** | Grafana Labs | ✅ Yes | ✅ Yes |
19+
| **Community** | Community | ✅ Yes | ⚠️ Partial\* |
2020

21-
\* *Partial* means that they can be used in the CLI with the `--local-execution` mode. Also, on Private Load Zones if a custom image is build. They don't work on Grafana Cloud k6 Public Load Zones.
21+
\* _Partial_ means that they can be used in the CLI with the `--local-execution` mode. Also, on Private Load Zones if a custom image is build. They don't work on Grafana Cloud k6 Public Load Zones.
2222

2323
### Official extensions
2424

25-
| Extension | Description | Versions |
26-
| --------- | ----------- | -------- |
27-
| [xk6-client-prometheus-remote](https://github.com/grafana/xk6-client-prometheus-remote) | Test Prometheus Remote Write-compatible endpoints | 0.3.2 |
28-
| [xk6-faker](https://github.com/grafana/xk6-faker) | Generate fake data in your tests | 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4 |
29-
| [xk6-loki](https://github.com/grafana/xk6-loki) | Test Grafana Loki log ingestion endpoints | 1.0.0, 1.0.1 |
25+
| Extension | Description | Versions |
26+
| --------------------------------------------------------------------------------------- | ------------------------------------------------- | ---------------------------------------- |
27+
| [xk6-client-prometheus-remote](https://github.com/grafana/xk6-client-prometheus-remote) | Test Prometheus Remote Write-compatible endpoints | 0.3.2 |
28+
| [xk6-faker](https://github.com/grafana/xk6-faker) | Generate fake data in your tests | 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4 |
29+
| [xk6-loki](https://github.com/grafana/xk6-loki) | Test Grafana Loki log ingestion endpoints | 1.0.0, 1.0.1 |
3030
| [xk6-sql](https://github.com/grafana/xk6-sql) | Test SQL servers | 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5 |
31-
| [xk6-sql-driver-mysql](https://github.com/grafana/xk6-sql-driver-mysql) | SQL driver for MySQL | 0.1.0, 0.2.0, 0.2.1 |
32-
| [xk6-sql-driver-postgres](https://github.com/grafana/xk6-sql-driver-postgres) | SQL driver for Postgres | 0.1.0, 0.1.1 |
33-
| [xk6-ssh](https://github.com/grafana/xk6-ssh) | Use SSH connections in your tests | 0.1.0, 0.1.1, 0.1.2, 0.1.3 |
31+
| [xk6-sql-driver-mysql](https://github.com/grafana/xk6-sql-driver-mysql) | SQL driver for MySQL | 0.1.0, 0.2.0, 0.2.1 |
32+
| [xk6-sql-driver-postgres](https://github.com/grafana/xk6-sql-driver-postgres) | SQL driver for Postgres | 0.1.0, 0.1.1 |
33+
| [xk6-ssh](https://github.com/grafana/xk6-ssh) | Use SSH connections in your tests | 0.1.0, 0.1.1, 0.1.2, 0.1.3 |
3434

3535
### Community extensions
3636

@@ -40,13 +40,13 @@ We are working on process for community folks to submit their extensions to be i
4040

4141
{{< /admonition >}}
4242

43-
| Extension | Description | Versions |
44-
| --------------------------------------------------------------------------------------- | ------------------------------------------------- | ---------------------------------------- |
45-
| [xk6-kafka](https://github.com/mostafa/xk6-kafka) | Load test Apache Kafka | 1.0.0 |
46-
| [xk6-sql-driver-azuresql](https://github.com/grafana/xk6-sql-driver-azuresql) | SQL driver for AzureSQL | 0.1.0, 0.1.1 |
47-
| [xk6-sql-driver-clickhouse](https://github.com/grafana/xk6-sql-driver-clickhouse) | SQL driver for Clickhouse | 0.1.0, 0.1.1 |
48-
| [xk6-sql-driver-sqlserver](https://github.com/grafana/xk6-sql-driver-sqlserver) | SQL driver for SQLite3 | 0.1.0, 0.1.1 |
49-
| [xk6-sse](https://github.com/phymbert/xk6-sse) | Test with Server-Sent Events (SSE) | 0.1.10, 0.1.11 |
43+
| Extension | Description | Versions |
44+
| --------------------------------------------------------------------------------- | ---------------------------------- | -------------- |
45+
| [xk6-kafka](https://github.com/mostafa/xk6-kafka) | Load test Apache Kafka | 1.0.0 |
46+
| [xk6-sql-driver-azuresql](https://github.com/grafana/xk6-sql-driver-azuresql) | SQL driver for AzureSQL | 0.1.0, 0.1.1 |
47+
| [xk6-sql-driver-clickhouse](https://github.com/grafana/xk6-sql-driver-clickhouse) | SQL driver for Clickhouse | 0.1.0, 0.1.1 |
48+
| [xk6-sql-driver-sqlserver](https://github.com/grafana/xk6-sql-driver-sqlserver) | SQL driver for SQLite3 | 0.1.0, 0.1.1 |
49+
| [xk6-sse](https://github.com/phymbert/xk6-sse) | Test with Server-Sent Events (SSE) | 0.1.10, 0.1.11 |
5050

5151
## Require building a custom k6 binary
5252

docs/sources/k6/next/extensions/run/_index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: 'Run a test with extensions'
33
menuTitle: 'Run a test with extensions'
4-
description: 'Run k6 with extensions to cover use cases not supported natively in the core.'
4+
description: 'Learn how to run a k6 test with extensions.'
55
weight: 03
66
---
77

88
# Run a test with extensions
99

10-
As explained in the [Explore extensions](https://grafana.com/docs/k6/<K6_VERSION>/extensions/explore) page, there are extensions that can be used directly in your test script, and others that require building a custom k6 binary.
10+
As explained in the [Explore extensions](https://grafana.com/docs/k6/<K6_VERSION>/extensions/explore) page, there are extensions that can be used directly in your test script, and others that require building a custom k6 binary.
1111

1212
## Using automatic extension resolution
1313

@@ -31,7 +31,6 @@ k6 run script.js
3131

3232
To use community extensions you must have `K6_ENABLE_COMMUNITY_EXTENSIONS` set to `true`.
3333

34-
3534
```sh
3635
K6_ENABLE_COMMUNITY_EXTENSIONS=true k6 run test.js
3736
```
@@ -43,19 +42,20 @@ K6_ENABLE_COMMUNITY_EXTENSIONS=true k6 run test.js
4342
- Only works with Official and Community extensions.
4443
- Output extensions are not supported.
4544
- Running scripts from stdin is not supported.
46-
- Only files with extensions `.js`, `.ts` or `.tar` can be used.
45+
- Only files with extensions `.js`, `.ts` or `.tar` can be used.
4746

4847
### How to disable this feature
4948

5049
You can disable this feature by setting the environment variable `K6_AUTO_EXTENSION_RESOLUTION` to `false`. If provided, the previous example
51-
fails because k6 can't load the extension dynamically.
50+
fails because k6 can't load the extension dynamically.
51+
5252
```bash
5353
K6_AUTO_EXTENSION_RESOLUTION=false k6 run test.js
5454
```
5555

5656
## Using extensions that require building a custom k6 binary
5757

58-
To run other extensions (including ones you create), you need to build a custom k6 binary with [xk6](https://github.com/grafana/xk6/).
58+
To run other extensions (including ones you create), you need to build a custom k6 binary with [xk6](https://github.com/grafana/xk6/).
5959

6060
You can do this locally with [Go](https://grafana.com/docs/k6/<K6_VERSION>/extensions/run/build-k6-binary-using-go/) or use the [xk6 Docker image](https://grafana.com/docs/k6/<K6_VERSION>/extensions/run/build-k6-binary-using-docker/).
6161

@@ -74,4 +74,4 @@ docker run --rm -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" grafana/xk6 build \
7474

7575
{{< /code >}}
7676

77-
<br/>
77+
<br/>

0 commit comments

Comments
 (0)