<aside>
🗒️ Logger page: ‣
</aside>
What is PYPREST
PYPREST is an API automation testing framework written in python to create automated test scenarios for REST APIs.
This framework helps to reduce the time to write the logic for automation testing of APIs and uses a single Config XML file as Input where we have created the test cases.
Functionalities:
- It allows us to validate responses to the API.
- It cuts down the effort of writing long code for every test case and reduces code redundancy.
- Generates customized report posts executing the test cases & suites.
- Provides facilities like creating user defined variables, re-use those variables, skip test cases using the run flag tag.
METHODS OF EXECUTION
1. Through Command Line Interface:
We can run it like any python program.
$ python <path for restEngine.py> -config <config_file_path> -t <testcase_name>
Here we are running a restEngine script with two command line arguments which are as follows.
- config : stands for configFile and asks xml config file location**.****
- **** file path will be platform dependent i.e., file path will follow the permissible syntax of the operating system.***
- t : stands for testcase and asks for the name of testcase as discussed above.
- If python path in the system is not set then we must provide the complete path of installation location of python Interpreter