[MGNLTEST-359] Ensure cucumber-tags-usage is correct Created: 21/Nov/22  Updated: 19/Dec/22  Resolved: 16/Dec/22

Status: Closed
Project: Magnolia Test Framework
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Christoph Meier Assignee: Harshini Pola
Resolution: Resolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 1h
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: cucumber-and-selenide-support-by-test-fwk
Work Started:

 Description   

Context:

I recently had a discussion w/ Evzen about the proper usage of cucumber tags.

Evzen may have a point and we need to re-check the usage.

Sources:

more from Even:



 Comments   
Comment by Harshini Pola [ 07/Dec/22 ]

Hello efochr ,
Actually, we have tried out -DexcludedGroups instead of -Dcucumber.filter.tags and found no difference in using both tag expressions.
Apart from the reason to use JUnit5 tag expressions, could you please let us know if there is any particular reason why you suggested this change (it may be that it is not picking up scenarios as expected)?

Comment by Evzen Fochr [ 07/Dec/22 ]

Exactly, I had a problem that in some cases it picked up all scenarios instead of selected ones. Don't remember exact combination of tags.

Comment by Christoph Meier [ 16/Dec/22 ]

Hi efochr 

A final comment about this one.

As Harshini mentioned, we have tried both

  • cucumber.filter.tags
  • groups, excludedGroups

I have never seen a case where scenarios had been executed even though they were excluded via cucumber.filter.tags.
But if you had a case where this did happen - I believe you.

I will ask in the slack channel for testing & QA whether people have encountered such issues.

If you feel more confident by using groups, excludedGroups - I'm fine when you change it on the projects you are interested in or involved in.

The cases Harshini and I were testing were relatively simple.
When I was thinking about more complex cases - I must say, that it seemed easier to use groups, excludedGroups - at some point I'm not 100% sure how cucumber.filter.tags combines logic.

When it comes to tagging features or scenarios - my aim is still trying to use as less tags as possible. Regarding filtering this means: Use tags to exclude rather than to include.

And finally - whatever solution we use setting the param(s) should always happen in the maven call (me thinks) in the Jenkins file.

One thing idk - whether using cucumber.filter.tags in junit-platform.properties would interfere usage of groups, excludedGroups.
When using groups, excludedGroups - we probably should delete the param cucumber.filter.tags in junit-platform.properties

Generated at Mon Feb 12 07:48:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.