Project

General

Profile

Actions

Task #5034

closed

Feature #5934: JUnit4

Upgrade saga-api-test to JUnit4

Added by Schwarz Lionel about 11 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
engine
Target version:
Start date:
09/12/2013
Due date:
% Done:

0%

Estimated time:

Description

- check if it is possible to know the name of the running test in the setUp()
- how to list disabled tests (annotations, static list...)

Actions #1

Updated by Schwarz Lionel about 11 years ago

  • Subject changed from JUnit: do not run setUp if test is ignored to Upgrade to JUnit4
  • Category set to engine
  • Status changed from New to Suspended

The idea is to not run setUp() if the test is ignored. This is not possible with JUnit3.

Upgrading to JUnit4:

- upgrade to JUnit4 in saga-api-test POM

JUnit4 can run tests written with JUnit3 but in the JUnit3 way (setUp is run in any case).

To run tests as JUnit4, test classes MUST NOT extend junit.framework.TestCase. So the root class AbstractTest must not extend TestCase.
So it seems impossible to smoothly upgrade to JUnit4. All tests must be rewritten.

Actions #2

Updated by Schwarz Lionel about 11 years ago

  • Try to use @BeforeClass and @AfterClass when it's possible (if setUp can be done once for all tests)
  • TestSuites with @RunWith and @SuiteClasses
  • use Test(timeout=xxx) for timeouts

Resoures:
http://www.vogella.com/articles/JUnit/article.html

Actions #3

Updated by Schwarz Lionel over 10 years ago

  • Target version deleted (1.0.0)
Actions #4

Updated by Schwarz Lionel over 10 years ago

  • Status changed from Suspended to Assigned
  • Priority changed from Low to Normal
Missing JUnit4 tests:
  • org.ogf.saga.namespace.IntegrationClean
Actions #5

Updated by Schwarz Lionel over 10 years ago

  • Subject changed from Upgrade to JUnit4 to Upgrade saga-api-test to JUnit4
Actions #6

Updated by Schwarz Lionel over 10 years ago

  • Parent task set to #5934
Actions #7

Updated by Schwarz Lionel over 10 years ago

  • Status changed from Assigned to Resolved
  • Target version set to 1.1.0
Actions

Also available in: Atom PDF