Profiling thru test/unit

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/TestFirstUserInterfaces

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'

···

On 4/15/05, Phlip <phlip_cpp@yahoo.com> wrote:

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/TestFirstUserInterfaces

--
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)

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/TestFirstUserInterfaces

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.

PGP.sig (194 Bytes)

···

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)

--
Eric Hodel - drbrain@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04