Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
profiling thru test/unit
Phlip
4/15/2005 6:31:00 PM
I want my tests to run in <5 seconds. Otherwise I get bored, drift off,
start downloading comics, etc.
Eric Hodel wrote:
> Use the -n argument to the testrunner.
I can't seem to Google this up. Googling for "-n" is problematic. What
Google search terms would work?
And what is the presumed relation between my command line (if "-n" is a
command line argument) and my explicit test runner?
runner = Test::Unit::UI::Console::TestRunner
# noise = Test::Unit::UI::NORMAL
noise = Test::Unit::UI::VERBOSE
got = runner.run(aTestCase, noise)
--
Phlip
http://industrialxp.org/community/bin/view/Main/TestFirstUser...
3 Answers
pat eyler
4/15/2005 6:58:00 PM
0
On 4/15/05, Phlip <phlip_cpp@yahoo.com> wrote:
> I want my tests to run in <5 seconds. Otherwise I get bored, drift off,
> start downloading comics, etc.
>
> Eric Hodel wrote:
>
> > Use the -n argument to the testrunner.ruby TestZenTest.rb -n
-n [NAME] will run all tests matching NAME (NAME may be a pattern)
(-t [NAME] will run all the tests in the NAME testcase (NAME may be a pattern))
use it like this:
$ ruby test_r43.rb -n person #runs all tests with 'person in their name'
>
> I can't seem to Google this up. Googling for "-n" is problematic. What
> Google search terms would work?
>
> And what is the presumed relation between my command line (if "-n" is a
> command line argument) and my explicit test runner?
>
> runner = Test::Unit::UI::Console::TestRunner
> # noise = Test::Unit::UI::NORMAL
> noise = Test::Unit::UI::VERBOSE
> got = runner.run(aTestCase, noise)
>
> --
> Phlip
>
http://industrialxp.org/community/bin/view/Main/TestFirstUser...
>
>
--
thanks,
-pate
-------------------------
We are often unable to tell people what they need to know, because
they want to know something else, and would therefore only
misunderstand what we said
- the Raven (George MacDonald, Lilith)
Phlip
4/15/2005 8:16:00 PM
0
pat eyler wrote:
> -n [NAME] will run all tests matching NAME (NAME may be a pattern)
> (-t [NAME] will run all the tests in the NAME testcase (NAME may be a
pattern))
Okay. I don't want to profile, I just want to pick specific tests.
However, that command line argument doesn't get all the way to my
testrunner, which looks like this:
> > runner = Test::Unit::UI::Console::TestRunner
> > # noise = Test::Unit::UI::NORMAL
> > noise = Test::Unit::UI::VERBOSE
> > got = runner.run(aTestCase, noise)
--
Phlip
http://industrialxp.org/community/bin/view/Main/TestFirstUser...
Eric Hodel
4/16/2005 7:45:00 PM
0
On 15 Apr 2005, at 13:19, Phlip wrote:
> pat eyler wrote:
>
>> -n [NAME] will run all tests matching NAME (NAME may be a pattern)
>> (-t [NAME] will run all the tests in the NAME testcase (NAME may be a
> pattern))
>
> Okay. I don't want to profile, I just want to pick specific tests.
>
> However, that command line argument doesn't get all the way to my
> testrunner, which looks like this:
>
> runner = Test::Unit::UI::Console::TestRunner
> #noise = Test::Unit::UI::NORMAL
> noise = Test::Unit::UI::VERBOSE
> got = runner.run(aTestCase, noise)
Do you do anything with ARGV?
You'll need to set the filters up, have a look at how
test/unit/autorunner.rb does it.
--
Eric Hodel - drbrain@segment7.net -
http://se...
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
profiling thru test/unit
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password