Skip to content

Commit

Permalink
Merge branch 'main' into replace-httpbin
Browse files Browse the repository at this point in the history
  • Loading branch information
federicotdn authored Jan 10, 2025
2 parents a8bf60a + 3f8a302 commit 5573ee1
Show file tree
Hide file tree
Showing 846 changed files with 63,040 additions and 32 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ export default async function () {

### Code snippets evaluation

In addition to linting code snippets, we also actually run the snippets using k6 OSS. This is done automatically for all newly opened PRs, only for Markdown files that have been changed (when compared to `main`) in the `docs/sources/next` directory. See the `scripts/md-k6.py` script for details on how this works internally.
In addition to linting code snippets, we also run the snippets using k6 OSS. This is done automatically on PRs, only for Markdown files that have been changed in the `docs/sources/next` directory when compared to `main`. See the `scripts/md-k6.py` script for details on how this works internally.

Code snippets are run using the `-w` k6 OSS flag. If the code snippet causes k6 to exit with a nonzero status, then the script (and therefore the workflow) will fail. If any error is logged by k6 (for example, because an exception was raised), this will also fail the execution.
Code snippets are run using the `-w` k6 OSS flag. If the code snippet causes k6 to exit with a nonzero status, then the script (and, therefore, the workflow) will fail. If any error is logged by k6, for example, because an exception was raised, this will also fail the execution.

You can control the behaviour of `md-k6.py` via magic `md-k6` HTML comments placed above the code snippets. The format is the following:

Expand Down
32 changes: 24 additions & 8 deletions docs/make-docs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,28 @@
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
# Changes are relevant to this script and the support docs.mk GNU Make interface.
#
# ## 8.3.0 (2024-12-27)
#
# ### Added
#
# - Debug output of the final command when DEBUG=true.
#
# Useful to inspect if the script is correctly constructing the final command.
#
# ## 8.2.0 (2024-12-22)
#
# ### Removed
#
# - Special cases for Oracle and Datadog plugins now that they exist in the plugins monorepo.
#
# ## 8.1.0 (2024-08-22)
#
# ### Added
#
# - Additional website mounts for projects that use the website repository.
#
# Mounts are required for `make docs` to work in the website repository or with the website project.
# The Makefile is also mounted for convenient development of the procedure that repository.
# The Makefile is also mounted for convenient development of the procedure in that repository.
#
# ## 8.0.1 (2024-07-01)
#
Expand Down Expand Up @@ -355,8 +369,6 @@ SOURCES_grafana_cloud_frontend_observability_faro_web_sdk='faro-web-sdk'
SOURCES_helm_charts_mimir_distributed='mimir'
SOURCES_helm_charts_tempo_distributed='tempo'
SOURCES_opentelemetry='opentelemetry-docs'
SOURCES_plugins_grafana_datadog_datasource='datadog-datasource'
SOURCES_plugins_grafana_oracle_datasource='oracle-datasource'
SOURCES_resources='website'

VERSIONS_as_code='UNVERSIONED'
Expand All @@ -367,8 +379,6 @@ VERSIONS_grafana_cloud_k6='UNVERSIONED'
VERSIONS_grafana_cloud_data_configuration_integrations='UNVERSIONED'
VERSIONS_grafana_cloud_frontend_observability_faro_web_sdk='UNVERSIONED'
VERSIONS_opentelemetry='UNVERSIONED'
VERSIONS_plugins_grafana_datadog_datasource='latest'
VERSIONS_plugins_grafana_oracle_datasource='latest'
VERSIONS_resources='UNVERSIONED'
VERSIONS_technical_documentation='UNVERSIONED'
VERSIONS_website='UNVERSIONED'
Expand All @@ -378,8 +388,6 @@ PATHS_grafana_cloud='content/docs/grafana-cloud'
PATHS_helm_charts_mimir_distributed='docs/sources/helm-charts/mimir-distributed'
PATHS_helm_charts_tempo_distributed='docs/sources/helm-charts/tempo-distributed'
PATHS_mimir='docs/sources/mimir'
PATHS_plugins_grafana_datadog_datasource='docs/sources'
PATHS_plugins_grafana_oracle_datasource='docs/sources'
PATHS_resources='content'
PATHS_tempo='docs/sources/tempo'
PATHS_website='content'
Expand Down Expand Up @@ -631,7 +639,7 @@ POSIX_HERESTRING

case "${_project}" in
# Workaround for arbitrary mounts where the version field is expected to be the local directory
# and the repo field is expected to be the container directory.
# and the repo field is expected to be the container directory.
arbitrary)
echo "${_project}^${_version}^${_repo}^" # TODO
;;
Expand Down Expand Up @@ -801,6 +809,10 @@ case "${image}" in
| sed "s#$(proj_dst "${proj}")#sources#"
EOF

