For testing output
function from app.py where used the following tehniques:
- Black-box testing
- White-box testing
- Experience based testing
Test from one to 13 are used for boundary analysis and tests from 14 to 17 are used for equivalence partitioning.
Same tests as used for black-box can be used for statement coverage and decision coverage over the if statement of the output function.
In order to test the last statement of the function which is a print
, utils.py
wrapper was used alongside with Run Procces
which enables the capture of stdout
and stderr
.
Tests for input data validation and division by zero where created.
All values where used and tests where created based on tester experience since no requirement was available at the time of testing.
- Create a virtualenv:
python3 -m venv venv
- Activate virtualenv:
. ./venv/bin/activate
or.\venv\Scripts\activate.exe
- Install requirements:
pip install -r requirements.txt
- Run tests:
robot tests/
- Check report: Open
report.html