Package: test-rest-api
TEST REST APICreate fast modernasynchronoustests forREST APItesting#FAST #EASY #ASYNC #RESTAPI #TESTING #AUTOMATIONFeaturesInstallationUsageBasic usageSet report pathSet .env pathSet testdata pathSet hashtagsProject structureCommand line executionExamplesMy first testConfigure my testReplace inbuilt assertMy first logSet global variables valueSet global variables value as constantGet global variables valueMy first bugConfigure my bugMy first rest apiConfigure my rest apiReuse my rest apiSend my rest apiRest api responseDemo with all the above featuresReportsMy first reportAsync tests reportSync tests reportSync & Async reportMulti status reportMulti bug reportRest api errorsGlobal variables errorsBug errorsLogger errorsUnexpected errorsAuthorLicenseFeaturesAsyncronusprogramming (Powered byasyncio)Auto discoveryof test modules and functionsSupports bothasyncronus&syncronuoustestsHigh speedtest executions using async functionsHtml test reportingwith custom logs & summary dashboardsCreate complex flows usingparameterization&correlationGroupsimilar tests using hashtags eg:#smokeSupportsCI/CDtest automation integrationsDesigned to beeasyto use & learnInstallationIf you already havePythonwithpipinstalled, you can simply run:pip install test_rest_apiUsage1. Basic usagefromtest_rest_apiimportRunnerrunner=Runner(test_suite_path="/Documents/Testsuite")runner.run()Test can be executed from.pyfile using thetest_rest_apimoduleImportRunnerfromtest_rest_apiCreate an instance ofRunnerThe basic usage is by providingtest_suite_pathRemainingattributesareoptionalfor Runner instance creationtest_suite_pathcan be a file or folder pathWe canorganisefolders, sub folders and python files in anycustomstructuretest_rest_api willautodetectpython files and folders asTest suitesCallrun()method to execute the tests2. Set report pathfromtest_rest_apiimportRunnerrunner=Runner(test_suite_path="/Documents/Testsuite",test_result_path='/Documents/Result')runner.run()In the above example,html test reportis saved under the same test folder pathWe can save the final report to ourcustom pathby providingtest_result_pathattributetest_rest_apicreatesbeautiful rich test report with summary dashboardsWe can also add ourcustom logsto each individual tests in the test report3. Set .env pathfromtest_rest_apiimportRunnerrunner=Runner(test_suite_path="/Documents/Testsuite",env_path='/Documents/.env')runner.run()We canset variableswith values, example Domain, Username, Password etc. in.env filetest_rest_api willauto fetchall these values and save underenvironmentenvironmentcan be accessed in tests forparametrizationOne example can bedynamicurl creation. Domain can beparameterisedin url creationThis will also help developers to run the same tests indifferent environmentsby creating separate .env filesWe cansetthe environment variables by providingenv_pathattribute4. Set testdata pathfromtest_rest_apiimportRunnerrunner=Runner(test_suite_path="/Documents/Testsuite",test_data_path='/Documents/Testdata/')runner.run()We canset testdatawith values, example products list, credit card details etc. in.json filestest_data_pathcan be a json file or folder pathWe canorganisefolders, sub folders and json files in anycustomstructuretest_rest_api willautodetectjson files and folders asTestdatatestdatacan be accessed in tests forparametrizationThis will also help developers to run the same tests withdifferent testdataby creating separate testdata foldersWe cansetthe testdata variables by providingtest_data_pathattribute5. Set hashtagsfromtest_rest_apiimportRunnerrunner=Runner(test_suite_path="/Documents/Testsuite",test_tags=['#SMOKE'])runner.run()Groupyour test by providing tags in test creationThis helps toexecutea group of testcases, examplesmoke testing,regression testingetc.test_rest_api will fetch all tests with theprovided tagsand executes themWe can set thehashtagsfor execution by providing _test_tagsattributeWhennotags are provided,all the testsare executedWhen we provide asingle tag, only those testcases with that tag are executedSome tests like login shouldrun alwaysfor all tags irrespective of the valueIn this case it's not practical to add all tags to the login test functionAddingall tagswill be hard to maintain when we introduce new custom tagsTo tackle this issue, we can use inbuilt#ALWAYS tag#ALWAYStagged tests will always be executed. It will not be skippedTests like login, logout etc. areperfect candidatesfor #ALWAYS6. Project structure.
├── api                           # Store all your rest api files
│   ├── auth                      # Custom structure for subfolders & files
│   │   ├── login.py              # Python file to store rest_api code
│   │   │   ├── def user_login()  # Python function to create rest_api
│   │   │   ├── def admin_login()
│   │   │   └── ...    
│   │   └── ...
│   └── ...
├── testsuite                     # Root testsuite folder
│   ├── auth                      # Custom structure for subfolders & files
│   │   ├── login.py              # Python file as testsuite to store tests
│   │   │   ├── async def t001()  # Python async function as testcases
│   │   │   ├── async def t002()
│   │   │   └── ...    
│   │   └── ...
│   └── ...
└── ...2 sub foldersapi&testsuiteAnycustom namescan be used instead ofapi&testsuiteapishould store all the api creation python filestestsuiteshould store all the test creation python filesAnycustom structurewith multiple sub folders can be used to organise the filesSeparatingapi from tests will avoidcode duplicationfor rest_api creationRoot testsuite folderpathwill be used in command lineexecutionvalue for-tExamples1. My first testfromtest_rest_apiimporttest@test()asyncdefmy_first_test():assert4==5Create anasyncpython function with anycustomnameDecorate the function using@test()Asyncpython functions decoratd with@test()will be auto-detected as testcaseNormalpython functions decoratd with@test()willnotbe considered as testcaseCongrats !You have successfully created your first test (my_first_test)Now let'sexecuteit from command line . . .Createa
pythonvirtual environmentInstalltest_rest_apiusingcommandpip install test_rest_apiCreate new python file (eg:my_first_testsuite.py) and paste the above codeExecute the test from thecommand lineusing the test_rest_api module directlypython -m test_rest_api -t "<Test folder/file path>" -r "Result folder path"2. Configure my testfromtest_rest_apiimporttest@test(name='Custom Name',desc='Description',enabled=True,tags=['SMOKE','ABC'],is_async=True,execution_order='1')asyncdefmy_second_test():assert4==5In our first example, we used @test() decorator withempty parametersIn this example, we areusing parametersto configure our test functionThis can be considered as addingsettingsto your test functionnameMandatory: FalseData Type: strExpected: Custom name for your testDefault: Function namedescMandatory: FalseData Type: strExpected: Test descriptionDefault: Empty stringenabledMandatory: FalseData Type: boolExpected: True or False. Provide False, to disable the testDefault: TruetagsMandatory: FalseData Type: listExpected: List of tags. Group your tests with custom tagsDefault: Empty listis_asyncMandatory: FalseData Type: boolExpected: True or False. Provide False, to run tests sequentiallyDefault: Trueexecution_orderMandatory: FalseData Type: strExpected: Custom text for ordering. This will work only when is_async = FalseDefault: 'zzzzz'3. Replace inbuilt assertfromtest_rest_apiimporttest,Assert@test()asyncdefmy_first_logger():# assert 4 == 5Assert.equal(4,5)Assert is same as inbuilt python assert statementUsing test rest api Assert class improves loggingAssertions done using Assert will be automatically logged in final html reportIt isrecommendedto use Assert instead of inbuilt assert statement for all your tests4. My first logfromtest_rest_apiimporttest@test()asyncdefmy_first_logger():print('My 1st log')print('My 2nd log')assert4==5Python inbuiltprint()function is used to addcustom messagesto the final html test reportAdd print() functions inside yourtest functionAdd any number of log messages without any limitIt isrecommendedto add logs for all your testsNote:print()statements will not be printed to console5. Set global variables valuefromtest_rest_apiimporttest,GlobalVariables@test()asyncdefset_global_variables_value():GlobalVariables.set(name='token',value='token from response')Global variables are used tosave&retrievevalues in runtimeThis will help inparameterizationandcorrelationof testsSaveTokenfrom login api response in your first testRetrieve this Token in all yourupcoming testsfor authenticationHere we will learn how tosetthe value in GlobalVariablesGlobalVariables.set(name='token', value='token from response')nameMandatory: TrueData Type: strExpected: Custom name for your global variablevalueMandatory: TrueData Type: anyExpected: Any python data type can be stored as global variables value6. Set global variables value as constantfromtest_rest_apiimporttest,GlobalVariables@test()asyncdefset_global_variables_value_as_constant():GlobalVariables.set(name='pi',value=3.14,is_constant=True)In the above example we learned tosetvalue to global variablesMultiple setcalls are possible for the same variableToken variable can beset againin a different test functionTo avoid this, we can set global variables as aconstantvalueUseis_consantoptional parameter & make it TrueGlobalVariables.set(name='pi', value=3.14, is_constant=True)nameMandatory: TrueData Type: strExpected: Custom name for your global variablevalueMandatory: TrueData Type: anyExpected: Any python data type can be stored as global variables valueis_constantMandatory: FalseData Type: boolExpected: True or False. Provide True, to create constantsDefault: False7. Get global variables valuefromtest_rest_apiimporttest,GlobalVariables@test()asyncdefget_global_variables_value():token:str=GlobalVariables.get(name='token')pi:float=GlobalVariables.get(name='pi')In the above examples we learned tosetvarying and constant value to global variablesNow it's time toretrievethem in our testsPlease make sure to usevalid variable nameswhile retrieving the valuesIf the variable name isnot presentin global variables, test willterminate with errorGlobalVariables.get(name='token')nameMandatory: TrueData Type: strExpected: Valid name of any saved global variable8. My first bugfromtest_rest_apiimporttest,Bug@test()asyncdefmy_first_bug():Bug()Bug is used toraise issuesin testsAdd customchecksin your tests to validaterest api responseIfactual resultis not theexpected result, just callBug()This willterminatethe current test function executionBugdetailscan be viewed in final html testreport9. Configure my bugfromtest_rest_apiimporttest,Bug,Logger@test()asyncdefmy_second_bug():logger=Logger()logger.log('step 1')logger.log('step 2')logger.log('Consider all steps are logged')Bug(message="msg",priority=Bug.PRIORITY.BLOCKER,actual_result="",expected_result="",steps_to_reproduce=logger)In our first bug example, we used Bug() withempty attributesIn this example, we areusing attributesto configure our BugThis can be considered as addingmore infoto your bug in the final html test reportWe are adding customloggingin this example to show how logger instance isuseful in Bug creationLogger instance variable can be passed tosteps_to_reproduceattribute during Bug creationBug(message='', priority='', actual_result='', expected_result='', steps_to_reproduce='')messageMandatory: FalseData Type: strExpected: Custom message for your bugDefault: Empty stringpriorityMandatory: FalseData Type: strExpected: Priority for this bug. Supported list: Bug.PRIORITY.[ items ]Default: Empty stringactual_resultMandatory: FalseData Type: strExpected: Provide the actual resultDefault: Empty stringexpected_resultMandatory: FalseData Type: strExpected: Provide the expected resultDefault: Empty liststeps_to_reproduceMandatory: FalseData Type: strExpected: Logger instance can be used to auto-populate this fieldDefault: Empty string10. My first rest apifromtest_rest_apiimporttest,RestApi@test()asyncdefmy_first_rest_api():rest_api=RestApi(url='https://dummyjson.com/products/1')RestApi is usedcreaterest api instance in testsHere we have created a basic rest api with just theurl informationThis example is only about creating rest api, nosend actionis performed hereWe will use thisinstance variablefor sending the request in upcoming examples11. Configure my rest apifromtest_rest_apiimporttest,RestApi@test()asyncdefconfigure_my_rest_api():rest_api=RestApi(url='my url',parameters={'p1':'v1','p2':'val2'},headers={'h1':'v1','h2':'val1'},body={})In the above example, we have only usedurl attributefor rest api creationOther attributes for creation areparameters,headersandbodyThis example shows the syntax for adding theseoptional attributesurlMandatory: TrueData Type: strExpected: Rest api urlparametersMandatory: FalseData Type: dictExpected: Key value pairs of parameter name & valueDefault: {}headersMandatory: FalseData Type: dictExpected: Key value pairs of header name & valueDefault: {}bodyMandatory: FalseData Type: dictExpected: Provide the json request payloadDefault: {}12. Reuse my rest apifromtest_rest_apiimportRestApi,GlobalVariablesdeflogin_api(username:str,password:str):domain=GlobalVariables.get('DOMAIN')url=f'https://{domain}/login'body={'username':username,'password':password}returnRestApi(url=url,body=body)A rest api will be used formultiple testsCreationof rest apiinsidetest async functions will result incode duplicationDuplicate code makes your programlengthyand decreases your codequalityUpdating&maintainingthis rest api creations inmultipletests will be difficultNew changesto rest api, will result in changing thesame code multiple timesTo avoid duplication, we can use aseparate folderfor rest api filesUse pythonfunctionsto create a rest api which will avoidcode duplicationYou cancalla function100times instead ofwritingit100timesIn this example we have created a simplelogin apiAll thedynamic valuesfor rest api creation can be passed as functionparametersThis helps in calling the same api withdifferent inputsReturn theRestApi instancewhich can be used in test functions forsending13. Send my rest apifromtest_rest_apiimporttest,RestApi@test()asyncdefsend_my_rest_api():rest_api=RestApi(url='https://dummyjson.com/products/1')response1=awaitrest_api.get()response2=awaitrest_api.send(method='get')response3=awaitrest_api.send(method=rest_api.METHODS.GET)In the above examples, we learned tocreatea rest apiNow it's time tosendthem using http methodsSupportedhttp methods are GET, POST, PUT, PATCH, DELETE, OPTIONS & HEADHere we are sending the rest_api usingGEThttp methodAll the responses (1, 2 & 3) will have thesame resultBecause they perform the same functionality withdifferent syntaxSimilarly,other http methodscan be used, with your desired syntax14. Rest api responsefromtest_rest_apiimporttest,RestApi@test()asyncdefsend_my_rest_api():rest_api=RestApi(url='https://dummyjson.com/products/1')response=awaitrest_api.get()status_code=response.status_codebody=response.bodyheaders=response.headerscontent_type=response.content_typeobj=response.objWe have covered rest apicreation&sendingpartNow lets see more about theresponse objectMostlyall checkswill be performed using response object dataResponse object contains the below detailsresponse.status_codeData Type: intValue: Response status coderesponse.bodyData Type: dictValue: Response bodyresponse.headersData Type: dictValue: Response headersresponse.content_typeData Type: strValue: Response content typeresponse.objData Type: aiohttp.ClientResponseValue: Python aiohttp ClientResponse object15. Demo with all the above features.env file
---------

