@allure.title("Демонстрационный ручной тест")
@allure.manual(True)
def test_demo_manual():
with allure.step("Демонстрационный шаг"):
passfake = Faker()
def test_demo_manual():
with allure.step(f"Шаг с генерируемым именем: {fake.name()}"):
passname: Run tests
on:
push:
workflow_dispatch:
inputs:
ALLURE_JOB_RUN_ID:
description: ALLURE_JOB_RUN_ID service parameter. Leave blank.
required: false
ALLURE_USERNAME:
description: ALLURE_USERNAME service parameter. Leave blank.
required: false
env:
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
ALLURE_JOB_RUN_ID: ${{ github.event.inputs.ALLURE_JOB_RUN_ID }}
ALLURE_ENDPOINT: ${{ secrets.ALLURE_ENDPOINT }}
ALLURE_PROJECT_ID: ${{ secrets.ALLURE_PROJECT_ID }}
ALLURE_RESULTS: allure-results
jobs:
all-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: install and configure allurectl
uses: allure-framework/setup-allurectl@v1
with:
allure-endpoint: ${{ secrets.ALLURE_ENDPOINT }}
allure-token: ${{ secrets.ALLURE_TOKEN }}
allure-project-id: ${{ secrets.ALLURE_PROJECT_ID }}
- name: Run tests
run: |
chmod +x run.sh
allurectl watch -- pytest ./test --alluredir=${ALLURE_RESULTS} --capture=no
env:
TEST_BROWSER: ${{ github.event.inputs.TEST_BROWSER }}
ALLURE_TESTPLAN_PATH: "./testplan.json"
ALLURE_RESULTS: "allure-results"
ALLURE_JOB_RUN_ID: ${{ github.event.inputs.ALLURE_JOB_RUN_ID }}import allure
@allure.title("Демонстрационный ручной тест")
@allure.manual(True)
def test_demo_manual():
with allure.step("Демонстрационный шаг"):
pass@allure.title("Демонстрационный ручной тест")
@allure.story("Story")
@allure.feature("Feature")
@allure.tag("example")
@allure.label("owner", "mlankin")
@allure.manual(True)
def test_demo_manual():
with allure.step("Демонстрационный шаг"):
pass
custom_step()@allure.title("Тест с вложением")
@allure.manual(True)
def test_demo_custom_steps():
with allure.step("Шаг с вложением"):
allure.attach("Текстовое вложение")class Steps:
@allure.step("Пользовательский шаг")
def custom_step(self):
pass@allure.title("Тест с пользовательскими шагами")
@allure.manual(True)
def test_demo_custom_steps():
steps.custom_step()
steps.second_step()