can't generate JUnit report
posted 13 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi, this is the test I have:
and this is the build.xml: (I'm very new to JUnit testing so I'm sorry if the code is too long.. I don't know which lines to omit)
why can't I generate a report after running the test (test01) ? I'm running the test using eclipse..
and this is the build.xml: (I'm very new to JUnit testing so I'm sorry if the code is too long.. I don't know which lines to omit)
why can't I generate a report after running the test (test01) ? I'm running the test using eclipse..
posted 13 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Usually to generate a JUnit report you need to compile in debug mode
change the <javac srcdir="${src}" destdir="${build}"> to <javac debug="true" debuglevel="vars,lines,source" srcdir="${src}" destdir="${build}">
I discovered when creating/reading this post: Covering your tests with Cobertura, JUnit, HSQLDB, JPA.
If you want, with Eclipse you can generate a build.xml that creates a junit report for you.
Go to export/ant
change the <javac srcdir="${src}" destdir="${build}"> to <javac debug="true" debuglevel="vars,lines,source" srcdir="${src}" destdir="${build}">
I discovered when creating/reading this post: Covering your tests with Cobertura, JUnit, HSQLDB, JPA.
If you want, with Eclipse you can generate a build.xml that creates a junit report for you.
Go to export/ant
posted 13 years ago
Take a look at your junitreport todir="${junit.output.dir}" and the various todir's of the tests. I have the 'todir' of the test as filset/input to myreporting. I am thinking you want to use '${junit.output.dir}' instead of './results' in your tests.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
david santana wrote:
and this is the build.xml: (I'm very new to JUnit testing so I'm sorry if the code is too long.. I don't know which lines to omit)
why can't I generate a report after running the test (test01) ? I'm running the test using eclipse..
Take a look at your junitreport todir="${junit.output.dir}" and the various todir's of the tests. I have the 'todir' of the test as filset/input to myreporting. I am thinking you want to use '${junit.output.dir}' instead of './results' in your tests.
david santana
Greenhorn
Posts: 10
posted 13 years ago
@Hebert: how? can you tell me in detail? I thought the comments in my build.xml says that the build.xml (the one I posted here) is generated by eclipse.. I'll try your suggestions though...
@Brian: I tried your suggestion but the report is still nowhere to be found.. or maybe I'm looking at the wrong place? if I'm not mistaken, ${junit.output.dir} is a variable that stores the path where the junit output will be put, right? how do I know the variable's value?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hebert Coelho wrote:
If you want, with Eclipse you can generate a build.xml that creates a junit report for you.
Go to export/ant
@Hebert: how? can you tell me in detail? I thought the comments in my build.xml says that the build.xml (the one I posted here) is generated by eclipse.. I'll try your suggestions though...
@Brian: I tried your suggestion but the report is still nowhere to be found.. or maybe I'm looking at the wrong place? if I'm not mistaken, ${junit.output.dir} is a variable that stores the path where the junit output will be put, right? how do I know the variable's value?
Brian Burress
Ranch Hand
Posts: 143
posted 13 years ago
The ant script has this line:
<property name="junit.output.dir" value="junit"/>
Your base dir is set up as ".", so I am expecting that the files would be in a junit directory off of whatever directory you are executing the script off of. You may need (or want) to make the directory just to ensure it is there. I haven't tried to see if it will get generated automatically.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
david santana wrote:
how do I know the variable's value?
The ant script has this line:
<property name="junit.output.dir" value="junit"/>
Your base dir is set up as ".", so I am expecting that the files would be in a junit directory off of whatever directory you are executing the script off of. You may need (or want) to make the directory just to ensure it is there. I haven't tried to see if it will get generated automatically.
posted 13 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
File > Export > General > Ant Buildfiles
david santana
Greenhorn
Posts: 10
posted 13 years ago
I tried that but the report is still not there... what do I do?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hebert Coelho wrote:File > Export > General > Ant Buildfiles
I tried that but the report is still not there... what do I do?
posted 13 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
What is your eclipse version?
david santana
Greenhorn
Posts: 10
posted 13 years ago
I'm using eclipse Helios..
Version: Helios Service Release 2
Build id: 20110218-0911
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hebert Coelho wrote:What is your eclipse version?
I'm using eclipse Helios..
Version: Helios Service Release 2
Build id: 20110218-0911
posted 13 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Here is how a generate it:
And it works. [=
And it works. [=
david santana
Greenhorn
Posts: 10
posted 13 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
@Hebert: I did as your guide showed... the build.xml IS generated but when I run the test, there's no report... how do I generate the report?
david santana
Greenhorn
Posts: 10
posted 13 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
can anyone help me with this issue? why can't I generate a report even after doing what Hebert showed?
| Well THAT's new! Comfort me, reliable tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |







