Sort by name - numbers

I would kindly ask you to perform sorting by name, even in cases where numbers are used as prefixes.

As you can see in the attached image, sorting is not performed correctly in the case of a recorded number.

Hi Martin and welcome to the Testiny forum,

In fact, we do sort the folders by name here, i.e. by characters in the folder names (also numbers are interpreted as characters). It’s just that the - character sorts before any number.
It’s basically the same as files/folders are sorted in file systems.

If you want “2-…” to be sorted before “10-…”, you will need to use fixed sized number formats, i.e. “001-…” and “010-…”.

Best Regards,
Alex

Thank you for your response.

Example:
3.3.1 item
3.3.10 item
3.3.2 item

I’m guessing has to be written as:
3.3.001 item
3.3.002 item
3.3.010 item

Is there some other, more appealing solution?

Best regards,
Martin

Unfortunately, I don’t know any. Lexicographical sorting does not work well with numbers unless you use fixed number widths. I’m sorry :frowning:

You can maybe use the non-sorting mode in the test case folders, then you can at least sort the folders as you like with no dependency on the name?

Best Regards,
Alex

Hi again,

We found a better solution, I suppose: We will try to use numerical string sorting for most user facing strings, e.g. also folder names :slight_smile:
This change is currently in development and needs thorough testing, that’s why the release of this feature might still take a while, so please be patient, thanks! :wink:

Best Regards,
Alex

Hi,

That’s great to hear. Thank you for your effort.

Best regards,
Martin

This feature is now available with our latest release, see the corresponding post Testiny v1.10.1

Best Regards,
Alex

Excellent work. Works as expected.

Best regards,
Martin