Genki-S / ttnt

Test This, Not That! (Google Summer of Code 2015 project under Ruby on Rails)
MIT License
263 stars 7 forks source link

Isolated test run #33

Closed Genki-S closed 9 years ago

Genki-S commented 9 years ago

This is just an idea I got when I was trying to run TTNT in railties.

It seems tests in railties should be run one by one. So, it might be good to add an option to TTNT which makes it possible to run selected tests one by one.

I implemented the isolated run and it can be enabled by setting ISOLATED environment variable (https://github.com/Genki-S/ttnt/commit/012d484ed1fea259b61427b3460fe104be939303). And I also implemented "fail fast" feature in isolated run with which TTNT stops on first failure. It can be enabled by setting FAIL_FAST environment variable (https://github.com/Genki-S/ttnt/commit/27d1712b200a81d32a109cee59b4e2b948d865ac).

So, usage would be like $ rake ttnt:test:run ISOLATED=1 or $ rake ttnt:test:run ISOLATED=1 FAIL_FAST=1.

This might be a little hack-ish (it might be better to provide setting option usable in Rakefile rather than environment variables). @robin850 what do you think?

robin850 commented 9 years ago

This is pretty cool! :+1: Maybe you can also document this feature in the README file — then apart from the ensure thingy, you can merge this.

Genki-S commented 9 years ago

Maybe you can also document this feature in the README file

Oh I completely forgot that :scream: Thank you for mentioning! Wrote it here: https://github.com/Genki-S/ttnt/commit/9b702c5d22df1ee866a5458a994c4397018fc7a3