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 17237 - Add logging and golden files capability to XTest
Summary: Add logging and golden files capability to XTest
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: xtest (show other bugs)
Version: 3.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-02 09:14 UTC by Jiri Skrivanek
Modified: 2001-11-19 16:03 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Loggin capability implementation (4.09 KB, text/plain)
2001-11-02 09:15 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2001-11-02 09:14:11 UTC
There should exist capability to allow test developer to write log messages into
files. Also golden files approach should be supported.

I propose a solution merging ideas from 

java/test/unit/src/org/netbeans/test/java/LogTestCase.java

and from

org.netbeans.xtest.log.TestLog

See attachment. All methods between "//XXXXXX " markers should go to NbTestCase
class. Proposal expects that there will exist only one golden (pass) file for
one test class. Also there will be only one log file. I am not sure if we want
to support unique log/golden files for each test method.
Comment 1 Jiri Skrivanek 2001-11-02 09:15:31 UTC
Created attachment 3241 [details]
Loggin capability implementation
Comment 2 Martin Brehovsky 2001-11-06 16:32:08 UTC
In my opinion, golden fiels functionality should be contained in a new
class, which would inherit from NbTestCase, because this type of tests
is highly specialized. All testcases requiring work with golden files
would have to inherit from this class. Merging this functionality to
the original NbTestCase would make this class unneccessarily complex
and and usage of methods like tearDown() would be more complicated.

I also support using unique log/golden file for each test method,
because there are many cases in which one test class can contain
several testcases, each using its log and golden files.

On the other hand, logging possibility (writing to *.log file) should
be available in the original NbTestCase class, because this
functionality might be used much more often than golden files.

Comment 3 Martin Brehovsky 2001-11-15 11:14:04 UTC
Logging capability and golden files support was implemented to
org.netbeans.junit.NbTestCase.java in junit module. So all classes
inheriting from NbTestCase (recommended base class for Unit tests
intended to be tested via XTest framework).
Comment 4 Jiri Skrivanek 2001-11-19 16:01:37 UTC
Verified.