Akash 6ff770a214 Run TestRun on Local system functionality. | 3 years ago | |
---|---|---|
.. | ||
app | 3 years ago | |
tests | 3 years ago | |
.dockerignore | 3 years ago | |
Dockerfile | 3 years ago | |
Dockerfile.dev | 3 years ago | |
Readme.md | 3 years ago | |
app.py | 3 years ago | |
config.py | 3 years ago | |
requirements.txt | 3 years ago | |
runservice.dev.sh | 3 years ago | |
runservice.sh | 3 years ago | |
set_uploads.py | 3 years ago |
baangt Data Files is intended to store, renew, and retrieve baangt data files. The service could be achieved via HTTP requests. It provides the following end-points:
You may use the following environmental variables to configure the baangt Data Files:
Variable | Default Value | Description |
---|---|---|
SECRET_KEY | secret!key | The secret key of the app |
UPLOAD_FOLDER | uploads | Directory within the app to store the DataFiles |
Before starting the baangt Data Files application you need to:
requirements.txt
set_uploads.py
to create a directory that will be a file storage for baangt DataFilespip install -r requirements.txt
export UPLOAD_FOLDER=[path_to_uploads_in_app]
python set_uploads.py
Please use a Python WSGI Server to run the baangt Data Files application.
The application name is app
For example, to run the service with gunicorn use:
gunicorn -b :8000 --access-logfile access.log --error-logfile error.log app:app
POST http://[HOST]/save
dataFile: XLSX file comprising *baangt* test data
STATUS CODE: 200 OK
JSON:
{
"uuid": "FILE_UUID"
}
POST http://[HOST]/update/{uuid}
uuid: UUID of the Data File to be renewed
dataFile: XLSX file comprising *baangt* test data
STATUS CODE: 200 OK
JSON:
{
"uuid": "FILE_UUID"
}
GET http://[HOST]/get/{uuid}
uuid: UUID of the Data File to be retrieved
STATUS CODE: 200 OK
RAW: requested Data File
POST http://[HOST]/upload/{uuid}
uuid: UUID of the Testrun Execution the files to be assocoated with
logfile: *baangt* Testrun execution logfile
outfile: XLSX file comprising *baangt* Testrun results
STATUS CODE: 200 OK
JSON:
{
"uuid": "TESTRUN_EXECUTION_UUID",
"files": {
"logfile": "OK",
"outfile": "OK"
}
}
GET http://[HOST]/get/{uuid}/{file}
uuid: UUID of the Testrun Execution
file: the specification of the file to be retrieved (possible values: logfile, outfile)
STATUS CODE: 200 OK
RAW: requested Data File