JUnit: the same tests for different implementations and states with a fine grain result

We have two different implementations of the same interface. Think of it as a reference and production implementation. These two implementations are implemented by different teams, and the goal is to get the same results from both implementations.

The team creating the reference implementation created a large number of test cases based on Junit (now ~ 700 test cases), and these unit tests are often performed during development. We can use the same set of test cases to implement production.

The functionality of the production implementation is checked using regression testing. However, not being able to run single tests against the implementation of production, we quickly receive feedback that something is seriously violated every time we receive a new version of the production code.

But since certain int functionality is not available in the release, or the results are different due to known errors, not all tests pass with this implementation. This makes it difficult to detect regressions early.

There are several categories here:

  • (A) test cases that make sense only for a reference implementation and will never be important for a production implementation

  • (B) test cases where when testing a production implementation (i.e., the additional values ​​specified in the reference implementation) only certain statements should be excluded

  • (C) , , , , ,

:

  • if-, , . (B), .

  • takeTrue. (A), , (B).

, , -

  • , , takeTrue, , (C)

  • , , , ,

    • , , ,
    • , , ,
    • , , ,
    • , , ,

- - JUnit ( JUnit eclipse)?

+3
3

, Filter, , (, @Development() @Version() ).

(B), : 3.1 3.2 .. , , , 3.1.

" " , junit , . - .

, ( ), Junit , , CI, -, , , , xffightfire .

+1

, , , , - . , JUnit "", , .

0

, , , , , , , ?

, (, , 90% prod, ), , , , ( )

0

All Articles