Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 1.37 KB

File metadata and controls

47 lines (35 loc) · 1.37 KB

🕵️ Testing in backend

Backend uses both Robotframework and Jest to test endpoints.

☑️ Requirements

  • Backend is running with connection to db (Instructions)
  • For Robottests the required installations are (Instructions):
    • Robotframework
    • Python
    • Pip
    • Robotframework-requests (pip install robotframework-requests==0.95)

🧪 Testing

⏏️ Jest

Run Jest mocks

Add following lines to .env

OIDC_AUTH_BACKLINK_URL=http://localhost:3002/auth
OIDC_AUTH_REDIRECT_URL=http://localhost:3002/auth/oidc
  • Open terminal in the location where backend is running (if running in Docker container, open containers terminal)
  • Run following command to run tests:
npm run mock
🤖 Robotframework

Run Robotframwork tests

[Updated 6.10.2023] Currently not recommended, tests will fail because tests require username and password to be hard coded into package.json to pass, robottests are currently used in workflows where test can be ran with GitHub secrets.

Testing with robot:

  • Run following command:
npm run test