forked from robolectric/robolectric.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract links from blog posts (robolectric#331)
- Loading branch information
Showing
11 changed files
with
205 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,15 @@ slug: robolectric-3-3-and-roadmap | |
|
||
# Robolectric 3.3 and Roadmap | ||
|
||
Your Robolectric maintainers are pleased to announce the release of [Robolectric 3.3](https://github.com/robolectric/robolectric/releases/tag/robolectric-3.3)! There's been a bunch of activity recently in Robolectric, and we wanted to give a quick update on our thinking about where the project is going. | ||
Your Robolectric maintainers are pleased to announce the release of | ||
[Robolectric 3.3][robolectric-3.3-release]! There's been a bunch of activity recently in | ||
Robolectric, and we wanted to give a quick update on our thinking about where the project is going. | ||
|
||
## Introduction | ||
|
||
Robolectric started life in 2010 as a quick hack to allow Android tests to be run on a regular JVM rather than a device or emulator, allowing for fast [TDD cycles](https://en.wikipedia.org/wiki/Test-driven_development#Coding_cycle). It was mostly developed in brief spurts as needed for testing specific projects. | ||
Robolectric started life in 2010 as a quick hack to allow Android tests to be run on a regular JVM | ||
rather than a device or emulator, allowing for fast [TDD cycles][tdd-cycles]. It was mostly | ||
developed in brief spurts as needed for testing specific projects. | ||
|
||
Since then, it's been cool to see Robolectric grow with the help of the community, and become quite widely used. It's become a critical part of the test infrastructure of lots of companies and projects. It's rather outgrown the scrappy side-project Robolectric was for much of its life and needs some full-time attention. | ||
|
||
|
@@ -44,10 +48,12 @@ As new SDKs and new features are released, we'll make sure Robolectric supports | |
|
||
## Community | ||
|
||
We're going to do our best to stay on top of bug reports and pull requests. We'll be continuing to develop in the open on [GitHub](https://github.com/robolectric/robolectric), and we'd love your input on changes and designs. | ||
We're going to do our best to stay on top of bug reports and pull requests. We'll be continuing to | ||
develop in the open on [GitHub][robolectric-github], and we'd love your input on changes and | ||
designs. | ||
|
||
As always, thanks for your pull requests, bug reports, ideas and questions! | ||
|
||
_Your Robolectric maintainers,_ | ||
<br/> | ||
[[email protected]](mailto:[email protected]) and [[email protected]](mailto:[email protected]) | ||
[robolectric-3.3-release]: https://github.com/robolectric/robolectric/releases/tag/robolectric-3.3 | ||
[robolectric-github]: https://github.com/robolectric/robolectric | ||
[tdd-cycles]: https://en.wikipedia.org/wiki/Test-driven_development#Coding_cycle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,8 @@ We're doing this in three separate releases to give you a chance to fix your tes | |
|
||
The releases will be: | ||
|
||
- **3.6:** Resource selection based on transliterated framework code. Configuration properties set from [`@Config(qualifiers)`](../../device-configuration.md). | ||
- **3.6:** Resource selection based on transliterated framework code. Configuration properties set | ||
from [`@Config(qualifiers)`][config-annotation]. | ||
- **3.7:** Manifest parsing based on transliterated framework code. | ||
- **3.8:** Resource loading from `aapt`-processed binary resource files. | ||
|
||
|
@@ -29,6 +30,4 @@ Going forward, we're applying a higher standard for accuracy in Robolectric's im | |
|
||
As always, thanks for your pull requests, bug reports, ideas and questions! 💯 | ||
|
||
_Your Robolectric maintainers,_ | ||
<br/> | ||
[[email protected]](mailto:[email protected]), [[email protected]](mailto:[email protected]), and [[email protected]](mailto:[email protected]). | ||
[config-annotation]: ../../device-configuration.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,11 @@ The Robolectric team is super excited to announce the first alpha release of Rob | |
|
||
## `androidx.test` | ||
|
||
We’re collaborating closely with the Android Jetpack testing team to develop common APIs for writing Android tests that can run as both local (JVM-based) and on-device (instrumentation) tests. From 4.0 on, Robolectric will support Jetpack’s [`androidx.test`](https://developer.android.com/training/testing/) APIs, starting with support for the [`AndroidJUnit4` test runner](https://developer.android.com/training/testing/junit-runner), [`ActivityTestRule`](https://developer.android.com/training/testing/junit-rules), and [Espresso](https://developer.android.com/training/testing/espresso/) for interacting with UI components. | ||
We’re collaborating closely with the Android Jetpack testing team to develop common APIs for writing | ||
Android tests that can run as both local (JVM-based) and on-device (instrumentation) tests. From 4.0 | ||
on, Robolectric will support Jetpack’s [`androidx.test`][androidx-test] APIs, starting with support | ||
for the [`AndroidJUnit4` test runner][junit-runner], [`ActivityTestRule`][activity-test-rule], | ||
and [Espresso][espresso] for interacting with UI components. | ||
|
||
### A Robolectric 3.x style test | ||
|
||
|
@@ -49,20 +53,28 @@ As you can see, many of the idioms common in instrumentation tests are now suppo | |
|
||
In conjunction with Android Studio 3.2, Robolectric can now use resources processed using the Android build toolchain, and loads and handles those resources using the same logic as on an actual Android device. Robolectric's old idiosyncratic resource handling mode is still available for projects not yet using the latest version of the build toolchain. | ||
|
||
To enable the use of toolchain-processed resources in Robolectric tests, make sure you're using [Android Gradle Plugin](https://developer.android.com/studio/releases/gradle-plugin#updating-plugin) version `com.android.tools.build:gradle:3.2.0-alpha14` or higher, and add the following to your `gradle.properties`: | ||
To enable the use of toolchain-processed resources in Robolectric tests, make sure you're | ||
using [Android Gradle Plugin][android-gradle-plugin] version | ||
`com.android.tools.build:gradle:3.2.0-alpha14` or higher, and add the following to your | ||
`gradle.properties`: | ||
|
||
```properties | ||
android.enableUnitTestBinaryResources=true | ||
``` | ||
|
||
## Release Notes | ||
|
||
Release notes are [available here](https://github.com/robolectric/robolectric/releases/tag/robolectric-4.0-alpha-1). Robolectric 4.0 is currently in alpha release, meaning that it is not yet feature-complete, and APIs are likely to change before the final release. Use with caution. | ||
Release notes are [available here][robolectric-4.0-alpha-1-release]. Robolectric 4.0 is currently in | ||
alpha release, meaning that it is not yet feature-complete, and APIs are likely to change before the | ||
final release. Use with caution. | ||
|
||
--- | ||
|
||
As always, thanks for your pull requests, bug reports, ideas and questions! 💯 | ||
|
||
_Your Robolectric maintainers,_ | ||
<br/> | ||
[[email protected]](mailto:[email protected]), [[email protected]](mailto:[email protected]), and [[email protected]](mailto:[email protected]). | ||
[activity-test-rule]: https://developer.android.com/training/testing/junit-rules | ||
[android-gradle-plugin]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin | ||
[androidx-test]: https://developer.android.com/training/testing | ||
[espresso]: https://developer.android.com/training/testing/espresso | ||
[junit-runner]: https://developer.android.com/training/testing/junit-runner | ||
[robolectric-4.0-alpha-1-release]: https://github.com/robolectric/robolectric/releases/tag/robolectric-4.0-alpha-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,11 @@ Robolectric 4.0 is released! Here's what's new! | |
|
||
## `androidx.test` | ||
|
||
The different idioms for testing using Robolectric and instrumentation tests have long been a headache. With today's release of Robolectric 4.0 and [`androidx.test`](https://developer.android.com/training/testing/) 1.0.0, both testing environments are converging on a set of common test APIs. Robolectric now supports the [`AndroidJUnit4` test runner](https://developer.android.com/training/testing/junit-runner), [`ActivityTestRule`](https://developer.android.com/training/testing/junit-rules), and [Espresso](https://developer.android.com/training/testing/espresso/) for interacting with UI components. | ||
The different idioms for testing using Robolectric and instrumentation tests have long been a | ||
headache. With today's release of Robolectric 4.0 and [`androidx.test`][androidx-test] 1.0.0, both | ||
testing environments are converging on a set of common test APIs. Robolectric now supports the | ||
[`AndroidJUnit4` test runner][junit-runner], [`ActivityTestRule`][activity-test-rule], and | ||
[Espresso][espresso] for interacting with UI components. | ||
|
||
### A Robolectric 3.x style test | ||
|
||
|
@@ -49,7 +53,9 @@ As you can see, many of the idioms common in instrumentation tests are now suppo | |
|
||
In conjunction with Android Studio 3.2, Robolectric can now use resources processed using the Android build toolchain, and loads and handles those resources using the same logic as on an actual Android device. Robolectric's old idiosyncratic resource handling mode is still available for projects not yet using the latest version of the build toolchain, but is now deprecated and will be removed in a future release. | ||
|
||
To enable the use of toolchain-processed resources in Robolectric tests, make sure you're using [Android Gradle Plugin](https://developer.android.com/studio/releases/gradle-plugin#updating-plugin) version `com.android.tools.build:gradle:3.2.1` or higher, and add the following to your `gradle.properties`: | ||
To enable the use of toolchain-processed resources in Robolectric tests, make sure you're using | ||
[Android Gradle Plugin][android-gradle-plugin] version `com.android.tools.build:gradle:3.2.1` or | ||
higher, and add the following to your `gradle.properties`: | ||
|
||
```groovy | ||
android { | ||
|
@@ -73,16 +79,24 @@ android.enableUnitTestBinaryResources=true | |
|
||
## Migration Tool | ||
|
||
Robolectric 4.0 contains a number of API changes that may require modifications to your test code. Check out the [migration notes](../../migrating.md#migrating-to-40) and use the new [automated migration tool](../../automated-migration.md) to help convert your existing tests to be compatible with Robolectric 4.0. | ||
Robolectric 4.0 contains a number of API changes that may require modifications to your test code. | ||
Check out the [migration notes][migration] and use the new | ||
[automated migration tool][automated-migration-tool] to help convert your existing tests to be | ||
compatible with Robolectric 4.0. | ||
|
||
## Release Notes | ||
|
||
Release notes are [available here](https://github.com/robolectric/robolectric/releases/tag/robolectric-4.0). | ||
Release notes are [available here][robolectric-4.0-release]. | ||
|
||
--- | ||
|
||
As always, thanks for your pull requests, bug reports, ideas and questions! 💯 | ||
|
||
_Your Robolectric maintainers,_ | ||
<br/> | ||
[[email protected]](mailto:[email protected]), [[email protected]](mailto:[email protected]), and [[email protected]](mailto:[email protected]). | ||
[activity-test-rule]: https://developer.android.com/training/testing/junit-rules | ||
[android-gradle-plugin]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin | ||
[androidx-test]: https://developer.android.com/training/testing | ||
[automated-migration-tool]: ../../automated-migration.md | ||
[espresso]: https://developer.android.com/training/testing/espresso | ||
[junit-runner]: https://developer.android.com/training/testing/junit-runner | ||
[migration]: ../../migrating.md#migrating-to-40 | ||
[robolectric-4.0-release]: https://github.com/robolectric/robolectric/releases/tag/robolectric-4.0 |
Oops, something went wrong.