Test order in Test::Unit 
Author Message
 Test order in Test::Unit

If you define setup and teardown methods, in your test suite these are
called before and after, respectively, each test_ method is called.


-----Original Message-----

Sent: Tuesday, April 29, 2003 12:11 PM

Subject: Re: Test order in Test::Unit

> Hi all,

> I'm using Test::Unit for testing my codes. I have some questions
> I'd like to ask.

> - Test::Unit shows testing process with periods like 'Started...
>   ....', but is there a way to make it show the test method
>   names instead? My test sometimes fails and sometimes passes, so
>   I'd like to check the order of the tests conducted.
> - Does Test::Unit have any method to test private methods?

> I've searched for the answers in Test::Unit RDoc document, but I
> couldn't find them...

tests are run in alphabetical order, so

  def test_a_foo
    puts 'i run first'

  def test_b_bar
    puts 'i run second'

people who 'know' testing reccomend against this - but there are times when
is not avoidable.


  | Ara Howard
  | NOAA Forecast Systems Laboratory
  | Information and Technology Services
  | Data Systems Group
  | R/FST 325 Broadway
  | Boulder, CO 80305-3328

  | Phone:  303-497-7238
  | Fax:    303-497-7259

Wed, 19 Oct 2005 06:02:55 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Test order in Test::Unit

2. Test::Unit::Mock: Mock objects for testing with Test::Unit

3. using test::unit for C++ unit tests

4. Automating UI tests (was Re: Art of Unit Testing)

5. Unit testing data; What to test

6. Test Tool for Unit Tests?

7. test test test test

8. Testing, testing, testing,

9. test, test, test

10. test test test

11. test, test, test PLEASE IGNORE

12. TEST TEST TESTs ---- Please Ignore


Powered by phpBB® Forum Software