bernhardbuhl 99b2d91083 Updates KFZ, RS, Wohnen 3 years ago
..
app c7bd0d93eb import testrun directly 3 years ago
docs 444cbe6bc3 BAANGT -> baangt 3 years ago
examples 444cbe6bc3 BAANGT -> baangt 3 years ago
htmlcov 48e5210a68 UI tests 3 years ago
migrations d8a422975b Dashboard update 3 years ago
tests 99b2d91083 Updates KFZ, RS, Wohnen 3 years ago
.coverage 48e5210a68 UI tests 3 years ago
.dockerignore 6cc6ec6051 minor issues fixed 3 years ago
Dockerfile c4c8961e4d mysql dialect 3 years ago
Readme.md 444cbe6bc3 BAANGT -> baangt 3 years ago
app.py 2cfa7762b4 baangt-ui: setup testing 3 years ago
config.py 8de6807151 ui-service: documentation 3 years ago
db_supports.json a3251b69cf debugged import from json 3 years ago
db_update.py 205e078c38 support for baangt subclasses 3 years ago
requirements.txt 334eb052b2 initial v0.1 3 years ago
run_tests.sh 579c3a2063 docker env for tests and services 3 years ago
runservice.sh 579c3a2063 docker env for tests and services 3 years ago
test_2.html 7ae1be2acc tests: item edit forms 3 years ago
test_login.html f14fcc119d baangt-ui: route tests 3 years ago
testrun.db f974eecc45 run baangt Testruns with noCloneXls=False 3 years ago
testrun.json 334eb052b2 initial v0.1 3 years ago
waitforpsql.sh 579c3a2063 docker env for tests and services 3 years ago

Readme.md

baangt UI Web-Service

baangt UI Web-Service provides Web GUI for definition baangt tests. The main features of the service:

  • creating test definitions using Web GUI
  • importing test definitions from local files (XLSX, JSON formats are supported, see available examples)
  • exporting test definitions to XLSX or JSON files
  • storing test definitions in a database (see details on the database in Database Description)
  • running the defined tests via baangt Execution API

Environmental Variables

You may use the following environmental variables to configure the baangt UI Web-Service:

Variable Default Value Description
SECRET_KEY secret!key The secret key of the app
DATABASE_URL sqlite:///testrun.db Database URL
BAANGT_API_HOST 127.0.0.1:8000 The host that runs baangt Execution API
BAANGT_DATAFILE_HOST 127.0.0.1:5050 The host that runs baangt Data Files

Set-up

Before starting the baangt UI Web-Service application you need to define DATABASE_URL and run Before starting the baangt Data Files application you need to:

  • install the required python packages from requirements.txt
  • define DATABASE_URL var
  • run flask db upgrade to create required by the baangt UI Web-Service data tables
  • run python db_update.py to populate baangt UI Web-Service database with the default supporting instances
pip install -r requirements.txt
export DATABASE_URL=[your_database_url]
flask db upgrade
python db_update.py

Supporting Entities

It is easily to customize the baangt supporting entities (namely, classnames, testcases, browsers, activities, locators). You may just edit file db_supports.json and run the update script:

python db_update.py

Subclasses

To benefit subclasses that was installed in baangt Execution API service, add them to db_supports.json and update the database. For instance, to introduce subclass myTestCaseSequence.py from https://gogs.earthsquad.global/athos/baangt-subclassingDemo.git add it to db_supports.json first:

{
	"classnames": {
		"plugin.baangt-subclassingDemo.myTestCaseSequence": "Demo subclass cloned from https://gogs.earthsquad.global/athos/baangt-subclassingDemo",
		...
	},
	...
}

then update the database:

python db_ipdate.py

IMPORTANT!
Ensure, you install the new subclasses in baangt Execution API.

Run Service

Please use a Python WSGI Server to run the baangt UI Web-Service 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