• Home
  • History
  • Annotate
  • only in /frameworks/testing/androidtestlib/src/com/android/test/runner/junit4/
History log of /frameworks/testing/androidtestlib/src/com/android/test/runner/junit4/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b7c67dbac6416e6b3f9296abd4b6bf9e840a8acc 27-Mar-2013 Flavio Lerda <flerda@google.com> Fix class runner selection.

Currently, we use the AndroidJUnit4ClassRunner only for classes that
declare fields annotated with InjectInstrumentation or InjectContext.

However, this check does not take into consideration that base classes
(that might be used to implement shared test fixtures) might also want
to use these annotations and therefore we need to check all fields.

The logic is correctly implemented in the AndroidJUnit4ClassRunner (by
means of using org.junit.runners.model.TestClass), i.e., all fields from
super classes are considered; however this test runner will not be used
if one of the parent classes declares the inject field but the class
defining the tests does not.

This commit fixes this issue by traversing the class hierarchy as done
by the TestClass implementation.

Change-Id: I31e4e2f251e5bb79eedd43f59a6ba63368dcd9a2
ndroidJUnit4Builder.java
1379df175a8ff337bae4d98da87219dda721012c 09-Feb-2013 Brett Chabot <brettchabot@google.com> Add ability to receive command line args in JUnit3 tests.

Also fix @InjectBundle for JUnit4 tests.

Change-Id: I21d2375a2e1d88d6bfb52b03f94274bba745987b
ndroidJUnit4ClassRunner.java
fc37a0172db7197e6e0702dfa9bfdd6bed1947b1 01-Feb-2013 Brett Chabot <brettchabot@google.com> Add InjectBundle annotation for JUnit4 tests.

This allows tests to receive arguments passed in on the command line.

A future commit will add similar functionality to JUnit3 tests.

Change-Id: I57fa52b73b8faf1179212778eb82c67ec5eed7b0
ndroidJUnit4Builder.java
ndroidJUnit4ClassRunner.java
3604db5bcd124dfd1396fb51434d3f4337690cff 17-Aug-2012 Brett Chabot <brettchabot@google.com> Add support for 'logOnly' mode.

Also refactor runner classes into junit3 and junit4 packages.

Change-Id: I205b481d9b158e9e2c761e6917d471655b898d16
ndroidJUnit4Builder.java
ndroidJUnit4ClassRunner.java
onExecutingJUnit4ClassRunner.java