Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a3d4177

Browse files
Create README.md
1 parent cb942c5 commit a3d4177

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

‎README.md‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<h1 align="center">PyRestAPITest</h1>
2+
3+
<p align="center">
4+
This application is built to do REST API testing using python scripts along with the use of Pytest module as our testing framework.
5+
</p>
6+
7+
<p align="center">
8+
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a>
9+
</p>
10+
11+
# Demo
12+
![Page-Object-Model-Demo-Gif.gif](demo/pyrestapitest_demo.gif)
13+
14+
15+
## Languages, libraries and tools used
16+
17+
* __[Python](https://www.python.org/downloads/)__
18+
* __[Pytest](https://docs.pytest.org/en/6.2.x/getting-started.html)__
19+
* __[Requests](https://docs.python-requests.org/en/master/)__
20+
* __[JsonPath](https://pypi.org/project/jsonpath/)__
21+
* __[Pycharm](https://www.jetbrains.com/pycharm/download/)__
22+
23+
Above Features are used to make code simple, generic, understandable, clean and easily maintainable for future development.
24+
25+
## Installation
26+
27+
Install the dependencies and start the testing.
28+
29+
__Install Pytest__:
30+
```sh
31+
pip install -U pytest
32+
```
33+
__Install Requests__:
34+
```sh
35+
pip install requests
36+
```
37+
38+
__Install Json Path__:
39+
```sh
40+
pip install jsonpath
41+
```
42+
## Automated tests
43+
44+
__To run a test, you can simply write the following command on Terminal__:
45+
```sh
46+
pytest
47+
```
48+
49+
__To run and get details of all the executed test, you can simply write the following command on Terminal__:
50+
```sh
51+
pytest -rA
52+
```
53+
54+
__To run and generate full HTML details report of all the executed test, you can simply write the following commands on Terminal__:
55+
56+
__But first install [Pytest-HTML](https://pypi.org/project/pytest-html/) by writing the following command on Terminal__
57+
```sh
58+
pip install pytest-html
59+
```
60+
__Then write the following command on Terminal__
61+
```sh
62+
pytest --html==YOUR_REPORT_FILE_NAME.html
63+
```
64+
65+
__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.__
66+
67+
![Page-Object-Model-Demo-Gif.gif](demo/pyrestapitest-report-file.png)
68+
69+
# Prerequisites
70+
* __Python__
71+
* __Any IDE__
72+
73+
# Built With
74+
75+
* __[Python](https://www.python.org/downloads/)__ - Language used to build the application.
76+
* __[Pycharm](https://www.jetbrains.com/pycharm/download/)__ - The IDE for writing Automation Test Scripts

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /