Skip to main content
UltronUltron

UI tests that simply don't flake

A testing framework for Android and Compose Multiplatform. Espresso, UI Automator and Compose UI testing — with a syntax you actually want to write, and stability built into every action and assertion.

androidTestImplementation("com.atiurin:ultron-compose:2.6.5")
AndroidEspresso · UI Automator · Compose
  • Views
  • Compose
  • WebView
Compose Multiplatformone test source set
  • iOS
  • Desktop
  • Web
  • macOS
Syntax

The same test, minus the ceremony

Ultron keeps the operation names you already know and drops everything else. No new DSL to learn.

Compose UI test
composeTestRule.onNode(hasTestTag("Continue"))
.performClick()
composeTestRule.onNodeWithText("Welcome")
.assertIsDisplayed()
Ultron
hasTestTag("Continue").click()
hasText("Welcome").assertIsDisplayed()
Stability

Every operation retries itself

Ultron doesn't execute an action once and hope for the best. It repeats the operation until it succeeds or the timeout expires, and only for the exceptions you allow — an unexpected failure still fails fast.

  1. Execute the action or assertion.
  2. Analyse the failure — retry only allowed exceptions, abort on the rest.
  3. Assert the custom result condition, then report the whole step with a readable description.
Configure timeouts and allowed exceptions →
Stable by default
// waits and retries until the text appears (5s by default)
withId(R.id.result).hasText("Passed")

// a slow screen? ask for more time on this operation only
withId(R.id.result)
.withTimeout(10_000)
.hasText("Passed")

// any operation as a Boolean — no try/catch needed
val isDisplayed = withId(R.id.button).isSuccess {
isDisplayed()
}
Allure report generated from Ultron test run
Reporting

Allure report out of the box

Add ultron-allure, apply the recommended config and every operation becomes a report step — with screenshots, view hierarchy and logs attached on failure. No manual instrumentation.

@BeforeClass
@JvmStatic
fun setConfig() {
UltronConfig.applyRecommended()
UltronAllureConfig.applyRecommended()
UltronComposeConfig.applyRecommended()
}
Read the Allure guide →
Get started

Three libraries, pick what you need

Published to Maven Central. Current version 2.6.5.

build.gradle.kts
dependencies {
androidTestImplementation("com.atiurin:ultron-compose:2.6.5")
androidTestImplementation("com.atiurin:ultron-android:2.6.5")
androidTestImplementation("com.atiurin:ultron-allure:2.6.5")
}