TypedDevs / bashunit

A simple testing library for bash scripts. Test your bash scripts in the fastest and simplest way, discover the most modern bash testing library.
https://bashunit.typeddevs.com
MIT License
317 stars 27 forks source link

Test execution order #217

Closed antonio-gg-dev closed 7 months ago

antonio-gg-dev commented 11 months ago

Summary

Test functions within a test file are executed (or at least their results are printed) alphabetically, regardless of the order in which you define them.

For me, it would make more sense for these to be executed in the order they are defined. For example, if you are doing TDD with the stop on failure option active, and you are adding tests one after another, it may be that if your last test fails (which is very common in TDD), it could be hiding the fact that you broke one of the tests you had already developed.

Current behavior

Test functions are executed (or at least their results are printed) alphabetically.

How to reproduce

This can be seen by creating a test file in which the test functions are not arranged alphabetically.

Expected behavior

Test functions should be executed and printed in the order they are defined within the test file.