A REST API Test Framework for developing the regression suites. The test cases can be run locally or through CI/CD.
- Triggering the automation through a maven command or a testng xml file is the starting point.
- Download the latest docker-compose.yml
from here, a quicker way to download
this is to use below command
curl https://raw.githubusercontent.com/reportportal/reportportal/master/docker-compose.yml -o docker-compose.yml
- Once downloaded, execute the below command to pull the required images and start containers
docker-compose -p reportportal up -d --force-recreate
- Verify login http://localhost:8080/ui/#login with
default\1q2w3e
orsuperadmin\erebus
- Create a blank project and copy and paste the below config in
reportportal.properties
undersrc/test/resources
. See the table below. - Read these great posts written below by Automation Hacks to configure the Report portal. By far, these are the only posts with accurate steps.
Sl.No | Report portal Property Name | Report portal Property Value |
---|---|---|
1 | rp.endpoint | http://localhost:8080 |
2 | rp.api.key | <API_KEY> |
3 | rp.launch | Java launch |
4 | rp.project | api_tests |
- Create a discord account and follow the steps given here to configure a message channel and send the test reports after the test execution.
- Pass your channel's webhook token in the
ApiConstants
class. - Here we will send the Report Portal Launch URL along with test case metrics. So make sure that your report portal is up and running.
- You're ready to execute your tests now. Follow the below section.
The TestNG has a default value of thread = 5
for parallel testing.
To override the thread values use -DthreadPoolSize=3 -Ddataproviderthreadcount=3
in the below maven command
1. git clone https://github.com/iamcharankumar/api_test_framework.git
2. cd api_test_framework
3. git pull
4. mvn clean test -Dgroups=ALL_SMOKE,ALL_REGRESSION -Dthreads=3 -Ddataproviderthreadcount=3
Note:
- To run specific test cases, use appropriate Test groups present in the 'TestGroups' class.