myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rudy De Busscher (JIRA)" <>
Subject [jira] Commented: (MYFACESTEST-19) JUnit4 Runner that runs each Test method in a seperate classloader
Date Mon, 12 Jul 2010 14:38:49 GMT


Rudy De Busscher commented on MYFACESTEST-19:

I'm preparing a text that explains why and how this Test per class loader runner could be
usefull. (Post the link when it is ready)

> JUnit4 Runner that runs each Test method in a seperate classloader
> ------------------------------------------------------------------
>                 Key: MYFACESTEST-19
>                 URL:
>             Project: MyFaces Test
>          Issue Type: New Feature
>    Affects Versions: 1.0.0-SNAPSHOT
>            Reporter: Rudy De Busscher
>         Attachments: MyfacesTest-19.patch
> When each test that runs, is supported by a new instance of a custom class loader, we
can effectively start with a 'clean' situation.  Even the constants are reset.
> So we can even change the value of the variable PARAMETER between each Test.
> static final String PARAMETER = WebXmlUtils.getInitParameter(PARAMETER_KEY);
> Besides the TestPerClassLoaderRunner (use it by setting the annotation on the class @RunWith(value
= TestPerClassLoaderRunner.class)) you can ask for the executed test method name during the
Before and After methods by calling the static method TestPerClassLoaderRunner#getTestMethodName.
 This way you can change the setup method according to the test methods which runs.
> The test method name awareness can be added seperately from the Class loader thing by
using the NamedRunner.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message