Groovy Flavor of Supernova framework.
- RestUtils
- TestCase (UI)
- JSON server
- Scripts
- Data files
- YAML configuration
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" ghcr.io/amado-saladino/json-server:v1
container port is defined in json-server.json
config file
Scripts can be injected in a web page, there is jquery.js
to inject jQuery in a web page
Placeholders could be easily replaced by values
e.g. user-placeholders.json has some placeholders, these placeholders
could be replaced using RestUtils.resolveVarsInString
method.
Enjoy the high flexibility of Dynamic Programming
of Groovy lang.
gradle clean test
gradle clean test --tests TestDataSource # class
gradle clean test --tests TestDataSource.*json* # pattern of method
gradle clean test --tests TestDataSource."use excel sheet as data source" # a specific method
docker build -t gradle-test .
docker run -v `pwd`:/app -v gradle-repo:/root/.gradle/caches/modules-2/files-2.1 amadosaladino/selenium-gradle
docker run -v gradle-repo:/root/.gradle/caches/modules-2/files-2.1 -v `pwd`:/app amadosaladino/selenium-gradle clean test --tests TestHome."show page elements"
docker run --rm --name=report -d -v $PWD/build/reports/tests/test:/usr/share/nginx/html -p 80:80 nginx:1.14
Screenshots taken during test run could be displayed this way:
docker run -d -v $PWD/screenshots:/Pictures:ro -p 81:80 --name gallery ghcr.io/linuxserver/photoshow
docker-compose up -d
docker-compose start test
Note When running
docker-compose
, editsrc/resources/config.yml
and setRESTJSON
property tojson-server:80