Closed nalanj closed 12 years ago
I don't know about this. It's getting into the 'copy features from rspec/unit_test' territory. I thought that the entire point of tconsole is the preloaded environment. Are we planning on preloading the environment on the first "run" and re-use it for subsequent runs?
It's mainly because running all tests this way saves me about 30-45 seconds off of using the Rails rake tasks, just because it doesn't reload the environment 4 times for the run - it just loads once and runs everything.
:+1: Make it so.
@commondream so I was right in assuming that the env only gets loaded the first time? That's a first for me, :p
@batasrki Well, it'd get loaded each time you run the command, but I think tconsole's beyond just being an environment preloaded at this point. You also get the benefit of pretty formatting and it the performance benefit of merging all of your tests together when running all
, rather than running 3 separate rake tasks like Rails does.
Actually, in thinking about it... can't we just leave tconsole open after the specified test run completes? Or is there a use-case for closing it that I'm not thinking of?
ACTUALLY ACTUALLY: I think I would vote for both. Here's why:
Run a test and stop (I'd suggest this not be the default, but be something like tconsole --onerun UserTest
): this could be really useful for integration with other tools, like perhaps a vim plugin that lets you run tests on the current file.
Run a test and stay open (I'd suggest this be the default, tconsole all
): this I think makes more sense from a manual interaction standpoint; if I run all the tests and something fails I'll need to run the tests again, and it'd be much easier to do that if tconsole still has everything loaded up and ready to go.
Make sense?
Makes sense - I think I agree with @duwanis on this, except that I'd probably call the argument --once instead of --onerun, but that's just me.
Oh you could call it --godieinafire for all I care, as long as the functionality is there. :smile:
And, done!
Can do things like:
tconsole all
to run all tests ortconsole UserTest
to run UserTest. App runs that one command and then exits.