June 30, 2021
This is the stable release of AndroidX Test 1.4.0 + Espresso 3.4.0.
It contains updates to the following libraries:
- Core 1.4.0
- Espresso 3.4.0
- Intents 3.4.0
- JUnit 1.1.3
- Monitor 1.4.0
- Orchestrator 1.4.0
- Runner 1.4.0
- Rules 1.4.0
- Truth 1.4.0
- Test Services 1.4.0
There are no changes since 1.4.0-rc01.
Here is a summary of the changes since the 1.3.0 release:
New Features
- Add Espresso ViewMatcher APIs for negative conditions
- Allow unregistering Loopers from Espresso IdlingRegistry
- Support specifying junit RunListeners via java.util.ServiceLoader
- Introduce Espresso BoundedDiagnosingMatcher base class API that offers better error messaging, and apply it to various Espresso matchers
- Support using UIThreadTest at the class level
- Several utility methods added to ext.truth's LocationSubject
- Add
SparseBooleanArraySubject
TruthSubject
for making assertions aboutSparseBooleanArray
.
Bug Fixes
- Improve handling for large stack traces on test failures [#729, #269]
- Remove test runner framework related stack frames
- Truncate stack traces to a max limit of 64KB, to avoid binder limit transaction errors
- Add support for classpath scanning test discovery for multidex instrumentation apks on android APIs < 21.
- Espresso: Improve error messaging when no activity is present
- Improve Instrumentation#runOnMainSync exception error handling
- Improve documentation for -e timeout_msec and AndroidJUnit4.
- Send ActivityOptions to BootstrapActivity [#685]
- Improve ViewMatchers#assertThat error messaging by enabling it to use Matcher.describeMismatch
- Fix the missing desugar ThrowableExtension errors when using espresso remote [issuetracker.google.com/170228109]
- Fix espresso web on < Android API 19 by including the androidx.test.espresso.web.bridge classes
- Unregister ActivityResultWaiter in InstrumentationActivityInvoker if it wasn't already unregistered
- Runner: Reduce TestEventClient 'not primary instr' log message to a warning, as its an expected condition in multi process tests
- Espresso: Update HasSiblingMatcher to only check siblings (not self).
- Fix artifact name for espresso.idling.resource [#809]
- Expose setMasterPolicyTimeoutWhenDebuggerAttached functionality [#814]
- Remove overly verbose ActivityLifecycleMonitorImpl callback logging.
Dependency Changes
- Update espresso.accessibility and espresso.contrib to depend on the androidx-compatible com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:3.1. This release will thus require java8 source/target compatiblity.
[#492]
Known Issues
- Using orchestrator on APIS 30+ requires Studio/AGP 4.2+