Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmieulet/xk6-cognito
An example module for https://k6.io/ to get a cognito access token using USER_SRP_AUTH flow.
https://github.com/tmieulet/xk6-cognito
xk6
Last synced: 2 months ago
JSON representation
An example module for https://k6.io/ to get a cognito access token using USER_SRP_AUTH flow.
- Host: GitHub
- URL: https://github.com/tmieulet/xk6-cognito
- Owner: tmieulet
- License: apache-2.0
- Created: 2022-02-01T13:35:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T09:35:50.000Z (4 months ago)
- Last Synced: 2024-06-20T11:16:40.507Z (4 months ago)
- Topics: xk6
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xk6-cognito
An example module for https://k6.io/ to get a cognito access token using USER_SRP_AUTH flow.
See:
- to create k6 extension: https://github.com/grafana/xk6-sql/blob/master/sql.go , https://k6.io/blog/extending-k6-with-xk6/#building-the-extension-with-xk6
- to get a cognito access token: https://github.com/alexrudd/cognito-srp## Install
### Pre-built binaries
``` sh
go install go.k6.io/xk6/cmd/xk6@latest
xk6 build master --with github.com/tmieulet/xk6-cognito./k6 run --vus 1 --duration 2s /scripts/examples/loadTest.js
```
### Build from source
``` sh
git clone https://github.com/tmieulet/xk6-cognito.git && cd xk6-cognito
docker run --rm -v $(pwd):/scripts -it --entrypoint sh golang:1.17-alpinecd /scripts/
go install go.k6.io/xk6/cmd/xk6@latest
xk6 build v0.32.0 --with github.com/tmieulet/xk6-cognito="/scripts"```
### Example
In examples, change all values with ```exToChange``` then run ``` mkdir -p /scripts/target && xk6 run --vus 1 --duration 2s /scripts/examples/loadTest.js```