if [ -n "${DEBUG}" ]; then
debg "${cmd}"
fi

case "${OUTPUT_FORMAT}" in
human)
if ! command -v jq >/dev/null 2>&1; then
Expand Down Expand Up @@ -837,6 +849,10 @@ EOF
/hugo/content/docs
EOF

if [ -n "${DEBUG}" ]; then
debg "${cmd}"
fi

case "${OUTPUT_FORMAT}" in
human)
${cmd} --output=line \
Expand Down
12 changes: 10 additions & 2 deletions docs/sources/k6/next/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ cards:
description: Have a particular testing need? Find k6 extensions that extend the native k6 functionality.
height: 24
- title: k6 script examples
href: ./extensions/
description: Learn how to script your tests with this list of common k6 examples.
href: ./examples/
description: Learn how to write test scripts with this list of common k6 examples.
height: 24
- title: Grafana Cloud k6
href: https://grafana.com/docs/grafana-cloud/testing/k6/
description: Leverage the k6 OSS capabilities in Grafana Cloud, with built-in dashboards, insights into your application performance, and the ability to bring together teams in one place to resolve issues faster.
height: 24
- title: k6 Studio
href: https://grafana.com/docs/k6-studio/
description: Use the k6 Studio desktop application to quickly generate test scripts using a visual interface.
height: 24
---

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/k6/next/examples/crawl-webpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ weight: 17

