Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Aflplusplus | 3,724 | an hour ago | 24 | apache-2.0 | C | |||||
The fuzzer afl++ is afl with community patches, qemu 5.1 upgrade, collision-free coverage, enhanced laf-intel & redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, and a lot more! | ||||||||||
Spoon | 2,702 | 10 | 2 | a month ago | 38 | February 03, 2017 | 92 | apache-2.0 | HTML | |
Distributing instrumentation tests to all your Androids. | ||||||||||
Screenshot Tests For Android | 1,689 | 1 | 4 | 6 months ago | 21 | February 03, 2022 | 51 | apache-2.0 | Java | |
Generate fast deterministic screenshots during Android instrumentation tests | ||||||||||
Android Junit5 | 759 | 17 days ago | 6 | July 02, 2022 | 16 | apache-2.0 | Kotlin | |||
Testing with JUnit 5 for Android. | ||||||||||
Flank | 638 | a month ago | 35 | May 26, 2022 | 54 | apache-2.0 | Kotlin | |||
:speedboat: Massively parallel Android and iOS test runner for Firebase Test Lab | ||||||||||
Mobly | 566 | 7 | 2 | 13 hours ago | 25 | March 08, 2022 | 17 | apache-2.0 | Python | |
E2E test framework for tests with complex environment requirements. | ||||||||||
Composer | 555 | 4 years ago | 61 | apache-2.0 | Kotlin | |||||
Reactive Android Instrumentation Test Runner. Archived. Marathon is recommended as an alternative (https://github.com/Malinskiy/marathon). | ||||||||||
Marathon | 457 | 3 | 3 days ago | 29 | September 16, 2022 | 56 | gpl-2.0 | Kotlin | ||
Cross-platform test runner written for Android and iOS projects | ||||||||||
Fork | 368 | 5 | 9 months ago | 24 | August 25, 2022 | 28 | other | Java | ||
A library that offers the fastest way to execute Android instrumentation tests. | ||||||||||
Adam | 339 | a month ago | 11 | May 19, 2021 | 2 | apache-2.0 | Kotlin | |||
Adam (or adm) is a coroutine-friendly Android Debug Bridge client written in Kotlin |
Composer is a modern reactive replacement for square/spoon with following feature set:
Problem 1: Our UI tests are stable, but we saw a lot of UI tests build failures. About ~50% of our CI builds were failing. All such failures of UI tests came from Spoon not being able to run tests on one or more emulators (device is red in the report and error message is …work/emulator-5554/result.json (No such file or directory)
, basically it timed out on installing the apk on a device, increasing adb timeout did not help, all emulators responded to adb commands and mouse/keyboard interactions, we suppose problem is in in ddmlib used by Spoon.
Solution: Composer does not use ddmlib and talks to emulators/devices by invoking adb
binary.
Problem 2: Pretty often when test run finished, Spoon freezed on moving screenshots from one of the emulators/devices. Again, we blame ddmlib used in Spoon for that.
Solution: Composer invokes adb
binary to pull files from emulators/devices, we haven't seen problems with that in more than 700 builds on CI.
Problem 3: Spoon pulled screenshots/files after finish of the whole test run on a device which slows down builds: test_run_time + pull_files_time
.
Solution: Composer pulls screenshots/files reactively after each test which basically leads to: ~test_run_time
.
Problem 4: If test sharding is enabled (which we do all the time), Spoon HTML report is very hard to look at, especially if you want to find some particular test(s) and it's not failed. You have to either hover mouse over each test to find out its name or go into html/xml source and find on which emulator/device test was sharded in order to click on correct device and then find test by CMD+F on the page.
Solution: HTML report we've built designed with usability and performance in mind.
Problem 5: Html report can be very slow to load if you have lots of screenshots (which we do) since it displays all the screenshots of tests that were run on a particular device on a single page — it can take up to minutes to finish while you effectively unable to scroll page since scroll is jumping up and down each time new screenshot loaded.
Solution: HTML report that we've built does not display screenshots on index and suite pages, screenshots are displayed only on the test page → fast page load.
With Composer we were able to make UI tests required part of CI for Pull Requests. It's fast, reliable and uses RxJava which means that it's relatively easy to add more features combining complex async transformations.
Our Frontend Team helped us build HTML Report for the Composer.
It's fast, small and designed in collaboration with our QAs and Developers who actually use it on daily basis to make it easy to use.
Here are few screenshots:
Composer shipped as jar, to run it you need JVM 1.8+: java -jar composer-latest-version.jar options
.
--apk
--apk myapp.apk
--test-apk
--test-apk myapp-androidTest.apk
--help, -help, help, -h
--test-runner
--test-apk
's AndroidManifest
.--test-runner com.example.TestRunner
--shard
true
or false
to enable/disable test sharding which statically shards tests between available devices/emulators.true
.--shard false
--output-directory
composer-output
in current working directory.--output-directory artifacts/composer-output
--instrumentation-arguments
--instrumentation-arguments myKey1 myValue1 myKey2 myValue2
.--verbose-output
true
or false
to enable/disable verbose output for Composer.false
.--verbose-output true
--keep-output-on-exit
true
or false
to keep/clean temporary output files used by Composer on exit.false
.adb
, keeping them might be useful for debugging issues.--keep-output-on-exit true
--devices
--devices
and --device-pattern
will result in an error.--devices emulator-5554 emulator-5556
--device-pattern
--device-pattern
and --devices
will result in an error.--device-pattern "emulator.+"
--install-timeout
120
seconds (2 minutes).--install-timeout 20
--fail-if-no-tests
true
or false
to enable/disable error on empty test suite.true
.False
may be applicable when you run tests conditionally(via annotation/package filters) and empty suite is a valid outcome.--fail-if-no-tests false
--with-orchestrator
true
or false
to enable/disable running tests via AndroidX Test Orchestrator.false
.--with-orchestrator true
--extra-apks
androidTestUtil
--extra-apks path/to/apk/first.apk path/to/apk/second.apk
Simplest :
java -jar composer-latest-version.jar \
--apk app/build/outputs/apk/example-debug.apk \
--test-apk app/build/outputs/apk/example-debug-androidTest.apk
With arguments :
java -jar composer-latest-version.jar \
--apk app/build/outputs/apk/example-debug.apk \
--test-apk app/build/outputs/apk/example-debug-androidTest.apk \
--test-runner com.example.test.ExampleTestRunner \
--output-directory artifacts/composer-output \
--instrumentation-arguments key1 value1 key2 value2 \
--verbose-output false \
--keep-output-on-exit false \
--with-orchestrator false
Composer is available on jcenter.
You can download it in your CI scripts or store it in your version control system (not recommended).
COMPOSER_VERSION=some-version
curl --fail --location https://jcenter.bintray.com/com/gojuno/composer/composer/${COMPOSER_VERSION}/composer-${COMPOSER_VERSION}.jar --output /tmp/composer.jar
All the releases and changelogs can be found on Releases Page.
@trevjonez built 🎉 Gradle Plugin for Composer which allows you to configure and run Composer with Gradle.
Composer works great in combination with Swarmer — another tool we've built at Juno.
Swarmer can create and start multiple emulators in parallel. In our CI Pipeline we start emulators with Swarmer and then Composer runs tests on them.
Dependencies: docker
and bash
.
ci/build.sh
Environment variable ANDROID_HOME
must be set.
./gradlew build
Dependencies: npm
and nodejs
.
cd html-report
npm install
npm build
Copyright 2017 Juno, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.