profiling thru test/unit

P

Phlip

I want my tests to run in <5 seconds. Otherwise I get bored, drift off,
start downloading comics, etc.

Eric said:
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)
 
P

pat eyler

I want my tests to run in <5 seconds. Otherwise I get bored, drift off,
start downloading comics, etc.


-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'
 
P

Phlip

pat said:
-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:
 
E

Eric Hodel

--Apple-Mail-11-81997070
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

pat said:
-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 - (e-mail address removed) - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

--Apple-Mail-11-81997070
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iEYEARECAAYFAkJhaxsACgkQMypVHHlsnwTb2ACcCTw22WDYViUHMofygvxG355W
MVoAoNEl+YFxIQ7IdyF+935uKzR5ObZq
=l81n
-----END PGP SIGNATURE-----

--Apple-Mail-11-81997070--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top