Hi! I'm Abheet I have tried to provide small solution for automating the testcases with the help of this tool, which is quite time consuming which QA guys doing in excelsheets!
Since we all knows that preparing test cases is a time consuming event and in cases where scenarios will remains same in most of the time, this tool definatily helps you to some extent. As it also upload test cases into TESTRail automatically.
if TestRails account is configured (i.e in config.ini file).
TOOL GENERATES THE CSV FILE AS OUTPUT! WHICH CAN BE USED TO BULK UPLOAD (TESTCASES INTO TESTRAIL MANUALLY)
AutoTestCase tool helps us to automate RESTful API's testcases from their swaggers or CSV template file In API testing we have to cover some basic validations which will be common for most of API , like covering Positive and Negative scenarios like :
- MIN/MAX lengths check
- Invalid data values check
- Mandatory param checks
- Optional param checks
- Dead API checks etc.
This will become more tedious work when some APIs are so huge in terms size of request/response params
i.e. hundreds of request/response parameters!
that it tooks hours of efforts to draft testcase for those api.
To overcome the problem, I have tried to solve it with a solution of automating the test cases drafting process.
From swagger or from CSV files AutoTestCase tool can generate testcases acurately even for huge APIs. in no time.
It will cover/create FOUR test cases per request parameter:
-
Two POSITIVE cases
i.e Valid Value and Mandatory Check
-
Two NEGITIVE cases
i.e Blank Value and Invalid Value
If test cases are less in numbers (i.e 100) it will automatically uploaded to TestRail with this tool. *If test cases count exceed 100 count (configurable) then we can upload the generated CSV file directly to TestRail manually.
IT SAVES TIME AND ENERGY (Especially your precious EYES).
Screenshots of application available in pdf file
Must have Python 3.x.x installed on your System -
cd \Your working dir\
-pip3 install -r requirement.txt
- After all packages installed with above command
- In your terminal/command prompt goto your working directory
Python3 StartScript.py
- Once GUI Opened.
- Browse the Swagger file and click on Proceed button.
Script might come up with some swagger errors,as it support swagger 2.0 only
Then refer CSV_testcase_TEMPLATE.csv file, Yon can prepare your template based upon API requirements i.e.
Put all your API/Parameters details w.r.t template and save the CSV file.
- Context url
- ParamName
- Maxlength
- Mandatory or not
- Request Payload
- Response etc
1. Upload the CSV file you just created w.r.t template file CSV_TestCase_TEMPLATE.csv
2. Fill the GUI form and MUST click on CHECKBOX i.e. I want to generate with csv before clicking generate button!
3. After it hit the generate button! and wait.
4. Soon you will get the popup Notification that test case are generated Successfully.
Test Case Clubbed functionality!! Auto test case generation tool actually generate test case for each and every request parameter and this might increase the test case count massively (in 1000s) so to trim down the number of testcases, we have clubbing options available here.
So with it we can club n number of OPTIONAL params in a single test case.
However for all required params there will be still 4 test cases for each required param.
We can select how many optional params should be added in a single test case, and when to use this functionality!
To use the above case Go to Src\config.ini file and set values as required.
PARAMETER_CLUB = 2
i.e. how many optional params need to be clubbed, here 2 optional params will be clubbed into single testcase.*
API_PARAM_COUNT_TRIGGER = 40
If API params count is more than 40 (i.e. 40 param into 4 test scenarios = 160 testcase) then it will be triggered and clubbed test cases will be created.
Also TestCases will be uploaded to TESTRAIL as soon as script finished with auto generation process.
Due to performance issues, if test cases generated will be more than 100 TC, then you need to manually upload the test case available in CSV file generated by this tool as OUTPUT file
Refer: HOW to Upload testcases in TestRail
I hope it will saves lots of QA time and efforts, Use it and SHARE it.
Happy testing!