Skip to content

Comments

feat: Adds api integration tests#5

Merged
cmkrist merged 1 commit intoOpenChamp:mainfrom
m3rchant-man:tests/api_tests
Oct 30, 2025
Merged

feat: Adds api integration tests#5
cmkrist merged 1 commit intoOpenChamp:mainfrom
m3rchant-man:tests/api_tests

Conversation

@m3rchant-man
Copy link
Contributor

Description

  • Adds a run_tests.sh script to automate environment setup and test execution.
  • Includes initial tests for the /health and /register endpoints.

Running

  1. Ensure python3 is installed.
  2. Run the following command to build the test environment and execute the tests:
    bash _scripts/run_tests.sh --build
  3. Verify that all tests pass, as shown in the example output below.

Example run

$ bash run_tests.sh --build
Setting up Python virtual environment...
Creating virtual environment at /home/merchant/Documents/Project/openchampPS/tests/.venv...
Installing dependencies from /home/merchant/Documents/Project/openchampPS/tests/requirements.txt...
...

...
Installing collected packages: urllib3, pluggy, packaging, iniconfig, idna, charset-normalizer, certifi, requests, pytest
Successfully installed certifi-2025.10.5 charset-normalizer-3.4.4 idna-3.11 iniconfig-2.3.0 packaging-25.0 pluggy-1.6.0 pytest-8.2.0 requests-2.31.0 urllib3-2.5.0
Setup complete.
Running integration tests...
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.12.3, pytest-8.2.0, pluggy-1.6.0
rootdir: /home/merchant/Documents/Project/openchampPS
collected 3 items                                                                                                                                                                                                                            

../tests/test_api.py ...                                                                                                                                                                                                               [100%]

============================================================================================================= 3 passed in 0.11s ==============================================================================================================

@cmkrist cmkrist merged commit 73268f1 into OpenChamp:main Oct 30, 2025
1 check passed
@cmkrist cmkrist self-assigned this Oct 30, 2025
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