 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Gil Roitto Guest
|
Posted: Thu Apr 28, 2005 11:57 am Post subject: Output from Test Cases written to file |
|
|
Running on JBuiler 2005, Developer.
I have created a number of Test Cases and Test Suites. The results are
nicely viewable in the "Test Hierarchy" pane, the "Test Failures" pane and
the "Test Output" pane at the bottom of the IDE.
However I would like to write these results to a file. Preferrably in the
format of the "Test Hierarchy" in order to list all succeeded and failed
Test Suites, Test Cases and Test Methods in a hierarchy. But any other way
to put these outputs to a file would be acceptable.
Thanks!
/Gil Roitto
|
|
| Back to top |
|
 |
Krishnan Subramanian Guest
|
Posted: Thu Apr 28, 2005 1:25 pm Post subject: Re: Output from Test Cases written to file |
|
|
Its been awhile since I tried this, but I believe
in the runtime configuration of the test, there are
a few options to choose the type of runner to exec
JUnit tests.
- JBuilder runner
- JUnit SwingUI runner
- JUnit Console runner
The default is the first one, but if you choose
the last one, you should be able to see the output
of the test in a console/command line mode.
Off the top of my head I think it was something
like:
// set classpath
// ">" is the prompt
| Quote: | | java junit.console.TestRunner
|
-krish
Gil Roitto wrote:
| Quote: | Running on JBuiler 2005, Developer.
I have created a number of Test Cases and Test Suites. The results are
nicely viewable in the "Test Hierarchy" pane, the "Test Failures" pane and
the "Test Output" pane at the bottom of the IDE.
However I would like to write these results to a file. Preferrably in the
format of the "Test Hierarchy" in order to list all succeeded and failed
Test Suites, Test Cases and Test Methods in a hierarchy. But any other way
to put these outputs to a file would be acceptable.
Thanks!
/Gil Roitto
|
|
|
| Back to top |
|
 |
Gil Roitto Guest
|
Posted: Thu Apr 28, 2005 3:23 pm Post subject: Re: Output from Test Cases written to file |
|
|
Thanks, this helped.
But I will only get a report what failed. E.g:
---------
C:BorlandJBuilder2005jdk1.4binjavaw -classpath ...
....F.................
Time: 0
There was 1 failure:
1) testGetStatus(Status)junit.framework.AssertionFailedError: Test Fail
at TestStatus.testGetStatus(TestStatus.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
..java:25)
FAILURES!!!
Tests run: 20, Failures: 1, Errors: 0
---------
Can I get all tests that succeeded too? Maybee som parameter to the TextUI
Runner.
And I would be very happy If I could get the hierarchy of test suites that
can be seen in the JBuilder GUI.
Gil
"Krishnan Subramanian" <ksubramanian (AT) borland (DOT) com> wrote
| Quote: | Its been awhile since I tried this, but I believe
in the runtime configuration of the test, there are
a few options to choose the type of runner to exec
JUnit tests.
- JBuilder runner
- JUnit SwingUI runner
- JUnit Console runner
The default is the first one, but if you choose
the last one, you should be able to see the output
of the test in a console/command line mode.
Off the top of my head I think it was something
like:
// set classpath
// ">" is the prompt
java junit.console.TestRunner
-krish
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|