mecano1 / vogar

Automatically exported from code.google.com/p/vogar
1 stars 0 forks source link

Vogar does not run JUnit 3 tests correctly #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The Junit3.VogarJUnitTest does not run JUnit 3 test cases correctly. A JUnit 3 
test case should be run by calling the runBare() method, or the run(TestResult) 
method which itself calls the runBare() method. The runBare() method then calls 
setUp(), runTest() and tearDown() itself. Vogar uses reflection to access those 
methods which are all protected, makes them accessible and the invokes them 
itself, effectively duplicating the runBare() method.

Unfortunately, this means that overriding runBare() does not work as the method 
never gets called. This is a potential source of incompatibility between Vogar 
and other tests runners. While that is not very common it can be useful, e.g. 
to get access to the test failure exception in a general way from a base class.

Original issue reported on code.google.com by paulduf...@google.com on 25 Feb 2014 at 3:39