This is a set of automated tests for testing the JokeGenerator.
Use the package manager pip to install pytest.
pip install -U pytest
python 3.6.1, pytest-6.1.2
Copy the Test folder under joke-generator-master/JokeGenerator/. Under joke-generator-master/JokeGenerator/Test, run
pytest test_JokeGenerator.py
# or
python test_JokeGenerator.py
# Run only positive tests
pytest test_JokeGenerator.py -m positive
# Run only negative tests
pytest test_JokeGenerator.py -m negative
See logs in test_JokeGenerator.log. Live logs will be displayed on the console during runtime. An example log from a previous testrun is included (test_JokeGenerator.log.example).
- This automated test suite covers positive and negative functional tests for JokeGenerator.
- This automated test suite does not cover test cases handling error from the external APIs, eg. the external API server is down or the content of the response is corrupted. For this project, it is more feasible to cover those tests in unit tests with mocks.