Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow IStepDecoratorAttribute and IScenarioDecoratorAttribute to be applied on class level #108

Closed
tpodolak opened this issue Apr 14, 2018 · 3 comments
Labels
improvement An improvement of existing feature (usability / performance etc)
Milestone

Comments

@tpodolak
Copy link
Contributor

Description

Current implementation of LightBDD recognizes IScenarioDecoratorAttribute and IStepDecoratorAttribute only if they are applied to the methods. It would be beneficial if the runner could also take into account attributes applied on the class level. For instance if I want to run all of the tests from given class only for specific environment (like it is done in here) I would be able to apply only one class level attribute.

@Suremaker
Copy link
Collaborator

Hello,

Thanks for reporting it. I'm on holidays at the moment but will take a closer look on it after return next week.

There should not be many issues with adding this behaviour, but I will have to analyse how it would work with contextual scenarios where steps can be defined in context class or composites.
Currently the way I see it would be simply respecting the decorators added on method or class where method is defined.

Let me come back to you after Tuesday.

@Suremaker Suremaker added the enhancement An enhancement of the feature or new feature label Apr 14, 2018
@Suremaker
Copy link
Collaborator

Btw, to be precise, using method level attribute is not the only way to install scenario/step decorators.
They can be also applied globally on all classes/methods with LightBDD configuration (ExecutionExtensionsConfiguration()) method.

tpodolak added a commit to tpodolak/LightBDD that referenced this issue Apr 14, 2018
tpodolak added a commit to tpodolak/LightBDD that referenced this issue Apr 14, 2018
@Suremaker Suremaker added improvement An improvement of existing feature (usability / performance etc) and removed enhancement An enhancement of the feature or new feature labels Apr 14, 2018
@Suremaker Suremaker added this to the 2.3.6 milestone Apr 14, 2018
@Suremaker
Copy link
Collaborator

Released with 2.3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An improvement of existing feature (usability / performance etc)
Projects
None yet
Development

No branches or pull requests

2 participants