OrderTags¶
Order tags in a case-insensitive way in ascending order.
Enabling the formatter
OrderTags is not included in default formatters.
You can enable it by using --select and --extend-select options.
This relates to tags in Test Cases, Keywords, Force Tags and Default Tags.
*** Settings ***
Documentation OrderTags acceptance tests
Force Tags forced_tag_1 forced_tag_aa forced_tag_2 forced_tag_Ab forced_tag_Bb forced_tag_ba
Default Tags default_tag_1 default_tag_aa default_tag_2 default_tag_Ab default_tag_Bb default_tag_ba
*** Test Cases ***
Tags Upper Lower
[Tags] ba Ab Bb Ca Cb aa
My Keyword
*** Keywords ***
My Keyword
[Tags] ba Ab Bb Ca Cb aa
No Operation
*** Settings ***
Documentation OrderTags acceptance tests
Force Tags forced_tag_1 forced_tag_2 forced_tag_aa forced_tag_Ab forced_tag_ba forced_tag_Bb
Default Tags default_tag_1 default_tag_2 default_tag_aa default_tag_Ab default_tag_ba default_tag_Bb
*** Test Cases ***
Tags Upper Lower
[Tags] aa Ab ba Bb Ca Cb
My Keyword
*** Keywords ***
My Keyword
[Tags] aa Ab ba Bb Ca Cb
No Operation
Using the same example with reverse=True param we will get tags in descending order:
will result in:
Tags can be also ordered in a case-sensitive way:
will result in:
Force Tags and Default Tags ordering can be disabled like this:
will result in:
*** Settings ***
Documentation OrderTags acceptance tests
Force Tags forced_tag_1 forced_tag_aa forced_tag_2 forced_tag_Ab forced_tag_Bb forced_tag_ba
Default Tags default_tag_1 default_tag_aa default_tag_2 default_tag_Ab default_tag_Bb default_tag_ba
*** Test Cases ***
Tags Upper Lower
[Tags] ba Ab Bb Ca Cb aa
My Keyword
*** Settings ***
Documentation OrderTags acceptance tests
Force Tags forced_tag_1 forced_tag_aa forced_tag_2 forced_tag_Ab forced_tag_Bb forced_tag_ba
Default Tags default_tag_1 default_tag_aa default_tag_2 default_tag_Ab default_tag_Bb default_tag_ba
*** Test Cases ***
Tags Upper Lower
[Tags] aa Ab ba Bb Ca Cb
My Keyword