goss icon indicating copy to clipboard operation
goss copied to clipboard

Sort output in Documentation format

Open marcinpraczko opened this issue 6 years ago • 2 comments

As I can see - documentation format is displaying different order for checks. This is making work with this format quite hard especially if results presents many checks / results. Having the same order allows quicker to see output when refresing web brwoser (to re-check status of check)

(As I do understand - I can be wrong - Goss displays results based on dictionary - which is not sorted by default - can we add some OrderDict function on Sort? - I am familar with python and this suggestion is based on python experience).

marcinpraczko avatar Jan 09 '19 13:01 marcinpraczko

It's not actually a dictionary. Rather the tests run in parallel and are streamed to the output as they're completed.

Sorting the output is possible, essentially the output driver would have to record everything first, then sort it all, then print it. Rather than printing it as it comes in.

aelsabbahy avatar Dec 12 '19 08:12 aelsabbahy

As I can see this was approved - so with my observation this is really helpful during debug of issue. For example - error is detected / one is working on soluton and expecting to see 'OK' in the same line ... (how human mind is working). So unsorted list generating different output on the same line - so one things 'is fixed' - but maybe is not really fixed - only line changed. I assume that is dictionary - based on dicts in python. Thank you for clarification :).

marcinpraczko avatar Feb 10 '20 16:02 marcinpraczko

Hi @aelsabbahy, thank you for implementing this - I've just tested and seems be working as expected (at least for cases which are useful for me). Great work - thank you.

marcinpraczko avatar Nov 16 '23 13:11 marcinpraczko

Sorry for the extremely long delay on this, has been an interesting journey. Glad you're still using goss, and glad this helps.

Feel free to open up any feature requests or bug reports.. always good to get feedback from long term goss users.

aelsabbahy avatar Nov 22 '23 23:11 aelsabbahy