kaocha icon indicating copy to clipboard operation
kaocha copied to clipboard

Add hook to manipulate test order as an alternative to test-ns-hook

Open alysbrooks opened this issue 3 years ago • 0 comments

In #29, @ devurandom suggested a more Kaocha-friendly alternative to test-ns-hook:

Could this also be achieved through a hook that receives the deftest symbols in the namespace and returns them in a different order (i.e. in the order the test author needs because of dependencies between tests)? That would feel a little bit like Pedestal Interceptors can see and manipulate the chain of interceptors that will be executed to handle an HTTP request.

My reply with more ideas:

@devurandom Interesting idea. That would certainly fit our "data pipeline" architecture. It would also be quite flexible. For example, you could even do things like enforce a rough ordering. Or you could always make sure test A always runs sometime before test B but not care about the order otherwise. Or you could always run certain important tests first.

alysbrooks avatar Oct 18 '22 00:10 alysbrooks