How to order Test steps inside a group

Hi Team,

We have created two Test steps under “Check” group, We have given order for the Test steps
But Test steps appears only in alphabetical order.

Test Step 1

Test Step 2

Displayed in Editor
image

We want If condition to be displayed as first step and Else should be second.

Regards
Jestin CI

2 Likes

This is restricted to alphabetical by design. And the reason is, the list of Test Steps is a merged lists from all plugins. It is not really possible to give priority to specific step orders once we get into that cause. Any plugin could also have a “Check” group and decide that their Test Step should be “first”.

What you could maybe do is only allow these Steps to be added as part of an If/Else block. So, the parent step is what is added by the user, but it would add If and Else as child steps (this can be done in the constructor of the Test Step). That is generally what we see used when there is a dependency order of the steps.

You could then allow IF to be added at any time, but else only be added by the parent step using some of the Parent/Child attributes:

4 Likes

Thanks for the information.

2 Likes

Might be silly, but you could use “\u0086If” for the If step name. That should sort it before “Else”. Not sure if there are any consequences down the line.

4 Likes

It worked, Thank you… :slight_smile:
Will check for any other impact by doing this way.

1 Like

It would be useful if TestStep Display attribute also supported the Order attribute

2 Likes

Thanks for the innovative hidden character idea. I’m building steps for standards testing, and 5.10 comes before 5.2 alphabetically. Problem solved with hidden character

1 Like