SMPPIR API Regression Test
Regression test is a tool for validate existent functionality with each new release of code.
Supports only CSV responses of API.
Table of content
Getting Started
Requirements
Installation
Clone this repository
git clone git@gitlab.c3sl.ufpr.br:SMPPIR/smppir-api-regression-test.git
Go to this repository
cd smppir-api-regression-test
Create a virtual environment
virtualenv -p python3.5 env
Activate the virtual environment
source env/bin/activate
Install dependencies
pip install -r requirements.txt
Usage
Configuring settings.py
Set base url to the running API. Default route of SMPPIR:
BASE_URL="https://seppirhomologa.c3sl.ufpr.br/data/api/v1/"
Local environment route:
BASE_URL="localhost:PORT"
Command Instructions
usage: manage.py <command> [<args>]
positional arguments:
command the command to run
optional arguments:
-h, --help show this help message and exit
available commands:
compare Compare multiple or one CSV route
save Save multiple or one CSV route
-h, --help show this help message and exit
--route ROUTE no description
Saving routes
The command save will save files of all routes in the list at settings file.
python manage.py save
To save specific base route
python manage.py save --route enrollment
Compare routes
The command compare will compare all requisitions of routes in the list at settings file with the saved files at route_result path. If it has some difference between the saved file and actual response of API then the command will return fail with the number of failures.
python manage.py compare
To compare specific base route with files of this specific route at route_result path.
python manage.py compare --route enrollment