# Longevity Library This library serves as a test runner for longevity suites, which exercise test cases repeatedly in order to exercise or stress the device under test. Annotate a collection of JUnit test classes with a subclass of LongevitySuite, and voila...you now have longevity tests! ## Examples There is both host-side (core) and device-side (platform) for longevity tests with only minor differences. All of the examples below use the sample suites bundled as part of the `LongevityHostLibSamples` and `LongevityPlatformLibSamples` modules under the `samples/` directory. Follow the samples directory to see how longevity suites are constructed. ### Host **Template command with stubbed out options.** `java -cp org.junit.runner.JUnitCore ` **Run simple test suite 50 times, and quit when an error is encountered.** `java -Diterations=5 -Dquitter=true -cp out/host/linux-x86/framework/LongevityHostSamples.jar org.junit.runner.JUnitCore android.host.test.longevity.samples.SimpleSuite` **Run simple test suite 10 times, shuffle all tests, and quit after 30 minutes.** `java -Diterations=10 -Dsuite-timeout_msec=1800000 -Dshuffle=true -cp out/host/linux-x86/framework/LongevityHostSamples.jar org.junit.runner.JUnitCore android.host.test.longevity.samples.SimpleSuite` ### Device **Template command with stubbed out options.** `adb shell am instrument -w -r -e