hypershard-android

Introduction: CLI tool for collecting tests
More: Author   ReportBugs   
Tags:

Build, Test and Lint

A fast and easy CLI tool that leverages AST (Abstract Syntax Tree) to parse test files for the purposes of test collection.

Apps that have a significant number of UI tests – like Paper or Dropbox apps – need to be sharded to run efficiently on CI. Unfortunately, UI test sharding generally requires you to build the entire application. Hypershard removes this first build by performing analysis of the Abstract Syntax Tree to output the list of all available tests.

At Dropbox, we run Android UI tests separately from JVM tests. Using historical data, we shard our UI tests such that each shard is balanced e.g. each shard ends approximately at the same time.

We do this by running tests using ADB Instrumentation test options -e testFile where each shard has its own list of tests.

Download

The all jar is executable and can be downloaded from Maven Central

Snapshots of the development version are available in Sonatype's snapshots repository.

Another use case could be to use Hypershard as a dependency in your project

implementation 'com.dropbox.mobile.hypershard:hypershard:1.1.3'

Usage

java -jar hypershard-1.1.3-all.jar --help

Here's an example Python script that uses Hypershard as a CLI tool.

Building

This command will build the jar with dependencies

./gradlew install

Testing

./gradlew check

Contributing

This is a standalone gradle project, you can open this project to start contributing

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools