diff --git a/README.md b/README.md index 064f6ad..9895e25 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ -# altinn2-tests -Tests for the Altinn 2 solution +# End-to-end tests +This repo holds end-to-end tests for Altinn 3. +Any tests that uses elements from different apis from different repos. Can be both functional and non-functional tests. Further descriptions: + +- [Performance tests](performance-tests/README.md) \ No newline at end of file diff --git a/performance-tests/README.md b/performance-tests/README.md new file mode 100644 index 0000000..4b9d1d9 --- /dev/null +++ b/performance-tests/README.md @@ -0,0 +1,6 @@ +# Performance tests +## Requirements +- [Install k6](https://grafana.com/docs/k6/latest/set-up/install-k6/) +- [Install k6 extentions](https://github.com/grafana/xk6/) +### Test cases: +- [tax report](tax-report/README.md) \ No newline at end of file diff --git a/performance-tests/tax-report/README.md b/performance-tests/tax-report/README.md new file mode 100644 index 0000000..bdbc77e --- /dev/null +++ b/performance-tests/tax-report/README.md @@ -0,0 +1,39 @@ +# Load test for tax report +Load test for tax report, does the following, divided in two separate steps + +## Steps +1. create tokens +2. upload tax report: + - create instance + - upload tax report + - callbacks and confirm (twice) + - get receipt id + - get receipt +## Run locally +1. Clone this repo +2. Go to src directory +3. build k6 with fileextention +4. run k6 extention to create tokens +4. run test +``` +git clone +cd altinn-test/performance-tests/tax-report/src +xk6 build v0.46.0 --with github.com/avitalique/xk6-file@latest +./k6 run -e env=<> -e tokengenuser=<> -e tokengenuserpwd=<> generate-tokens.js +k6 run -e serviceowner=<> tax-report.js +``` +## Github actions +### On push +Runs a test for every push to the performance-loadtest/tax-report directory +- one vu +- one minute +### Scheduled +Runs every morning at 06:15 +- 40 vus +- 15 minutes +### Ondemand +Runs when requested +- selectable number of vus +- selectable duration +- selectable runner + \ No newline at end of file