adorsys / adorsys/status-list-server
Update Artillery performance test dependencies, tooling, and scripts
- Linguagem predominante
- Rust
- Estrelas
- 22
- Forks
- 5
- Merge médio
- 2d 6h
- PRs com merge (30d)
- 47
Descrição
## Objective
Upgrade Artillery test dependencies and tooling in `artillery-tests/` to latest versions, fix broken script paths in `package.json`, and ensure token generation and performance test executions work cleanly.
## Context
1. `artillery-tests/package.json` uses outdated dependencies (`artillery` 2.0.27, `jsonwebtoken` 9.0.2, `artillery-plugin-metrics-by-endpoint` 1.21.0).
2. `package.json` contains broken script paths (e.g. `artillery run artillery-tests/stress-test.yml` instead of `./tests/stress-test.yml`), causing commands like `npm run test:stress` to fail when run inside `artillery-tests/`.
3. `scripts/token-generator.js` hardcodes relative paths (`artillery-tests/scripts/...`) rather than resolving paths via `path.join(__dirname, ...)`, causing `ENOENT` errors when executed from different working directories.
## Deliverables
- [x] **Upgrade dependencies:**
- Bump `artillery` to latest
- Bump `jsonwebtoken` to latest
- Bump `artillery-plugin-metrics-by-endpoint` to latest
- Bump `artillery-plugin-statsd` to latest
- [x] **Fix script paths:**
- Update all test commands in `package.json` (`test:load`, `test:stress`, `test:spike`, `test:auth`) to reference `./tests/*.yml`.
- Update report scripts to output to `results/*.json`.
- [x] **Robust path resolution:**
- Update `scripts/token-generator.js` to use `path.join(__dirname, ...)` for `ec-private-key.pem`, `ec-public-key.jwk`, and `test-tokens.json`.
- Replace deprecated `substr()` with `substring()` or `slice()`.
- [x] **Verification:**
- Run `npm install` and verify clean lockfile.
- Run `npm run generate-tokens` and verify tokens are successfully created and written to disk.
- Verify test execution with Artillery.
## Acceptance Criteria
- [x] `npm install` completes cleanly with updated dependencies.
- [x] `npm run generate-tokens` succeeds regardless of whether executed from repo root or `artillery-tests/`.
- [x] All npm scripts in `artillery-tests/package.json` execute without path errors.
Guia de contribuição
Direção de pesquisa
Begin with `artillery-tests/package.json` to update dependency versions and verify the `test:load`, `test:stress`, `test:spike`, `test:auth`, and report script paths. Next inspect `artillery-tests/scripts/token-generator.js` for how `ec-private-key.pem`, `ec-public-key.jwk`, and `test-tokens.json` paths are built, and the `substr` usage. Then run `npm install`, `npm run generate-tokens`, and the `test:*` scripts in `artillery-tests/` to confirm they run cleanly from root and subfolder. Done means paths point to `./tests/*.yml`, results write to `results/*.json`, and token generation succeeds with no path errors.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript, node.js
- Domínio
- testing, tooling
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- Meio dia
- Status de atividade
- Ativa
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 55/100