EMACSWAY_LOG Telegram 1505
emacsway-log: Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, XP, Agile, etc.
Eще несколько решений, способных облегчить Out-of-process Component (Acceptance) Testing: - https://schemathesis.readthedocs.io/ - https://hypothesis.readthedocs.io/ - https://github.com/python-jsonschema/hypothesis-jsonschema - https://pypi.org/project/hypothesis…
Как я делаю fitness-functions для микросервисов. Мой способ ориентирован на системы среднего размера.

Who Writes Fitness Functions? <...> In general, architects write fitness functions as they determine the objective measures for important architecture characteristics.
-- Building Evolutionary Architectures, by Neal Ford, Patrick Kua, and Rebecca Parsons

Самым существенным оказался, вероятно, вопрос о том, должны ли performance fitness functions тестировать сервис в изоляции или систему целиком?

Однозначного ответа в литературе отыскать не удалось. Даже в оригинальной книге "Building Evolutionary Architectures" ограничились известной фразой "It depends!"

Sam Newman советует оба варианта:

As with functional tests, you may want a mix. You may decide that you want performance tests that isolate individual services, but start with tests that check core journeys in your system. You may be able to take end-to-end journey tests and simply run these at volume.
-- "Building Microservices. Designing Fine-Grained Systems" 2nd edition by Sam Newman

Некоторые аргументы в пользу изолированного тестирования:
- "Load Testing And Microservices Architecture" by Gatling Author
- "Isolate Performance Testing for each Microservice: Part 7" By Brice Dardel
- "Performance Testing of Microservices" by Niranjan Limbachiya

Я склоняюсь к тестированию на обоих уровнях. Поскольку целью fitness functions является улучшение ("селекционирование") архитектурных качеств системы, то команде разработки более удобными могут оказаться изолированные тесты.

Для описания требований я использую Behave. Для любителей Pytest может подойти Pytest-BDD.

Поскольку за прообраз fitness-functions был взят стандарт породы, то это значит, что требование может быть желаемым (целевым) или в пределах допустимого отклонения (допустимого диапазона изменчивости). Поэтому, помечаю их соответственно тэгами
@fitness-function.performance.target и
@fitness-function.performance.acceptable.

Таким образом, запуск тестов можно осуществить или для допустимых, или для целевых требований. Получается что-то типа:

@fitness-function.performance.acceptable
  Scenario: Some object endpoint name
    Given SUT with 10000000 objects
    When 100 processes created 10000 objects each
    Then average RPS is greater than 1000
    And error rate is less than 5%

@fitness-function.performance.target
  Scenario: Some object endpoint name
    Given SUT with 30000000 objects
    When 100 processes created 10000 objects each
    Then average RPS is greater than 1000
    And error rate is less than 5%

Продолжение.
👍53🔥21



tgoop.com/emacsway_log/1505
Create:
Last Update:

Как я делаю fitness-functions для микросервисов. Мой способ ориентирован на системы среднего размера.

Who Writes Fitness Functions? <...> In general, architects write fitness functions as they determine the objective measures for important architecture characteristics.
-- Building Evolutionary Architectures, by Neal Ford, Patrick Kua, and Rebecca Parsons

Самым существенным оказался, вероятно, вопрос о том, должны ли performance fitness functions тестировать сервис в изоляции или систему целиком?

Однозначного ответа в литературе отыскать не удалось. Даже в оригинальной книге "Building Evolutionary Architectures" ограничились известной фразой "It depends!"

Sam Newman советует оба варианта:

As with functional tests, you may want a mix. You may decide that you want performance tests that isolate individual services, but start with tests that check core journeys in your system. You may be able to take end-to-end journey tests and simply run these at volume.
-- "Building Microservices. Designing Fine-Grained Systems" 2nd edition by Sam Newman

Некоторые аргументы в пользу изолированного тестирования:
- "Load Testing And Microservices Architecture" by Gatling Author
- "Isolate Performance Testing for each Microservice: Part 7" By Brice Dardel
- "Performance Testing of Microservices" by Niranjan Limbachiya

Я склоняюсь к тестированию на обоих уровнях. Поскольку целью fitness functions является улучшение ("селекционирование") архитектурных качеств системы, то команде разработки более удобными могут оказаться изолированные тесты.

Для описания требований я использую Behave. Для любителей Pytest может подойти Pytest-BDD.

Поскольку за прообраз fitness-functions был взят стандарт породы, то это значит, что требование может быть желаемым (целевым) или в пределах допустимого отклонения (допустимого диапазона изменчивости). Поэтому, помечаю их соответственно тэгами
@fitness-function.performance.target и
@fitness-function.performance.acceptable.

Таким образом, запуск тестов можно осуществить или для допустимых, или для целевых требований. Получается что-то типа:

@fitness-function.performance.acceptable
  Scenario: Some object endpoint name
    Given SUT with 10000000 objects
    When 100 processes created 10000 objects each
    Then average RPS is greater than 1000
    And error rate is less than 5%

@fitness-function.performance.target
  Scenario: Some object endpoint name
    Given SUT with 30000000 objects
    When 100 processes created 10000 objects each
    Then average RPS is greater than 1000
    And error rate is less than 5%

Продолжение.

BY emacsway-log: Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, XP, Agile, etc.


Share with your friend now:
tgoop.com/emacsway_log/1505

View MORE
Open in Telegram


Telegram News

Date: |

Hashtags End-to-end encryption is an important feature in messaging, as it's the first step in protecting users from surveillance. You can invite up to 200 people from your contacts to join your channel as the next step. Select the users you want to add and click “Invite.” You can skip this step altogether. Matt Hussey, editorial director at NEAR Protocol also responded to this news with “#meIRL”. Just as you search “Bear Market Screaming” in Telegram, you will see a Pepe frog yelling as the group’s featured image. Users are more open to new information on workdays rather than weekends.
from us


Telegram emacsway-log: Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, XP, Agile, etc.
FROM American