allure-framework / allure-framework/allure-php-commons2
Use parent class Layer attribute
- Dominant language
- PHP
- Stars
- 9
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Right now we can define the Layer attribute in the method or in the class which has this method.
It's not great to enforce developers to add this attribute to all classes, because most of the time it's the same for all test classes inside of the layer directory and each test class in the layer may have an abstract class.
For example:
```php
#[Layer('unit')]
abstract class UnitTestCase {}
#[Layer('integration')]
abstract class IntegrationTestCase {}
final class SomePureTests extends UnitTestCase {}
final class SomeDbTests extends IntegrationTestCase {}
```
1 level deep search for the attribute is enough.
Contributor guide
Research direction
No file or test entry point is named. Start by locating how the Layer attribute is resolved for test methods and classes, then verify that a class without its own attribute inherits one from its immediate parent, including the unit and integration examples; deeper ancestry need not be searched.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100