You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Felix Schumacher <fe...@internetallee.de> on 2016/03/25 14:26:26 UTC
ant junit
Hi all,
at the moment it seems, that the ant task junit does not work. It tries
to run AllTests.java which is not a real junit test case in the sense,
that is has no public constructor and no test methods.
If I change the test class element in build.xml to a batchtest element
that includes all test classes and skips non test classes it sort of
works. There are a few tests that fail, but most of them work.
Should I commit those changes, or is there any other use case of the
junit target, that I am not aware of?
The real target I am aiming for is to have a target, that generates
reports for the junit test cases and extending it to give us test
coverage reports (as done in the attached diff).
Regards,
Felix
Re: ant junit
Posted by Philippe Mouawad <ph...@gmail.com>.
On Fri, Mar 25, 2016 at 2:26 PM, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:
> Hi all,
>
> at the moment it seems, that the ant task junit does not work. It tries to
> run AllTests.java which is not a real junit test case in the sense, that is
> has no public constructor and no test methods.
>
> If I change the test class element in build.xml to a batchtest element
> that includes all test classes and skips non test classes it sort of works.
> There are a few tests that fail, but most of them work.
>
> Should I commit those changes, or is there any other use case of the junit
> target, that I am not aware of?
>
> The real target I am aiming for is to have a target, that generates
> reports for the junit test cases and extending it to give us test coverage
> reports (as done in the attached diff).
>
Nice idea
>
> Regards,
> Felix
>
--
Cordialement.
Philippe Mouawad.
Re: ant junit
Posted by sebb <se...@gmail.com>.
On 25 March 2016 at 13:26, Felix Schumacher
<fe...@internetallee.de> wrote:
> Hi all,
>
> at the moment it seems, that the ant task junit does not work. It tries to
> run AllTests.java which is not a real junit test case in the sense, that is
> has no public constructor and no test methods.
>
> If I change the test class element in build.xml to a batchtest element that
> includes all test classes and skips non test classes it sort of works. There
> are a few tests that fail, but most of them work.
But does that add any new functionality?
Isn't that the same as running ant test?
> Should I commit those changes.
Please don't
>or is there any other use case of the junit target, that I am not aware of?
The target can be used to run individual tests.
That was actually the main point of it.
It's possible that when it was introduced, AllTests worked as a junit
test, and so was chosen as the default.
> The real target I am aiming for is to have a target, that generates reports
> for the junit test cases and extending it to give us test coverage reports
> (as done in the attached diff).
It may be possible to fix AllTests.java.
Note that one can invoke JUnit methods to get the number of tests
found etc and use listeners to print e.g. Ignored tests.
Otherwise add a new target.
> Regards,
> Felix