Noah Drew
ServiceNow Employee
ServiceNow Employee

The selected Test Execution Assignments when run from the "Tests Assigned to me" has its sort order defined in the UI Macro called "test_step_list". In the UI Macro, there is an orderBy() method that specifies that the selected records are ordered by the related Test's Number.


The code is:

gr.orderBy('test_version.test.number');

You can do a quick test and change it to something such as the following and it will sort by the Test's Short Description:

gr.orderBy(test_version.test.short_description);

To view the UI Macro, follow the steps below.

[code]<!--MFRNextSteps--><b>Next Steps:</b>[/code]

1. Navigate to System UI > UI Macros
2. In the "Name" column search for "test_step_list" and go to the record
3. Search the code for "orderBy". It should be the only one in the code

Hope that helps!

If it did, please mark as Helpful and consider Bookmarking the Article, thanks!

Comments
P_15
Kilo Contributor

Is there any way for the end user to enter the order of the tests? ie. having a custom field on 'Tests Assigned to me' then ordering this in the order of tests that are run?

Version history
Last update:
‎01-16-2020 01:34 PM
Updated by: