Best practice for applying Filters and Sorters to a given JUnit 4.x testsuite

View: New views
2 Messages — Rating Filter:   Alert me  

Best practice for applying Filters and Sorters to a given JUnit 4.x testsuite

by jayasinghe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am currently ivestigating how to write a JUnit testsuite that allows
configuration- and annotation-based skips of tests as well as a well
defined execution order of tests. A precondition for us is that we do
not want to override/extend any internal classes of JUnit. We would like
to do it the "official" way. Sadly I could not find any documentaion on
this topic. The only documentation I found was the Javadoc for Sorter
and Filter.
My question is whether there is any best practice for this kind of
functionality. When I previously asked a similar question on this list I
got the hint that TestNG does exactly what we need. However TestNG is no
option for us and we want to or have to use JUnit.
In the meantime I developed a testsuite that runs with an extended
Version of Parameterized.class and supports the usage of Filter and
Sorter based on the current the current parameter value. I tried to only
use official non-internal APIs of JUnit. I am eager to know whether I
have the same understanding of how to extend JUnit than the other people
on the list..

You can find Eclipse projects with my experimental testsuite here:
http://sourceforge.net/tracker/download.php?group_id=15278&atid=115278&f\
ile_id=283395&aid=2008607
 
<http://sourceforge.net/tracker/download.php?group_id=15278&atid=115278&\
file_id=283395&aid=2008607%20>
Best Regards,
Robin de Silva Jayasinghe



[Non-text portions of this message have been removed]


Re: Best practice for applying Filters and Sorters to a given JUnit 4.x testsuite

by David Saff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Robin,

Have you looked at whether your job is easier JUnit 4.5?  We've made a
lot more functionality non-internal, which I hope would help.  Thanks,

   David Saff

On Wed, Jul 2, 2008 at 6:42 AM, robinjay33 <robin.desilva@...> wrote:

> Hi,
>
> I am currently ivestigating how to write a JUnit testsuite that allows
> configuration- and annotation-based skips of tests as well as a well
> defined execution order of tests. A precondition for us is that we do
> not want to override/extend any internal classes of JUnit. We would like
> to do it the "official" way. Sadly I could not find any documentaion on
> this topic. The only documentation I found was the Javadoc for Sorter
> and Filter.
> My question is whether there is any best practice for this kind of
> functionality. When I previously asked a similar question on this list I
> got the hint that TestNG does exactly what we need. However TestNG is no
> option for us and we want to or have to use JUnit.
> In the meantime I developed a testsuite that runs with an extended
> Version of Parameterized.class and supports the usage of Filter and
> Sorter based on the current the current parameter value. I tried to only
> use official non-internal APIs of JUnit. I am eager to know whether I
> have the same understanding of how to extend JUnit than the other people
> on the list..
>
> You can find Eclipse projects with my experimental testsuite here:
> http://sourceforge.net/tracker/download.php?group_id=15278&atid=115278&f\
> ile_id=283395&aid=2008607
>
> <http://sourceforge.net/tracker/download.php?group_id=15278&atid=115278&\
> file_id=283395&aid=2008607%20>
> Best Regards,
> Robin de Silva Jayasinghe
>
> [Non-text portions of this message have been removed]
>
>
LightInTheBox - Buy quality products at wholesale price!