Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashrika786/api-testing-python
A Rest-API test automation framework which is build on the top of Python language using PyTest Framework.
https://github.com/ashrika786/api-testing-python
api-rest api-testing-framework api-testing-python http-request-test http-requests http-responce-code postman pycharm-ide pytest pytest-framework python python-tests rest-api rest-api-test-framework test-automation
Last synced: about 1 month ago
JSON representation
A Rest-API test automation framework which is build on the top of Python language using PyTest Framework.
- Host: GitHub
- URL: https://github.com/ashrika786/api-testing-python
- Owner: ashrika786
- Created: 2021-06-12T06:04:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-12T07:04:44.000Z (over 3 years ago)
- Last Synced: 2024-09-27T06:04:19.586Z (about 2 months ago)
- Topics: api-rest, api-testing-framework, api-testing-python, http-request-test, http-requests, http-responce-code, postman, pycharm-ide, pytest, pytest-framework, python, python-tests, rest-api, rest-api-test-framework, test-automation
- Language: Python
- Homepage:
- Size: 12 MB
- Stars: 27
- Watchers: 3
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PyRestAPITest
This application is built to do REST API testing using python scripts along with the use of Pytest module as our testing framework.# Demo
![Page-Object-Model-Demo-Gif.gif](demo/pyrestapitest_demo.gif)## Languages, libraries and tools used
* __[Python](https://www.python.org/downloads/)__
* __[Pytest](https://docs.pytest.org/en/6.2.x/getting-started.html)__
* __[Requests](https://docs.python-requests.org/en/master/)__
* __[JsonPath](https://pypi.org/project/jsonpath/)__
* __[Pycharm](https://www.jetbrains.com/pycharm/download/)__Above Features are used to make code simple, generic, understandable, clean and easily maintainable for future development.
## Installation
Install the dependencies and start the testing.
__Install Pytest__:
```sh
pip install -U pytest
```
__Install Requests__:
```sh
pip install requests
```__Install Json Path__:
```sh
pip install jsonpath
```
## Automated tests__To run a test, you can simply write the following command on Terminal__:
```sh
pytest
```__To run and get details of all the executed test, you can simply write the following command on Terminal__:
```sh
pytest -rA
```__To run and generate full HTML details report of all the executed test, you can simply write the following commands on Terminal__:
__But first install [Pytest-HTML](https://pypi.org/project/pytest-html/) by writing the following command on Terminal__
```sh
pip install pytest-html
```
__Then write the following command on Terminal__
```sh
pytest --html==YOUR_REPORT_FILE_NAME.html
```__To see the reports, open the Project window, and then right-click then click on refresh then right-click on __StationReport.html__ to open the file on the default browser.__
![Page-Object-Model-Demo-Gif.gif](demo/pyrestapitest-report-file.png)
# Prerequisites
* __Python__
* __Any IDE__# Built With
* __[Python](https://www.python.org/downloads/)__ - Language used to build the application.
* __[Pycharm](https://www.jetbrains.com/pycharm/download/)__ - The IDE for writing Automation Test Scripts