Refer to this [Stack Overflow answer](https://stackoverflow.com/questions/60927653/downloading-whole-websites-with-k6/) for details on how you can use k6 to crawl a web page.

You can also use the [Grafana k6 Browser Recorder](https://chromewebstore.google.com/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl), or the [k6 DevTools Recorder](https://chromewebstore.google.com/detail/k6-devtools-recorder/fkajbajcclbdgaoanencnhpfnigfipgc) to record a browser session and export it as a k6 test script.
You can also use the [Grafana k6 Browser Recorder](https://chromewebstore.google.com/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl) to record a browser session and export it as a k6 test script.
2 changes: 1 addition & 1 deletion docs/sources/k6/next/k6-studio/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ k6 Studio is a desktop application that can help you:
- Generate and customize a k6 test script from a HAR file, including the ability to use rules to quickly iterate on the script creation process.
- Test and debug k6 scripts using a visual interface. Inspect the request and response details for any request in your script.

Visit the [k6 Studio GitHub repository](https://github.com/grafana/k6-studio/) for more information and to download the application.
Visit the [k6 Studio documentation](https://grafana.com/docs/k6-studio/) for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ For example, testing advanced scenarios on websites or mobile applications, such
k6 provides three tools that can directly convert a recording into k6 script:

- [Browser recorder](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-browser-recorder) generates a k6 script from a browser session.
- [DevTools recorder](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-devtools-recorder) generates a k6 Browser script from user flows recorded in Chrome DevTools.
- [HAR converter](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-har-converter) generates a k6 script from the requests included in a HAR file.

## Steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ weight: 01

# Using the k6 DevTools recorder

{{< admonition type="caution" >}}

The k6 DevTools recorder extension is deprecated and will be removed in a future release.

{{< /admonition >}}

The k6 DevTools recorder lets you record user journeys using Chrome DevTools and then export them as a k6 script.

## Before you begin
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/k6/v0.52.x/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cards:
description: Have a particular testing need? Find k6 extensions that extend the native k6 functionality.
height: 24
- title: k6 script examples
href: ./extensions/
description: Learn how to script your tests with this list of common k6 examples.
href: ./examples/
description: Learn how to write test scripts with this list of common k6 examples.
height: 24
---

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/k6/v0.53.x/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cards:
description: Have a particular testing need? Find k6 extensions that extend the native k6 functionality.
height: 24
- title: k6 script examples
href: ./extensions/
description: Learn how to script your tests with this list of common k6 examples.
href: ./examples/
description: Learn how to write test scripts with this list of common k6 examples.
height: 24
---

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/k6/v0.53.x/examples/crawl-webpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ weight: 17

Refer to this [Stack Overflow answer](https://stackoverflow.com/questions/60927653/downloading-whole-websites-with-k6/) for details on how you can use k6 to crawl a web page.

You can also use the [Grafana k6 Browser Recorder](https://chromewebstore.google.com/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl), or the [k6 DevTools Recorder](https://chromewebstore.google.com/detail/k6-devtools-recorder/fkajbajcclbdgaoanencnhpfnigfipgc) to record a browser session and export it as a k6 test script.
You can also use the [Grafana k6 Browser Recorder](https://chromewebstore.google.com/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl) to record a browser session and export it as a k6 test script.
2 changes: 1 addition & 1 deletion docs/sources/k6/v0.53.x/k6-studio/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ k6 Studio is a desktop application that can help you:
- Generate and customize a k6 test script from a HAR file, including the ability to use rules to quickly iterate on the script creation process.
- Test and debug k6 scripts using a visual interface. Inspect the request and response details for any request in your script.

Visit the [k6 Studio GitHub repository](https://github.com/grafana/k6-studio/) for more information and to download the application.
Visit the [k6 Studio documentation](https://grafana.com/docs/k6-studio/) for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ For example, testing advanced scenarios on websites or mobile applications, such
k6 provides three tools that can directly convert a recording into k6 script:

- [Browser recorder](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-browser-recorder) generates a k6 script from a browser session.
- [DevTools recorder](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-devtools-recorder) generates a k6 Browser script from user flows recorded in Chrome DevTools.
- [HAR converter](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-har-converter) generates a k6 script from the requests included in a HAR file.

## Steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ weight: 01

# Using the k6 DevTools recorder

{{< admonition type="caution" >}}

The k6 DevTools recorder extension is deprecated and will be removed in a future release.

{{< /admonition >}}

The k6 DevTools recorder lets you record user journeys using Chrome DevTools and then export them as a k6 script.

## Before you begin
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/k6/v0.54.x/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cards:
description: Have a particular testing need? Find k6 extensions that extend the native k6 functionality.
height: 24
- title: k6 script examples
href: ./extensions/
description: Learn how to script your tests with this list of common k6 examples.
href: ./examples/
description: Learn how to write test scripts with this list of common k6 examples.
height: 24
---

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/k6/v0.54.x/examples/crawl-webpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ weight: 17

Refer to this [Stack Overflow answer](https://stackoverflow.com/questions/60927653/downloading-whole-websites-with-k6/) for details on how you can use k6 to crawl a web page.

You can also use the [Grafana k6 Browser Recorder](https://chromewebstore.google.com/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl), or the [k6 DevTools Recorder](https://chromewebstore.google.com/detail/k6-devtools-recorder/fkajbajcclbdgaoanencnhpfnigfipgc) to record a browser session and export it as a k6 test script.
You can also use the [Grafana k6 Browser Recorder](https://chromewebstore.google.com/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl) to record a browser session and export it as a k6 test script.
2 changes: 1 addition & 1 deletion docs/sources/k6/v0.54.x/k6-studio/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ k6 Studio is a desktop application that can help you:
- Generate and customize a k6 test script from a HAR file, including the ability to use rules to quickly iterate on the script creation process.
- Test and debug k6 scripts using a visual interface. Inspect the request and response details for any request in your script.

Visit the [k6 Studio GitHub repository](https://github.com/grafana/k6-studio/) for more information and to download the application.
Visit the [k6 Studio documentation](https://grafana.com/docs/k6-studio/) for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ For example, testing advanced scenarios on websites or mobile applications, such
k6 provides three tools that can directly convert a recording into k6 script:

- [Browser recorder](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-browser-recorder) generates a k6 script from a browser session.
- [DevTools recorder](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-devtools-recorder) generates a k6 Browser script from user flows recorded in Chrome DevTools.
- [HAR converter](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-har-converter) generates a k6 script from the requests included in a HAR file.

## Steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ weight: 01

# Using the k6 DevTools recorder

{{< admonition type="caution" >}}

The k6 DevTools recorder extension is deprecated and will be removed in a future release.

{{< /admonition >}}

The k6 DevTools recorder lets you record user journeys using Chrome DevTools and then export them as a k6 script.

## Before you begin
Expand Down
12 changes: 10 additions & 2 deletions docs/sources/k6/v0.55.x/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ cards:
description: Have a particular testing need? Find k6 extensions that extend the native k6 functionality.
height: 24
- title: k6 script examples
href: ./extensions/
description: Learn how to script your tests with this list of common k6 examples.
href: ./examples/
description: Learn how to write test scripts with this list of common k6 examples.
height: 24
- title: Grafana Cloud k6
href: https://grafana.com/docs/grafana-cloud/testing/k6/
description: Leverage the k6 OSS capabilities in Grafana Cloud, with built-in dashboards, insights into your application performance, and the ability to bring together teams in one place to resolve issues faster.
height: 24
- title: k6 Studio
href: https://grafana.com/docs/k6-studio/
description: Use the k6 Studio desktop application to quickly generate test scripts using a visual interface.
height: 24
---

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/k6/v0.55.x/examples/crawl-webpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ weight: 17

Refer to this [Stack Overflow answer](https://stackoverflow.com/questions/60927653/downloading-whole-websites-with-k6/) for details on how you can use k6 to crawl a web page.

You can also use the [Grafana k6 Browser Recorder](https://chromewebstore.google.com/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl), or the [k6 DevTools Recorder](https://chromewebstore.google.com/detail/k6-devtools-recorder/fkajbajcclbdgaoanencnhpfnigfipgc) to record a browser session and export it as a k6 test script.
You can also use the [Grafana k6 Browser Recorder](https://chromewebstore.google.com/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl) to record a browser session and export it as a k6 test script.
2 changes: 1 addition & 1 deletion docs/sources/k6/v0.55.x/k6-studio/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ k6 Studio is a desktop application that can help you:
- Generate and customize a k6 test script from a HAR file, including the ability to use rules to quickly iterate on the script creation process.
- Test and debug k6 scripts using a visual interface. Inspect the request and response details for any request in your script.

Visit the [k6 Studio GitHub repository](https://github.com/grafana/k6-studio/) for more information and to download the application.
Visit the [k6 Studio documentation](https://grafana.com/docs/k6-studio/) for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ For example, testing advanced scenarios on websites or mobile applications, such
k6 provides three tools that can directly convert a recording into k6 script:

- [Browser recorder](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-browser-recorder) generates a k6 script from a browser session.
- [DevTools recorder](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-devtools-recorder) generates a k6 Browser script from user flows recorded in Chrome DevTools.
- [HAR converter](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-authoring/create-tests-from-recordings/using-the-har-converter) generates a k6 script from the requests included in a HAR file.

## Steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ weight: 01

# Using the k6 DevTools recorder

{{< admonition type="caution" >}}

The k6 DevTools recorder extension is deprecated and will be removed in a future release.

{{< /admonition >}}

The k6 DevTools recorder lets you record user journeys using Chrome DevTools and then export them as a k6 script.

## Before you begin
Expand Down
Loading

0 comments on commit 5573ee1

Please sign in to comment.