This framework tool allows you to test for various REST URL APIs with various Input Parameters. The test case can just be written to xlsx sheet and will be consumed by driver written in Python laungauge. This framework allows to test API with dynamic data to test Positive, Negetive, Boundary value and equivalnce partition tests.
Testing RESTful APIs generally involves two prediticable steps -
- Invoke the API end point
- Validate the response - headers, payload etc
Most of the time, end user or manual tester are not fond of doing programming or end user reluctant of doing coding to test their REST API. For them, most easiest way, is to write test cases into Microsoft Excel tool with various input parameters and expected output. This framework supports HTTP/HTTPS RestAPI calls including all available Authentication support (OAuth, HttpBasicAuth, HttpDigestAuth)
- Perform "integration" testing of internal and external API endpoints
- Examine and test complex response payloads
- You can simply use this framework to dump and analyze API responses - headers, payload etc.
Using Python pip install following packages:
- pip install pyexcel
- pip install requests
- pip install requests_oauthlib
Note: framework has been developed run and verified on 64 bit Windows platform. This framework tool is only meant for Windows platform as we are maintaining Microsoft Excel for data input
- Class Api : This is base class wrapper for all Rest API methods (GET, POST, PUT, DELETE)
- Class ApiAuth: This clild to Api for API authentications
- scripts/testcase1.xlsx : This is file to define your test data for each test case with expected output
- setupTest.py : This define path to your test data file
- Runner.py : Main Engine to read data and run test case
- scripts: Consists of individual test cases
- bulkUrl.py : Driver file to drive and run test cases
- constructURL: Constructs the REST URL
- logger.py : Logging test case activities
Please refer following example test case to tests various REST URL in its individual methods e.g GET, POST..etc
- testcaseData.xlsx
Individual test case can be run using command:
- python bulkUrl.py -u all -d 3 (To verify all REST URLs mentioned in xlsx sheet)
- python bulkUrl.py -u 3 -d 3(To verify specific REST URL, in this case url number 3)
- Note "-u" is for test case number and "-d" is for supplying dynamic test data
- Neet to parse HTML and XLM responses
- Doc strings need to be implemented
- Coding standards need to be implemented
- Virendra Ukey
- Email : viruukey@gmail.com