DOMAIN=dummyjson.comfromtest_rest_apiimporttest,RestApi,Bug,Logger,GlobalVariables@test(name='Demo',desc='All features')asyncdefdemo():logger=Logger()logger.log('Starting the test')logger.log('Creating rest api')domain=GlobalVariables.get('DOMAIN')rest_api=RestApi(url=f"https://{domain}/products/1")logger.log('Sending rest api')response=awaitrest_api.get()logger.log(f'Response code ={response.status_code}')logger.log(f'Response body ={response.body}')logger.log('Validate response code')ifresponse.status_code!=200:Bug(message='Invalid status code',priority=Bug.PRIORITY.MINOR,actual_result=response.status_code,expected_result='200',steps_to_reproduce=logger)logger.log('Save price details to global variables')title=response.body.get('title','')price=response.body.get('price','')GlobalVariables.set(name=title,value=price)logger.log('Successfully completed the test')Reports1. My first reportSingle basic test withPASSstatusClick here to view the html reportConsole output2023-04-0815:40:22,712:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0815:40:22,712:Startingtestsetup2023-04-0815:40:22,712:Autodetectingtestsuites2023-04-0815:40:22,712:Totaltestsuites:12023-04-0815:40:22,712:Autodetectingtests2023-04-0815:40:22,713:Totalsynchronoustests:02023-04-0815:40:22,714:Totalasynchronoustests:12023-04-0815:40:22,714:Totaltests:12023-04-0815:40:22,714:Createdaiohttpclientsession2023-04-0815:40:22,714:Completedtestsetup2023-04-0815:40:22,714:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0815:40:22,714:PASSmy_first_test(rootfile)[1]2023-04-0815:40:22,715:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:PASSTests:1Start:2023-04-0815-40-22End:2023-04-0815-40-22Duration:0.000956233secondsTags:[]PASS:1FAIL:0ERROR:0DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:0BUG:0LOGGER:0UNEXPECTED:02. Async tests report5asynctestsEach tests takes1 secondto completeClick here to view the html reportConsole output2023-04-0815:52:05,062:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0815:52:05,062:Startingtestsetup2023-04-0815:52:05,062:Autodetectingtestsuites2023-04-0815:52:05,062:Totaltestsuites:12023-04-0815:52:05,062:Autodetectingtests2023-04-0815:52:05,063:Totalsynchronoustests:02023-04-0815:52:05,063:Totalasynchronoustests:52023-04-0815:52:05,063:Totaltests:52023-04-0815:52:05,063:Createdaiohttpclientsession2023-04-0815:52:05,063:Completedtestsetup2023-04-0815:52:05,063:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0815:52:06,064:PASStestcase_1(rootfile)[1]2023-04-0815:52:06,064:PASStestcase_2(rootfile)[2]2023-04-0815:52:06,065:PASStestcase_3(rootfile)[3]2023-04-0815:52:06,065:PASStestcase_4(rootfile)[4]2023-04-0815:52:06,065:PASStestcase_5(rootfile)[5]2023-04-0815:52:06,066:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:PASSTests:5Start:2023-04-0815-52-05End:2023-04-0815-52-06Duration:1.002069748secondsTags:[]PASS:5FAIL:0ERROR:0DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:0BUG:0LOGGER:0UNEXPECTED:03. Sync tests report5synctestsEach tests takes1 secondto completeClick here to view the html reportConsole output2023-04-0815:56:19,128:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0815:56:19,129:Startingtestsetup2023-04-0815:56:19,129:Autodetectingtestsuites2023-04-0815:56:19,129:Totaltestsuites:12023-04-0815:56:19,129:Autodetectingtests2023-04-0815:56:19,129:Totalsynchronoustests:52023-04-0815:56:19,129:Totalasynchronoustests:02023-04-0815:56:19,129:Totaltests:52023-04-0815:56:19,129:Createdaiohttpclientsession2023-04-0815:56:19,129:Completedtestsetup2023-04-0815:56:19,130:=======================================================||................SYNC-TESTS...............||=======================================================2023-04-0815:56:20,131:PASStestcase_1(rootfile)[1]2023-04-0815:56:21,132:PASStestcase_2(rootfile)[2]2023-04-0815:56:22,132:PASStestcase_3(rootfile)[3]2023-04-0815:56:23,134:PASStestcase_4(rootfile)[4]2023-04-0815:56:24,135:PASStestcase_5(rootfile)[5]2023-04-0815:56:24,137:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:PASSTests:5Start:2023-04-0815-56-19End:2023-04-0815-56-24Duration:5.006235552secondsTags:[]PASS:5FAIL:0ERROR:0DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:0BUG:0LOGGER:0UNEXPECTED:04. Sync & Async report5sync&asynctests eachTotal10testsEach tests takes1 secondto completeClick here to view the html reportConsole output2023-04-0815:59:38,170:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0815:59:38,170:Startingtestsetup2023-04-0815:59:38,170:Autodetectingtestsuites2023-04-0815:59:38,170:Totaltestsuites:12023-04-0815:59:38,170:Autodetectingtests2023-04-0815:59:38,172:Totalsynchronoustests:52023-04-0815:59:38,172:Totalasynchronoustests:52023-04-0815:59:38,172:Totaltests:102023-04-0815:59:38,173:Createdaiohttpclientsession2023-04-0815:59:38,173:Completedtestsetup2023-04-0815:59:38,173:=======================================================||................SYNC-TESTS...............||=======================================================2023-04-0815:59:39,174:PASStestcase_1(rootfile)[1]2023-04-0815:59:40,176:PASStestcase_2(rootfile)[2]2023-04-0815:59:41,177:PASStestcase_3(rootfile)[3]2023-04-0815:59:42,178:PASStestcase_4(rootfile)[4]2023-04-0815:59:43,180:PASStestcase_5(rootfile)[5]2023-04-0815:59:43,180:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0815:59:44,182:PASStestcase_async_1(rootfile)[6]2023-04-0815:59:44,182:PASStestcase_async_2(rootfile)[7]2023-04-0815:59:44,183:PASStestcase_async_3(rootfile)[8]2023-04-0815:59:44,183:PASStestcase_async_4(rootfile)[9]2023-04-0815:59:44,183:PASStestcase_async_5(rootfile)[10]2023-04-0815:59:44,185:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:PASSTests:10Start:2023-04-0815-59-38End:2023-04-0815-59-44Duration:6.01064299secondsTags:[]PASS:10FAIL:0ERROR:0DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:0BUG:0LOGGER:0UNEXPECTED:05. Multi status report5asynctests with differentstatusvaluesStatus list: PASS, FAIL, ERROR, DISABLE & SKIPClick here to view the html reportConsole output2023-04-0816:17:44,328:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0816:17:44,329:Startingtestsetup2023-04-0816:17:44,329:Autodetectingtestsuites2023-04-0816:17:44,329:Totaltestsuites:12023-04-0816:17:44,329:Autodetectingtests2023-04-0816:17:44,330:Totalsynchronoustests:02023-04-0816:17:44,330:Totalasynchronoustests:52023-04-0816:17:44,330:Totaltests:52023-04-0816:17:44,330:Createdaiohttpclientsession2023-04-0816:17:44,330:Completedtestsetup2023-04-0816:17:44,330:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0816:17:44,330:ERRORt_error(rootfile)[2]2023-04-0816:17:44,331:FAILt_fail(rootfile)[3]2023-04-0816:17:44,331:PASSt_pass(rootfile)[4]2023-04-0816:17:44,332:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:FAILTests:5Start:2023-04-0816-17-44End:2023-04-0816-17-44Duration:0.001355524secondsTags:['SMOKE']PASS:1FAIL:1ERROR:1DISABLE:1SKIP:1LOW:0MINOR:0MAJOR:1CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:0BUG:0LOGGER:0UNEXPECTED:16. Multi bug report5asynctests with differentbug priorityvaluesPriority list: LOW, MINOR, MAJOR, CRITICAL, BLOCKERClick here to view the html reportConsole output2023-04-0816:30:21,400:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0816:30:21,400:Startingtestsetup2023-04-0816:30:21,400:Autodetectingtestsuites2023-04-0816:30:21,400:Totaltestsuites:12023-04-0816:30:21,400:Autodetectingtests2023-04-0816:30:21,401:Totalsynchronoustests:02023-04-0816:30:21,401:Totalasynchronoustests:52023-04-0816:30:21,401:Totaltests:52023-04-0816:30:21,402:Createdaiohttpclientsession2023-04-0816:30:21,402:Completedtestsetup2023-04-0816:30:21,402:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0816:30:21,402:FAILt_blocker(rootfile)[1]2023-04-0816:30:21,404:FAILt_critical(rootfile)[2]2023-04-0816:30:21,404:FAILt_low(rootfile)[3]2023-04-0816:30:21,404:FAILt_major(rootfile)[4]2023-04-0816:30:21,404:FAILt_minor(rootfile)[5]2023-04-0816:30:21,406:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:FAILTests:5Start:2023-04-0816-30-21End:2023-04-0816-30-21Duration:0.003122595secondsTags:[]PASS:0FAIL:5ERROR:0DISABLE:0SKIP:0LOW:1MINOR:1MAJOR:1CRITICAL:1BLOCKER:1RESTAPI:0GLOBALVARIABLES:0BUG:0LOGGER:0UNEXPECTED:07. Rest api errorsDevelopers can makeerrorswhile codingGeneralerror exceptionmessageswill increase the time tofindandfixthese issuestest_rest_api providesshort&preciseerror's with exacttracebackinfoHere we arepurposefullymaking errors inRestApifunctionsClick here to view the html reportConsole output2023-04-0819:41:19,099:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0819:41:19,099:Startingtestsetup2023-04-0819:41:19,099:Autodetectingtestsuites2023-04-0819:41:19,099:Totaltestsuites:12023-04-0819:41:19,099:Autodetectingtests2023-04-0819:41:19,099:Totalsynchronoustests:02023-04-0819:41:19,099:Totalasynchronoustests:122023-04-0819:41:19,099:Totaltests:122023-04-0819:41:19,099:Createdaiohttpclientsession2023-04-0819:41:19,099:Completedtestsetup2023-04-0819:41:19,099:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0819:41:19,100:ERRORt1(rootfile)[1]2023-04-0819:41:19,101:ERRORt10(rootfile)[2]2023-04-0819:41:19,110:ERRORt2(rootfile)[5]2023-04-0819:41:19,110:ERRORt3(rootfile)[6]2023-04-0819:41:19,110:ERRORt4(rootfile)[7]2023-04-0819:41:19,110:ERRORt5(rootfile)[8]2023-04-0819:41:19,110:ERRORt6(rootfile)[9]2023-04-0819:41:19,111:ERRORt7(rootfile)[10]2023-04-0819:41:19,111:ERRORt8(rootfile)[11]2023-04-0819:41:19,111:ERRORt9(rootfile)[12]2023-04-0819:41:19,115:ERRORt11(rootfile)[3]2023-04-0819:41:19,285:ERRORt12(rootfile)[4]2023-04-0819:41:19,288:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:FAILTests:12Start:2023-04-0819-41-19End:2023-04-0819-41-19Duration:0.18714125secondsTags:[]PASS:0FAIL:0ERROR:12DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:12GLOBALVARIABLES:0BUG:0LOGGER:0UNEXPECTED:08. Global variables errorsDevelopers can makeerrorswhile codingGeneralerror exceptionmessageswill increase the time tofindandfixthese issuestest_rest_api providesshort&preciseerror's with exacttracebackinfoHere we arepurposefullymaking errors inGlobalVariablesfunctionsClick here to view the html reportConsole output2023-04-0818:38:05,825:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0818:38:05,825:Startingtestsetup2023-04-0818:38:05,825:Autodetectingtestsuites2023-04-0818:38:05,826:Totaltestsuites:12023-04-0818:38:05,826:Autodetectingtests2023-04-0818:38:05,827:Totalsynchronoustests:02023-04-0818:38:05,827:Totalasynchronoustests:132023-04-0818:38:05,827:Totaltests:132023-04-0818:38:05,827:Createdaiohttpclientsession2023-04-0818:38:05,827:Completedtestsetup2023-04-0818:38:05,827:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0818:38:05,827:ERRORt_1(rootfile)[1]2023-04-0818:38:05,828:ERRORt_10(rootfile)[2]2023-04-0818:38:05,828:ERRORt_11(rootfile)[3]2023-04-0818:38:05,828:ERRORt_12(rootfile)[4]2023-04-0818:38:05,829:ERRORt_13(rootfile)[5]2023-04-0818:38:05,829:ERRORt_2(rootfile)[6]2023-04-0818:38:05,829:ERRORt_3(rootfile)[7]2023-04-0818:38:05,829:ERRORt_4(rootfile)[8]2023-04-0818:38:05,829:ERRORt_5(rootfile)[9]2023-04-0818:38:05,830:ERRORt_6(rootfile)[10]2023-04-0818:38:05,830:ERRORt_7(rootfile)[11]2023-04-0818:38:05,830:ERRORt_8(rootfile)[12]2023-04-0818:38:05,830:ERRORt_9(rootfile)[13]2023-04-0818:38:05,831:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:FAILTests:13Start:2023-04-0818-38-05End:2023-04-0818-38-05Duration:0.003679225secondsTags:[]PASS:0FAIL:0ERROR:13DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:13BUG:0LOGGER:0UNEXPECTED:09. Bug errorsDevelopers can makeerrorswhile codingGeneralerror exceptionmessageswill increase the time tofindandfixthese issuestest_rest_api providesshort&preciseerror's with exacttracebackinfoHere we arepurposefullymaking errors inBugfunctionsClick here to view the html reportConsole output2023-04-0819:55:51,870:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0819:55:51,871:Startingtestsetup2023-04-0819:55:51,871:Autodetectingtestsuites2023-04-0819:55:51,871:Totaltestsuites:12023-04-0819:55:51,871:Autodetectingtests2023-04-0819:55:51,872:Totalsynchronoustests:02023-04-0819:55:51,872:Totalasynchronoustests:72023-04-0819:55:51,872:Totaltests:72023-04-0819:55:51,872:Createdaiohttpclientsession2023-04-0819:55:51,872:Completedtestsetup2023-04-0819:55:51,872:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0819:55:51,872:ERRORt1(rootfile)[1]2023-04-0819:55:51,874:ERRORt2(rootfile)[2]2023-04-0819:55:51,875:ERRORt3(rootfile)[3]2023-04-0819:55:51,875:ERRORt4(rootfile)[4]2023-04-0819:55:51,875:ERRORt5(rootfile)[5]2023-04-0819:55:51,875:ERRORt6(rootfile)[6]2023-04-0819:55:51,876:ERRORt7(rootfile)[7]2023-04-0819:55:51,877:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:FAILTests:7Start:2023-04-0819-55-51End:2023-04-0819-55-51Duration:0.003555115secondsTags:[]PASS:0FAIL:0ERROR:7DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:0BUG:7LOGGER:0UNEXPECTED:010. Logger errorsDevelopers can makeerrorswhile codingGeneralerror exceptionmessageswill increase the time tofindandfixthese issuestest_rest_api providesshort&preciseerror's with exacttracebackinfoHere we arepurposefullymaking errors inLoggerfunctionsClick here to view the html reportConsole output2023-04-0821:54:56,023:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0821:54:56,023:Startingtestsetup2023-04-0821:54:56,023:Autodetectingtestsuites2023-04-0821:54:56,023:Totaltestsuites:12023-04-0821:54:56,023:Autodetectingtests2023-04-0821:54:56,023:Totalsynchronoustests:02023-04-0821:54:56,023:Totalasynchronoustests:72023-04-0821:54:56,023:Totaltests:72023-04-0821:54:56,023:Createdaiohttpclientsession2023-04-0821:54:56,023:Completedtestsetup2023-04-0821:54:56,023:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0821:54:56,023:ERRORt1(rootfile)[1]2023-04-0821:54:56,025:ERRORt2(rootfile)[2]2023-04-0821:54:56,025:ERRORt3(rootfile)[3]2023-04-0821:54:56,026:ERRORt4(rootfile)[4]2023-04-0821:54:56,026:ERRORt5(rootfile)[5]2023-04-0821:54:56,026:ERRORt6(rootfile)[6]2023-04-0821:54:56,026:ERRORt7(rootfile)[7]2023-04-0821:54:56,027:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:FAILTests:7Start:2023-04-0821-54-56End:2023-04-0821-54-56Duration:0.003578533secondsTags:[]PASS:0FAIL:0ERROR:7DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:0BUG:0LOGGER:7UNEXPECTED:011. Unexpected errorsClick here to view the html reportDevelopers can makeerrorswhile codingGeneralerror exceptionmessageswill increase the time tofindandfixthese issuestest_rest_api providesshort&preciseerror's with exacttracebackinfoHere we arepurposefullymaking unexpected errors in testsConsole output2023-04-0821:58:04,529:=======================================================||.....................................................||||.....................................................||||...........TEST-REST-API............||||.....................................................||||.....................................................||=======================================================2023-04-0821:58:04,529:Startingtestsetup2023-04-0821:58:04,530:Autodetectingtestsuites2023-04-0821:58:04,530:Totaltestsuites:12023-04-0821:58:04,530:Autodetectingtests2023-04-0821:58:04,530:Totalsynchronoustests:02023-04-0821:58:04,530:Totalasynchronoustests:62023-04-0821:58:04,530:Totaltests:62023-04-0821:58:04,531:Createdaiohttpclientsession2023-04-0821:58:04,531:Completedtestsetup2023-04-0821:58:04,531:=======================================================||...............ASYNC-TESTS...............||=======================================================2023-04-0821:58:04,531:ERRORt1(rootfile)[1]2023-04-0821:58:04,532:ERRORt2(rootfile)[2]2023-04-0821:58:04,533:ERRORt3(rootfile)[3]2023-04-0821:58:04,534:ERRORt4(rootfile)[4]2023-04-0821:58:04,534:ERRORt5(rootfile)[5]2023-04-0821:58:04,534:ERRORt6(rootfile)[6]2023-04-0821:58:04,535:=======================================================||.....................................................||||............TEST-SUMMARY.............||||.....................................................||=======================================================Status:FAILTests:6Start:2023-04-0821-58-04End:2023-04-0821-58-04Duration:0.003570664secondsTags:[]PASS:0FAIL:0ERROR:6DISABLE:0SKIP:0LOW:0MINOR:0MAJOR:0CRITICAL:0BLOCKER:0RESTAPI:0GLOBALVARIABLES:0BUG:0LOGGER:0UNEXPECTED:6AuthorTroy M JoseLicenseCopyright Troy M Jose, 2023.Distributed under the terms of theMITlicense, test_rest_api is free and
open source software.