You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Gruber (JIRA)" <ji...@codehaus.org> on 2008/05/13 20:33:27 UTC
[jira] Created: (SUREFIRE-498) POJO tests have only partially
implemented fixture support
POJO tests have only partially implemented fixture support
----------------------------------------------------------
Key: SUREFIRE-498
URL: http://jira.codehaus.org/browse/SUREFIRE-498
Project: Maven Surefire
Issue Type: Bug
Reporter: Christian Gruber
Attachments: fixture.diff
The current support for POJO executes each test method, and before and after each test method there is a method on PojoTestSet executed for fixture setup and teardown. In the executeMethod() method, there are try/catch blocks around a delegated method (setUpFixture() and tearDownFixture()) but the implementation of those two methods is empty. So under no circumstances is setup or teardown able to occur, except with in each method.
I've attached a patch which looks up the setUp() and tearDown() public methods on the pojo test class, and if such exist, executes them appropriately. All the try/catch logic is already there - it just needed the last step of deciding what these methods were going to be called, and calling them.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SUREFIRE-498) POJO tests have only partially
implemented fixture support
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Rosenvold updated SUREFIRE-498:
----------------------------------------
Component/s: JUnit 3.x support
> POJO tests have only partially implemented fixture support
> ----------------------------------------------------------
>
> Key: SUREFIRE-498
> URL: http://jira.codehaus.org/browse/SUREFIRE-498
> Project: Maven Surefire
> Issue Type: Bug
> Components: JUnit 3.x support
> Reporter: Christian Gruber
> Attachments: fixture.diff, fixture.diff
>
>
> The current support for POJO executes each test method, and before and after each test method there is a method on PojoTestSet executed for fixture setup and teardown. In the executeMethod() method, there are try/catch blocks around a delegated method (setUpFixture() and tearDownFixture()) but the implementation of those two methods is empty. So under no circumstances is setup or teardown able to occur, except with in each method.
> I've attached a patch which looks up the setUp() and tearDown() public methods on the pojo test class, and if such exist, executes them appropriately. All the try/catch logic is already there - it just needed the last step of deciding what these methods were going to be called, and calling them.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (SUREFIRE-498) POJO tests have only partially
implemented fixture support
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Rosenvold closed SUREFIRE-498.
---------------------------------------
Resolution: Fixed
Fix Version/s: 2.7.2
Assignee: Kristian Rosenvold
Patch applied with modifications in r1058301
> POJO tests have only partially implemented fixture support
> ----------------------------------------------------------
>
> Key: SUREFIRE-498
> URL: http://jira.codehaus.org/browse/SUREFIRE-498
> Project: Maven Surefire
> Issue Type: Bug
> Components: JUnit 3.x support
> Reporter: Christian Gruber
> Assignee: Kristian Rosenvold
> Fix For: 2.7.2
>
> Attachments: fixture.diff, fixture.diff
>
>
> The current support for POJO executes each test method, and before and after each test method there is a method on PojoTestSet executed for fixture setup and teardown. In the executeMethod() method, there are try/catch blocks around a delegated method (setUpFixture() and tearDownFixture()) but the implementation of those two methods is empty. So under no circumstances is setup or teardown able to occur, except with in each method.
> I've attached a patch which looks up the setUp() and tearDown() public methods on the pojo test class, and if such exist, executes them appropriately. All the try/catch logic is already there - it just needed the last step of deciding what these methods were going to be called, and calling them.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SUREFIRE-498) POJO tests have only partially
implemented fixture support
Posted by "Christian Gruber (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Gruber updated SUREFIRE-498:
--------------------------------------
Attachment: fixture.diff
This is a better diff, which is applied not to surefire-api but to the root of the surefire tree. It adds more explicit criteria for looking up the fixture methods, and also adds some documentation for pojo tests which includes explicitly naming the methods to implement for fixture.
> POJO tests have only partially implemented fixture support
> ----------------------------------------------------------
>
> Key: SUREFIRE-498
> URL: http://jira.codehaus.org/browse/SUREFIRE-498
> Project: Maven Surefire
> Issue Type: Bug
> Reporter: Christian Gruber
> Attachments: fixture.diff, fixture.diff
>
>
> The current support for POJO executes each test method, and before and after each test method there is a method on PojoTestSet executed for fixture setup and teardown. In the executeMethod() method, there are try/catch blocks around a delegated method (setUpFixture() and tearDownFixture()) but the implementation of those two methods is empty. So under no circumstances is setup or teardown able to occur, except with in each method.
> I've attached a patch which looks up the setUp() and tearDown() public methods on the pojo test class, and if such exist, executes them appropriately. All the try/catch logic is already there - it just needed the last step of deciding what these methods were going to be called, and calling them.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira