anna-api-test-framework-0.1.0
توضیحات
Framework for rapid development of API tests and report generation
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | anna-api-test-framework-0.1.0 |
| نام | anna-api-test-framework |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Evgenii Gerasin |
| ایمیل نویسنده | e.d.gerasin@yandex.ru |
| آدرس صفحه اصلی | https://github.com/EvgeniiGerasin/anna-api-framework |
| آدرس اینترنتی | https://pypi.org/project/anna-api-test-framework/ |
| مجوز | - |

Framework for rapid development of API tests and report generation
[](https://pypi.org/project/anna-api-test-framework)
## Authors
- [@EvgeniiGerasin](https://github.com/EvgeniiGerasin)
## Features
- Rapid and straightforward development of tests using high-level methods
- Generating a report with test results in Allure
- The report will be useful for stakeholder
## Installation
Install my-project with pip:
```bash
pip install anna-api-test-framework
```
## Usage/Examples
```python
from anna import Action, Report, Assert
@Report.epic('Simple tests')
@Report.story('Tests google')
@Report.testcase('https://www.google.com', 'Google')
@Report.link('https://www.google.com', 'Jast another link')
class TestExample:
@Report.title('Simple test google')
@Report.severity('CRITICAL')
def test_simple_request(self):
url = 'https://google.com'
method = 'GET'
want = 200
# insert discription of the test
Report.description(url=url, method=method, other='other information')
# doing request and geting response
action = Action()
response = action.request(method=method, url=url)
got = response.status_code
# checking response
with Report.step('Checking response'):
Assert.compare(
variable_first=want,
comparison_sign='==',
variable_second=got,
text_error='Response status code is not equal to expected'
)
```
For run test and generat a report use following commands:
```bash
pytest alluredir="./results"
```
For generat and open a report you need to install Allure and use the following commands:
```bash
allure generate "./results" -c -o "./report"
allure open "./report"
```
After that, the generated report will automatically open in your browser

The report contains all the information you need

زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7, <4 | Python |
نحوه نصب
نصب پکیج whl anna-api-test-framework-0.1.0:
pip install anna-api-test-framework-0.1.0.whl
نصب پکیج tar.gz anna-api-test-framework-0.1.0:
pip install anna-api-test-framework-0.1.0.tar.gz