A REST API Test Framework for developing the regression suites. The test cases can be run locally or through CI/CD.
- 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 |
![Test_Logs_MVN_CMD](https://private-user-images.githubusercontent.com/29479534/317114305-16b37790-994d-4a9f-9d86-ba6656b18522.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MTU0NTYsIm5iZiI6MTcxODUxNTE1NiwicGF0aCI6Ii8yOTQ3OTUzNC8zMTcxMTQzMDUtMTZiMzc3OTAtOTk0ZC00YTlmLTlkODYtYmE2NjU2YjE4NTIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE2VDA1MTkxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE4YzVlMTllYmNmYzE3MDgzMzBjNTY3NzIzYzY4ODRjZGY3MmUxZjA1OThkMmE0Mjg2Zjg2ZjlkNWQ2YTU4MTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.tCY-HQgVJCUxn6OXlAjxMrwC1KJfmoIn2Csvn28p8Fo)
![Test_Logs_Pushed_Report_Portal](https://private-user-images.githubusercontent.com/29479534/317114327-652e0be2-748b-4d9e-ab1f-b68f1698b625.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MTU0NTYsIm5iZiI6MTcxODUxNTE1NiwicGF0aCI6Ii8yOTQ3OTUzNC8zMTcxMTQzMjctNjUyZTBiZTItNzQ4Yi00ZDllLWFiMWYtYjY4ZjE2OThiNjI1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE2VDA1MTkxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWExMmYzNDRiMDUxMDYzYzU2OTYyNjU5MTNkYmIzZmUxODFjNjc0OGM3MWJlZGM2ODI4YWI5OGQwMTY2MTgyYTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.thaxPEGLBBNdfceX8hbwV7x_7KGekiJGFxbuamEQH48)
![Test_Suite_Launches_Report_Portal](https://private-user-images.githubusercontent.com/29479534/317114344-9e22ff4c-4051-4b9e-af9a-001684c7a797.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MTU0NTYsIm5iZiI6MTcxODUxNTE1NiwicGF0aCI6Ii8yOTQ3OTUzNC8zMTcxMTQzNDQtOWUyMmZmNGMtNDA1MS00YjllLWFmOWEtMDAxNjg0YzdhNzk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE2VDA1MTkxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQwMDI0MDg2YmM5YTc5MjNhNThmMWE4NTk3MTEwNzk5MjJjNDFmODAyYjhmN2YwY2RlNWY2NGJhZjc3NTg3ZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.agAfAWDl0qX6bVmKiGZOzCjfX1blR4ypKqyBP420yRE)
- 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.
![Discord_Test_Report](https://private-user-images.githubusercontent.com/29479534/318213585-67c65fe5-a340-4e63-aa45-64d153704ad9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MTU0NTYsIm5iZiI6MTcxODUxNTE1NiwicGF0aCI6Ii8yOTQ3OTUzNC8zMTgyMTM1ODUtNjdjNjVmZTUtYTM0MC00ZTYzLWFhNDUtNjRkMTUzNzA0YWQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE2VDA1MTkxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThhMzk2ZGU5MjYxZDlkNDMyYmIxYWUxOGJlM2FjMzdmZTQ0YTg3MTA3YWQ1ZmNlNDUwYTk0NTc2ZjZjYjFmMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.sMoox6ADpKrTeU08_24dw-i7h3h9EVJvZ4PxhnGhExw)
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 -Dtestng.parallel=methods
Note:
- To run specific test cases, use appropriate Test groups present in the 'TestGroups' class.