Configurable Ignore Tag Aliases and Skip Reasons via reqnroll.json #1097
Replies: 2 comments 4 replies
|
Could this be achieved without changing Reqnroll by using custom @ignoreReason:reasonCode tags? If Reqnroll did support reason code suffixes to the ignore tag, is the mapping to arbitrary text necessary? Why not simply use the suffix as the reason text? (As in, [Ignore("bug")] ) |
|
I my be jumping the gun, but I've had a little bit of a look at the code base, see that amending public static class TagHelper
{
/// <summary>
/// Checks whether the supplied tags contain the ignore tag
/// </summary>
/// <param name="tags">The tags to check.</param>
/// <returns>A boolean that indicates whether or not the ignore tag is present.</returns>
public static bool ContainsIgnoreTag(string[]? tags)
{
if (tags is null)
{
return false;
}
for (int i = 0; i < tags.Length; i++)
{
if (string.Equals(tags[i], "ignore", System.StringComparison.OrdinalIgnoreCase))
{
return true;
}
if (tags[i].StartsWith("ignore:", System.StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
return false;
}I'm not a developer, so have very much testers experience, so may well be better ways, and I haven't bench marked this solution to make sure it don't have a negative impact on performance using I would assume that we would want to keep the existing I see getting the reason to bubble up to the test output is a little more challenging, But this simple change would allow for filtering in test reports nicely which would be a great start, and to be honest probably enough for me. |
Uh oh!
There was an error while loading. Please reload this page.
Many teams (well I expect so) need more context than the built-in @ignore tag can provide.
I believe a common pattern is to introduce custom tags such as:
and then use hooks to mark the scenario as skipped with an appropriate reason.
While this works, every team must implement and maintain its own custom hook logic. It would be useful if Reqnroll provided a built-in mechanism for defining ignore tag aliases and their associated skip messages.
For example in reqnroll.json:
{ "ignoreTags": { "ignore:todo": "Scenario not yet implemented", "ignore:bug": "Known product defect", "ignore:broken": "Broken automation", "ignore:flickering": "Flaky test" } }Which would allow feature authors to simply write:
and have Reqnroll automatically:
Benefits
with the implementation details abstracted by Reqnroll.
This would help teams track and report on ignored scenarios while keeping the framework's existing simplicity.
All reactions