Allure

Экосистема для процесса QA

Мухаматнуров Владислав

Background

Allure

Test report and framework for writing self-documented tests

Conception

Reasons

  • Человеко-понятные отчеты
  • Features / Stories
  • Централизация тест-кейсов
  • Единая экосистема

Ecosystem

Points

  • Плагин для ЯП
  • CLI для генерации отчетов
  • JIRA issues
  • Плагин для CI (TeamCity, Jenkins)
  • Allure EE
    • автоматизированные кейсы
    • ручные кейсы

Plugin

@pytest.mark.system
@allure.feature('TCRM: Runner')
class TestTCRMServiceWithRunner:
    @allure.story("Create initial step")
    @allure.severity(allure.severity_level.CRITICAL)
    @pytest.mark.parametrize("scenario_name", Procedures.get_items())
    def test_runner_create_initial_step(self, runner: ImprovedTCRMScenarioRunner):
        runner.make_initial_step()

    @allure.story("Forward Runner with Context")
    @allure.severity(allure.severity_level.CRITICAL)
    @pytest.mark.parametrize(
    	"scenario_name",
        chain(Procedures.chatbot, Procedures.coldbot)
    )
    def test_runner_forward(self, runner: ImprovedTCRMScenarioRunner, context: Context):
        runner.forward(context=context)

    @allure.story("Forward Runner with Context (TalkBot Procedures)")
    @allure.severity(allure.severity_level.NORMAL)
    @pytest.mark.parametrize("scenario_name", Procedures.talkbot)
    def test_runner_forward_talkbot_procedures(
    	self,
        runner: ImprovedTCRMScenarioRunner,
        context: Context,
        slots
    ):
        with pytest.raises(TCRMCouldNotPerformActionError):
            runner.forward(context=context, slots=slots)

Report

JIRA issues

CI

Before

After

...
test_hang_up_from_scenario[6-voice_mail_talkbot] PASSED [ 93%]
TestRunner::test_hang_up_from_incorrect_scenario[6-coldbotv2_pro] PASSED [ 94%]
test_switch_call_to_operator_from_scenario[4-coldbotv2_pro] PASSED [ 94%]
test_web_office_info_from_context PASSED [ 95%]
test_fill_application_info_from_context PASSED [ 96%]
test_fill_phone_info_from_context PASSED [ 97%]
test_fill_application_info_from_context PASSED [ 97%]
test_request_slots[slots0-adapter0-context0] PASSED [ 98%]
test_request_slots[slots1-adapter1-context1] PASSED [ 99%]
test_request_slots_with_meta[slots0-adapter0-context0] PASSED [100%]

========== 130 passed, 4014 deselected, 4 xfailed in 18.19 seconds ==========

Allure EE

Allure EE + CI

Manual cases

All-in-one

Что почитать

Plugin for PyTest

Спасибо!

v.mukhamatnurov@tinkoff.ru

Allure

By Vladislav Mukhamatnurov

Allure

Ecosystem for QA process

  • 487