History log of /external/vogar/test/vogar/target/junit3/SuiteReturnsCustomTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
03c9c94babdb6ca370f23591679d6243567f0ad9 19-Mar-2016 Paul Duffin <paulduffin@google.com> Switch to using standard JUnit

There could be a slight performance degradation when running
a single test from within a TestSuite. That is because standard
JUnit creates instances of TestCase classes eagerly when they
are either added to a TestSuite or when a TestSuite is
constructed from the class whereas the vogar version did it
lazily.

The impact is not certain because it depends on whether vogar
uses its version of TestSuite or the one provided by Android
itself. If it is the latter then then this will have no impact
at all.

If there is a performance impact then it will affect the use
case where:
1) vogar runs an explicitly specified subset of methods from
tests retrieved from a Test suite() method.
2) The suite() method creates a TestSuite directly from class X.

In that case vogar will now create one instance of class X for
each method in it and then discard all but the method being run.
Unless class X has a very expensive constructor and/or lots of
methods that should not be a problem for most users.

It will also cause an increase in the memory usage of tests run
as part of a TestSuite returned by a suite() method. That is
because the lifespan of the Test objects will be longer be
limited to the time spent running the individual test but
instead will be the duration of the whole test run.

Running a package of tests or even a list of test classes
explicitly specified on the command line would not be affected.

All these issues will be rectified after vogar has been
refactored to use JUnit to actually run the tests. That is
either because JUnit already supports what is needed or because
its behavior will be customized so it works well on Android.

The only change made to the tests is to add @Override
annotations onto SuiteReturnsCustomTest.CustomTest's
implementations of junit.framework.Test's methods. They could
not be added in prior to this because of the conflict with
Vogar's own copy of the Test class which this change removed.

Bug: 27940141
Change-Id: I6749ea32e992fc8fa6c98b2194e612002adeb41b
/external/vogar/test/vogar/target/junit3/SuiteReturnsCustomTest.java
45b3ffb2d3d0c310718926c1acc69f5bf946ee3f 23-Mar-2016 Paul Duffin <paulduffin@google.com> Improve the test coverage for vogar.target package

It removes a number of tests that test internal behaviour of the
TestRunner and replaces them with more comprehensive higher
level tests that are going to be more stable during refactoring.

The new tests are needed in preparation for moving from vogar's
custom implementation of JUnit to standard JUnit which will
improve consistency between vogar and CTS tests and will also
allow us to make use of JUnit4 capabilities.

The process of testing was:
1) Run coverage.
2) Remove old test and add new test.
3) Check coverage to ensure was at least the same.
4) Repeat until old tests were removed.

After that the coverage report directed which code needed more
testing and additional tests were added to cover that.

The only changes made to src/ directory is to remove some usages
of @VisibleForTesting annotations from and restrict the access
to those members that are no longer required for testing.

Bug: 27940141
Change-Id: I1f215f4a19213a775cc609990eb15224a6a04f5b
/external/vogar/test/vogar/target/junit3/SuiteReturnsCustomTest.java