Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/msaf1980/xk6-getenv

read environment variables with default value in k6
https://github.com/msaf1980/xk6-getenv

k6 k6-extension xk6

Last synced: about 2 months ago
JSON representation

read environment variables with default value in k6

Awesome Lists containing this project

README

        

# xk6-getenv

This is a [k6](https://go.k6.io/k6) extension using the [xk6](https://github.com/grafana/xk6) system.

| :exclamation: This is a proof of concept, isn't supported by the k6 team, and may break in the future. USE AT YOUR OWN RISK! |
| ---------------------------------------------------------------------------------------------------------------------------- |

This projects implements read environment variables with default value (for dynamic configure tests)

## Build

To build a `k6` binary with this extension, first ensure you have the prerequisites:

- [gvm](https://github.com/moovweb/gvm)
- [Git](https://git-scm.com/)

Then, install [xk6](https://github.com/grafana/xk6) and build your custom k6 binary with increment extension:

1. Install `xk6`:
```shell
$ go install go.k6.io/xk6/cmd/xk6@latest
```

2. Build the binary:
```shell
$ xk6 build --with github.com/msaf1980/xk6-getenv@latest
```