allure-framework / allure-framework/allure-php-commons2

Implement stages

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Stages are sort of "flat steps" with body following the call within current context (test or step body). End of context or another stage start should finish a stage.

**Proposed API:** `Allure::startStage(?string $name = null): void`. We cannot use annotations with this API, so we'll have to use `Allure::*` shortcuts to decorate stage.

**Problems:** As for now, shortcuts such as `Allure::parameter()` deal with "current test" context; to implement effective stages we'll have to make them work with "current test or step" context, changing "classic" behavior. Another way to solve this problem is to provide alternate shortcuts, either in `Allure::stepParameter()` or `AllureStep::parameter()` form. We can also change "classic" behavior but provide fallbacks like `Allure::testParameter()` for those who want to decorate test from within a step. And one more way is to return `StepContextInterface` from stage starting method.

Contributor guide

Open the contributing guide

Research direction

Start with the proposed Allure::startStage(?string $name = null): void API and review how the existing Allure::* shortcuts resolve the current test context. Compare the listed alternatives for decorating stages and decide how test-versus-step context should behave. Done means stages close at context boundaries and the shortcut API behavior is specified and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.