Skip to content

Add authentication to load tests#3246

Open
rhysyngsun wants to merge 7 commits into
mainfrom
nl/perf-tests-auth
Open

Add authentication to load tests#3246
rhysyngsun wants to merge 7 commits into
mainfrom
nl/perf-tests-auth

Conversation

@rhysyngsun
Copy link
Copy Markdown
Contributor

@rhysyngsun rhysyngsun commented Apr 24, 2026

What are the relevant tickets?

Part of https://github.com/mitodl/hq/issues/11039

Description (What does it do?)

This adds code that logs the tests in via Keycloak so they can poke around as an authenticated user.

How can this be tested?

  • Create a file for test user auth info in load_testing/data/ (e.g. load_testing/data/users.json) per the readme instructions.
  • Run the load tests with user auth:
    k6 run learn.smoke.ts \
      -e BACKEND_BASE_URL=https://api.learn.odl.local \
      -e FRONTEND_BASE_URL=https://learn.odl.local \
      -e USERS_JSON_FILE=data/users.json \
      -e SSO_BASE_URL=https://keycloak.odl.local \
      -e IGNORE_HTTPS_ERRORS=true \
      --console-output test.log
  • Inspect the output in test.log, you should see log statements regarding successful logins

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

OpenAPI Changes

No changes detected

View full changelog

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@rhysyngsun rhysyngsun force-pushed the nl/perf-tests-auth branch 2 times, most recently from 177d412 to 193b2f8 Compare May 12, 2026 01:52
Comment thread load_testing/frontend/test.ts Fixed
Comment thread load_testing/frontend/test.ts Fixed
@rhysyngsun rhysyngsun marked this pull request as ready for review May 12, 2026 18:15
@rhysyngsun rhysyngsun force-pushed the nl/perf-tests-auth branch from d6e51c8 to 1b402dc Compare May 12, 2026 18:56
@rhysyngsun rhysyngsun changed the title Update auth setup Add authentication to load tests May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants