Skip to content

konflic/python_qa_api

Repository files navigation

Тестирование API

Код и примеры для занятия по тестированию API

  1. Argraprse, аргументы в pytest
  2. requests
  3. Параметризация фикстур
  4. Тестирование API

Что такое API?

Application programming interface (API) is a set of subroutine definitions, communication protocols, and tools for building software. In general terms, it is a set of clearly defined methods of communication among various components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer.

Что такое REST?

Representational State Transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services (RWS), provide interoperability between computer systems on the Internet. RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources by using a uniform and predefined set of stateless operations. Other kinds of Web services, such as SOAP Web services, expose their own arbitrary sets of operations.

SOAP (Simple Object Access Protocol)

Стандарт: https://www.w3.org/TR/soap12/

Примеры API:

https://api.spacexdata.com/ - SpaceX

https://jsonplaceholder.typicode.com/ - Тестовое API

https://rapidapi.com/ - Библиотека разных API

https://www.cbr-xml-daily.ru/ - API Центробанка

Реализации:

  • Всегда 200, коды ошибок и ответов внутри ответа (Поддержка GET, POST)

  • Могут быть различные коды ответов (PUT, PATCH, DELETE ... )

Дополнительно

Хорошее описание http://qaru.site/questions/112998/what-is-the-difference-between-put-post-and-patch

About

Тестирование API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published