report order - statistics by tag (using natural sort)

90 views
Skip to first unread message

José Miguel Izquierdo

unread,
May 12, 2016, 9:51:55 AM5/12/16
to robotframework-users


      Hello,

      I would like to know if there is a way to sort statistics by tag in the report obtained after the RF tests execution where the tags are sorted based on naturalsort.

      I do have several tags which are named as 1.1.1_Verify_this, 1.1.2_Verify_that, ..., 1.1.11_Verify_this_other_thing, 1.1.12_Verify_that_other_thing... and so on... and when getting the report generated, the order of appearance is:

  •       1.1.11_Verify_this_other_thing
  •       1.1.12_Verify_that_other_thing
  •       1.1.1_Verify_this...
  •       1.1.2_Verify_that...

     which is not my desired output. I would like to have them sorted based on natural sort algorithm, which would be what a human being would like to see it

  •       1.1.1_Verify_this...
  •       1.1.2_Verify_that...
  •       1.1.11_Verify_this_other_thing
  •       1.1.12_Verify_that_other_thing

      I have read that the report template can be modified to customize the final report, but I have absolutely no idea how to do it to include what I want here. Any help?


Thanks a lot!


josemi


Hélio Guilherme

unread,
May 12, 2016, 1:11:37 PM5/12/16
to robotframework-users
Hello

This is so interesting. It seems that I guessed three days ago that you or someone would require that feature, so I created the  PR https://github.com/robotframework/robotframework/pull/2370

If you could try to patch RF, it would give more strenght for the PR be accepted.

Hélio

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Pekka Klärck

unread,
May 12, 2016, 2:19:33 PM5/12/16
to Hélio Guilherme, robotframework-users
2016-05-12 20:11 GMT+03:00 Hélio Guilherme <heliox...@gmail.com>:
<> Hello
>> This is so interesting. It seems that I guessed three days ago that you or
> someone would require that feature, so I created the PR
> https://github.com/robotframework/robotframework/pull/2370
>
> If you could try to patch RF, it would give more strenght for the PR be
> accepted.

As I commented the PR and the related issue #2369, I'm in general fine
changing string sorting to use natural order [1] instead of pure
alphabetical order. I'm not entirely happy how the PR uses both
sorting approaches, though, and would rather see one approach used
consistently everywhere.

[1] https://en.wikipedia.org/wiki/Natural_sort_order


--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
Reply all
Reply to author
Forward
0 new messages