Supernova framework could be a starter kit for test automation framework.
- RestUtils
- TestCase (UI)
- JSON server
- Scripts
- Data files
- Extent Report
- Allure Report
Json server could run in a container, container components reside in json-server
folder.
docker run -d -p 81:80 -v $PWD:/data -e "DB=users.json" json-server:v1
# or
docker run -d -p 81:80 -v $PWD:/data -e "DB=users.json" ghcr.io/amado-saladino/json-server:v1
container port is defined in json-server.json
config file
Env. var could be defined for the container to hold the relative path to json data source
docker-compose up -d
docker-compose start test
Before running with docker-compose
set the property REST-JSON=http://json-server
in src/main/resources/config.properties
file
Scripts can be injected in a web page, there is jquery.js
to inject jQuery in a web page
ColorPage
has a cusotm wait applied referring this example
Placeholders could be easily replaced by values
e.g. user-placeholders.json has some placeholders, these placeholders
could be replaced using RestUtils.resolveVarsInString
method.
gradle clean test
It will be automatically generated in this path build/allure-results
The HTML format needs to be compiled, to compile these results, run this command from build
directory:
allure-results
must be there where we're running this command.
allure generate --clean
allure open --port 8000
sudo npm install -g allure-commandline