Yandex.Taxi Testsuite Package
Project description
What is testsuite
Testsuite is a microservice-oriented test framework written in Python based on pytest.
Testsuite is written and supported by Yandex.Taxi, and is used to test Yandex.Taxi microservices written in C++ and Python.
The principal suggested approach to testing - although not the only one - is black box, when the service is tested through http calls.
Direct read and write access from test to database is supported to enable precondition setup and result assertions.
Installation
Installation using pip:
pip3 install yandex-taxi-testsuite # testsuite with mongodb support pip3 install yandex-taxi-testsuite[mongodb] # testsuite with postgresql support pip3 install yandex-taxi-testsuite[postgresql] pip3 install yandex-taxi-testsuite[postgresql-binary] # testsuite with redis support pip3 install yandex-taxi-testsuite[redis] # testsuite with mysql support pip3 install yandex-taxi-testsuite[mysql] # testsuite with clickhouse support pip3 install yandex-taxi-testsuite[clickhouse] # testsuite with rabbitmq support pip3 install yandex-taxi-testsuite[rabbitmq]
You can also include testsuite into your project as submodule, e.g.:
mkdir -p submodules git submodule add git@github.com:yandex/yandex-taxi-testsuite.git submodules/testsuite
Supported databases
Out-of-the-box testsuite supports the following databases:
PostgreSQL
MongoDB
Redis
MySQL/MariaDB 10+
ClickHouse
RabbitMQ
Supported operating systems
Testsuite runs on GNU/Linux and macOS operating systems.
Principle of operation
Testsuite sets up the environment for the service being tested:
Testsuite starts any required databases (postgresql, mongo, redis).
Before each test, testsuite fills the database with test data.
Testsuite starts its own web server (mockserver), which mimics (mocks) microservices other than the one being tested.
Testsuite starts the microservice being tested in a separate process.
Testsuite then runs tests.
A test performs http requests to the service and verifies that the requests were processed properly.
A test may check the results of an http call by looking directly into the service’s database.
A test may check whether the service has made calls to external services, as well as the order of calls and the data that was sent and received.
A test may check the internal state of the service as represented by the data the service sent to the test with the testpoint mechanism.
Source code
Testsuite open-source edition code is available here.
Documentation
For full documentation, including installation, tutorials, please see https://yandex.github.io/yandex-taxi-testsuite/.
Running testsuite
self-tests:
pytest3 ./tests
tests of example services:
cd docs/examples && make
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file yandex_taxi_testsuite-0.2.0.tar.gz
.
File metadata
- Download URL: yandex_taxi_testsuite-0.2.0.tar.gz
- Upload date:
- Size: 94.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8fbbb1d6f78035d8b5a4630ee31e8f683e080d540413ae3e74e4664bd2fb18d |
|
MD5 | 089c6b5ead7289dc659000676d346baf |
|
BLAKE2b-256 | 7cb779bf219af792c48f8fb4264b740e22afd1e4019ec1be52d10ef58e6cca33 |
File details
Details for the file yandex_taxi_testsuite-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: yandex_taxi_testsuite-0.2.0-py3-none-any.whl
- Upload date:
- Size: 121.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d88d3935ff2a44ac3bd8c630f8074ee055da42fb39503c1545b324e493608aa |
|
MD5 | 3d758756df6c510c418a7952d1e3f44d |
|
BLAKE2b-256 | 4e3f0366765956828d1c14e749fffbc3cbf3cefd8b5f0f911e435815db1b1796 |