Tools supporting test automation frameworks: Java 17, Selenium 4.4.0, TestNG, Lombok, OpenCSV, REST Assured, Kubernetes and Jenkins (Soon), Allure Reports, Slack API (Soon), SeleniumGrid, WebDriverManager, Saucelabs (Soon), Owner framework, Salesforce API Rest.
In terminal type mvn test
-> This will run all tests from tests package.(src/test/java/testCases)
You can pass some environment values e.g:
-Dbrowser=chrome
This will run your test cases using a specific browser, the available browser are firefox and chrome.-Ddriver.remote.server=local
This will specify in which environment you want to run your test cases, the available environments arelocal
andsaucelab
.-Dsauce.platform.name=Windows11
Platform on which test cases will be running on Saucelab.-Dsauce.browser.version=latest
Browser version in Saucelab.-Dsauce.user=none
Saucelab username.-Dsauce.key=none
Saucelab access key.-Dheadless=false
Specify if you want to run your browser in headless mode.-Dtestng.parallel=methods
You can choose how to run your test cases in parallel, the available options are betweenmethods
,tests
,classes
orinstances
.-Dtestng.threads=1
The size of the thread pool for running in parallel.-Dtestng.groups=sanity
The list of groups you want to be excluded from this run.-Dselenium.grid.url=http://local-testing.com
* Selenium endpoint to run test cases on kubernetes containers. *
Currently, only Rest-Assured is supported. Some materials that would be useful for expanding the API tests:
- JSONPath Online Evaluator
- Expressions in JSONPath
- Read JSON Response Body using Rest Assured
- Rest Assured Tutorial
We also support Salesforce API request, please take a look:
- Jenkins: Soon...
- Allure: In terminal type
allure open
to open the allure report.
Here are the steps to deploy the Grid to a Kubernetes cluster on development:
- Initialize kubernetes locally:
$ minikube start
. - Install the NGINX ingress controller:
$ minikube addons enable ingress
NGINX Installation Guide. - Configure your localhost to point hostname to kubernetes cluster: The private URL to access on the grid is defined as local-testing.com into k8s/ingress-nginx.yaml file:
- Windows: Edit this file
C:\Windows\System32\drivers\etc\hosts
and place the result of$ minikube ip
alongside of local-testing.com URL, e.g.:192.168.99.100 local-testing.com
. - Unix: Sames as windows but within this file
/etc/hosts
.
- Windows: Edit this file
- Deploy all the grid components to kubernetes:
$ kubectl apply -f k8s
.
Run your test cases on Selenium grid:
- Make sure that SeleniumGrid is running properly, check http://local-testing.com.
- In terminal type
mvn test -Dselenium.grid.urlr=http://local-testing.com
This project is licensed under the MIT License - see the LICENSE.md file for details