This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 175890 - [68cat] number of tests will not be reset at "Rerun" action
Summary: [68cat] number of tests will not be reset at "Rerun" action
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Testing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-02 00:18 UTC by Masaki Katakai
Modified: 2009-11-03 10:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test project (4.56 KB, application/x-compressed)
2009-11-02 00:22 UTC, Masaki Katakai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2009-11-02 00:18:44 UTC
[ JDK VERSION : 1.6.* ]

Product Version: NetBeans IDE 6.8 Beta (Build 200910212001)
Java: 1.6.0_15; Java HotSpot(TM) 64-Bit Server VM 14.1-b02-92

It seems that "Rerun" performs all test methods but
remembers the number of test methods.

1. Create a Ruby project and create unit test like below.
   Just 1 test method.

class NewClassTest < Test::Unit::TestCase
  def test_myadd
    assert_equal(1,Sample.myadd(1,0))
  end
end

2. "Test File"

Result window shows "1 tests, 0 failures, 0 errors"

It's OK.

3. Add new method like

class NewClassTest < Test::Unit::TestCase
  def test_myadd
    assert_equal(1,Sample.myadd(1,0))
  end
  def test_myadd2
    assert_equal(2,Sample.myadd(1,1))
  end
end

4. Click "Rerun" icon

It will perform 2 methods but outputs is

"1 tests, 0 failures, 0 errors"

"2 tests" should be "1".

5. "Test File" again

"2 tests, 0 failures, 0 errors"

6. Rerun again

"2 tests, 0 failures, 0 errors"

So the number of tests will be reset when we perform "Test File". It's nice if it happens at "Rerun" action because
"Rerun" will perform all test methods.
Comment 1 Masaki Katakai 2009-11-02 00:20:49 UTC
screenshot:

http://f.hatena.ne.jp/images/fotolife/m/miyohide/20091101/20091101234220.png

2 tests run, but "1 tests" is displayed.
Comment 2 Masaki Katakai 2009-11-02 00:22:08 UTC
Created attachment 90393 [details]
test project
Comment 3 Erno Mononen 2009-11-02 13:47:53 UTC
Thanks for the report and the sample project, I reproduced the problem. Will commit a fix shortly.
Comment 4 Erno Mononen 2009-11-02 14:22:01 UTC
Fixed in 7792e61e3345.
Comment 5 Quality Engineering 2009-11-03 10:19:20 UTC
Integrated into 'main-golden', will be available in build *200911030222* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7792e61e3345
User: Erno Mononen <emononen@netbeans.org>
Log: #175890: [68cat] number of tests will not be reset at "Rerun" action