# junit

Published articles for junit.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Handling Asynchronous Images in Android Screenshot Tests

DevFeed: [Handling Asynchronous Images in Android Screenshot Tests](<https://devfeed.tech/articles/handling-asynchronous-images-in-android-screenshot-tests-24846.md>)

Original publisher: [Read original article](<https://alexzh.com/handling-asynchronous-images-in-android-screenshot-tests/>)

Author: Alex Zhukovich

Published: 2026-08-27T07:41:23Z

Content type: tutorial

Language: en

Sources: [Alex Zhuk - Android development and testing](<https://devfeed.tech/sources/alex-zhuk-android-development-and-testing.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [test](<https://devfeed.tech/topics/test.md>), [Compose](<https://devfeed.tech/topics/compose.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [junit](<https://devfeed.tech/tags/junit.md>), [screenshot-testing](<https://devfeed.tech/tags/screenshot-testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This tutorial explains why asynchronous image loading makes Android screenshot tests unstable or inconsistent. It presents two approaches for deterministic results: injecting fake images with the coil-test library and using Compose inspection mode when the first approach is unavailable.

### Source excerpt

This article is based on a chapter from my book, Mastering Android Screenshot Testing. Modern applications frequently load images asynchronously, which is a common cause of unstable screenshot tests or confusion when you review newly generated screenshots. A test can pass locally and fail on CI, produce a different image

## Maestro CLI 2.8.0: swipe from any point inside an element

DevFeed: [Maestro CLI 2.8.0: swipe from any point inside an element](<https://devfeed.tech/articles/maestro-cli-2-8-0-swipe-from-any-point-inside-an-element-22903.md>)

Original publisher: [Read original article](<https://maestro.dev/blog/maestro-cli-2-8-0>)

Author: Manu Armani

Published: 2026-08-06T17:00:00Z

Content type: release

Language: en

Sources: [mobile.dev - Medium](<https://devfeed.tech/sources/mobile-dev-medium.md>)

Topics: [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Android](<https://devfeed.tech/topics/android.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Emulator](<https://devfeed.tech/topics/emulator.md>), [selectors](<https://devfeed.tech/topics/selectors.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [html](<https://devfeed.tech/tags/html.md>), [ios](<https://devfeed.tech/tags/ios.md>), [junit](<https://devfeed.tech/tags/junit.md>), [maestro](<https://devfeed.tech/tags/maestro.md>), [release](<https://devfeed.tech/tags/release.md>), [reports](<https://devfeed.tech/tags/reports.md>), [selectors](<https://devfeed.tech/tags/selectors.md>)

### AI overview

Maestro CLI 2.8.0 adds swipes from chosen points within elements, variables for permissions and screenshot thresholds, improved selector retries, bounded Android emulator boot time, faster and more targeted locale handling, broader iOS device enumeration, and reliability fixes for Maestro Cloud uploads and reports.

### Source excerpt

Maestro CLI 2.8.0 adds swipes that start from a chosen point inside an element, variables in permissions and screenshot thresholds, and reliability fixes across Maestro Cloud uploads and reports.

## On-Device Debugging And JUnit 5

DevFeed: [On-Device Debugging And JUnit 5](<https://devfeed.tech/articles/on-device-debugging-and-junit-5-19285.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/developer-workflow-debug-and-junit/>)

Author: Shai Almog

Published: 2026-05-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [debugging](<https://devfeed.tech/topics/debugging.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [ide](<https://devfeed.tech/topics/ide.md>), [simulator](<https://devfeed.tech/topics/simulator.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>), [Code](<https://devfeed.tech/topics/code.md>), [Emulator](<https://devfeed.tech/topics/emulator.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-apps](<https://devfeed.tech/tags/android-apps.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [apk](<https://devfeed.tech/tags/apk.md>), [app](<https://devfeed.tech/tags/app.md>), [breakpoint](<https://devfeed.tech/tags/breakpoint.md>), [build](<https://devfeed.tech/tags/build.md>), [code](<https://devfeed.tech/tags/code.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [developer](<https://devfeed.tech/tags/developer.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [ide](<https://devfeed.tech/tags/ide.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [intellij-idea](<https://devfeed.tech/tags/intellij-idea.md>), [ios](<https://devfeed.tech/tags/ios.md>), [java](<https://devfeed.tech/tags/java.md>), [junit](<https://devfeed.tech/tags/junit.md>), [linux](<https://devfeed.tech/tags/linux.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [simulator](<https://devfeed.tech/tags/simulator.md>)

### AI overview

This tutorial describes Codename One's new JDWP-based on-device debugging for ParparVM iOS and Android apps. It explains debugging Java code and objects on simulators and physical devices using IntelliJ IDEA or other JDWP-speaking debuggers, and briefly covers standard JUnit 5 integration with the JavaSE simulator.

### Source excerpt

A walk-through of the new JDWP-based on-device debugging pipeline for ParparVM iOS apps and Android apps, with a step-by-step IntelliJ tutorial for each, and a short tutorial on the new standard JUnit 5 integration against the JavaSE simulator.

## How I'm Using Agents for Development - January 2026

DevFeed: [How I'm Using Agents for Development - January 2026](<https://devfeed.tech/articles/how-i-m-using-agents-for-development-january-2026-25131.md>)

Original publisher: [Read original article](<https://handstandsam.com/2026/01/07/how-im-using-agents-for-development-january-2026/>)

Author: Sam Edwards

Published: 2026-01-07T16:23:40Z

Content type: opinion

Language: en

Sources: [Handstand Sam](<https://devfeed.tech/sources/handstand-sam.md>)

Topics: [Development](<https://devfeed.tech/topics/development.md>), [Claude](<https://devfeed.tech/topics/claude.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>), [ide](<https://devfeed.tech/topics/ide.md>), [context window](<https://devfeed.tech/topics/context-window.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [GUI](<https://devfeed.tech/topics/gui.md>), [YAML](<https://devfeed.tech/topics/yaml.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [claude](<https://devfeed.tech/tags/claude.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [context-window](<https://devfeed.tech/tags/context-window.md>), [development](<https://devfeed.tech/tags/development.md>), [gui](<https://devfeed.tech/tags/gui.md>), [ide](<https://devfeed.tech/tags/ide.md>), [idea](<https://devfeed.tech/tags/idea.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [intellij-idea](<https://devfeed.tech/tags/intellij-idea.md>), [junit](<https://devfeed.tech/tags/junit.md>), [review](<https://devfeed.tech/tags/review.md>), [test-automation](<https://devfeed.tech/tags/test-automation.md>), [updates](<https://devfeed.tech/tags/updates.md>), [yaml](<https://devfeed.tech/tags/yaml.md>)

### AI overview

A developer describes using agents with IntelliJ IDEA, Firebender, and Claude Sonnet 4.5 across Trailblaze projects. The article explains a Research, Plan, Implement workflow, including incremental commits, progress handoffs when the context window fills, refactoring, UI test automation, and building a Compose-based YAML editor.

### Source excerpt

I'm currently sitting here with Intellij IDEA IDE open with 3 workspaces (different clones of the Trailblaze project). In each one of them I'm using Firebender with the Claude Sonnet 4.5 model. As I'm writing this I just toggled back over to IDE and made sure all my agents are still running. I've been hesitant [...]

## Kotlin Multiplatform test interceptors with Burst

DevFeed: [Kotlin Multiplatform test interceptors with Burst](<https://devfeed.tech/articles/kotlin-multiplatform-test-interceptors-with-burst-29006.md>)

Original publisher: [Read original article](<https://code.cash.app/burst-test-interceptors>)

Author: Jesse Wilson

Published: 2025-09-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Cash App Code Blog](<https://devfeed.tech/sources/cash-app-code-blog.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [http](<https://devfeed.tech/tags/http.md>), [junit](<https://devfeed.tech/tags/junit.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-android](<https://devfeed.tech/tags/kotlin-android.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [okhttp](<https://devfeed.tech/tags/okhttp.md>), [snapshot](<https://devfeed.tech/tags/snapshot.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [timeout](<https://devfeed.tech/tags/timeout.md>)

### AI overview

This article introduces Burst 2.8's Kotlin Multiplatform test interceptors, an alternative to JUnit rules for reusing behavior across tests on Kotlin platforms. It also describes interception of suspending tests.

### Source excerpt

Interceptors are like JUnit rules, but for every Kotlin platform

## Declarative Gradle EAP3 - April 2025 Update

DevFeed: [Declarative Gradle EAP3 - April 2025 Update](<https://devfeed.tech/articles/declarative-gradle-eap3-april-2025-update-24606.md>)

Original publisher: [Read original article](<https://blog.gradle.org/declarative-gradle-april-2025-update>)

Author: Sterling Greene

Published: 2025-04-15T04:00:00Z

Content type: article

Language: en

Sources: [The Gradle Blog](<https://devfeed.tech/sources/the-gradle-blog.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Java](<https://devfeed.tech/topics/java.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android Gradle Plugin](<https://devfeed.tech/topics/android-gradle-plugin.md>)

Tags: [android-gradle-plugin](<https://devfeed.tech/tags/android-gradle-plugin.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [junit](<https://devfeed.tech/tags/junit.md>), [preview](<https://devfeed.tech/tags/preview.md>), [testing](<https://devfeed.tech/tags/testing.md>), [update](<https://devfeed.tech/tags/update.md>)

### AI overview

This April 2025 update introduces Declarative Gradle EAP3, an experimental release that expands datatype support in the Declarative Configuration Language (DCL), improves testing support for Java and Kotlin projects, and reports lessons from real-world adoption. It also invites community feedback and describes an upcoming webinar.

### Source excerpt

Introduction This is an update on our experimental project called Declarative Gradle. We have just released a new Early Access Preview (EAP) that incrementally improves support for new datatypes in the Declarative Configuration Language (DCL) and makes it possible for simple real-world projects to try Declarative Gradle. Declarative Gradle is part of our vision to deliver an elegant and extensible declarative build language that allows developers to describe any kind of software in a clear and understandable way. We think it will offer a fundamental advancement in the Gradle user experience and tooling capabilities for software developers. Our first EAP release in July 2024 introduced a configuration model called Software Types, described a new configuration language, and demonstrated the potential for tooling improvements and better IDE support. Our second EAP release in November 2024 added support for the official Android Gradle Plugin and provided starter projects using DCL via gradle init. This blog post provides an update on the project's progress. We'll cover new language features in the Declarative Gradle configuration language (DCL), improved support for testing, and lessons learned from adopting Declarative Gradle in one of our own projects. We'll also explain how you can provide feedback and help shape what we build next. Declarative Gradle is still in an experimental stage and is not ready for production use. We are providing a third early access preview to gather additional feedback from the community. We invite you to try out the samples and to let us know what you think. If you would like to learn more, we're holding a webinar on April 24, 2025. Support for testing For projects using Java or Kotlin, the prototype plugins have been updated to support simple testing with common test frameworks like JUnit - no complex build definitions required. These prototype plugins implement Software Types, which wrap existing plugins such as the Java Plugin and Kotli

## Recent improvements to the Maestro console

DevFeed: [Recent improvements to the Maestro console](<https://devfeed.tech/articles/recent-improvements-to-the-maestro-console-22921.md>)

Original publisher: [Read original article](<https://maestro.dev/blog/recent-improvements-to-robin>)

Author: Dan Caseley

Published: 2024-12-19T08:00:00Z

Content type: release

Language: en

Sources: [mobile.dev - Medium](<https://devfeed.tech/sources/mobile-dev-medium.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Playback](<https://devfeed.tech/topics/playback.md>), [Resilience](<https://devfeed.tech/topics/resilience.md>)

Tags: [flaky](<https://devfeed.tech/tags/flaky.md>), [improvements](<https://devfeed.tech/tags/improvements.md>), [junit](<https://devfeed.tech/tags/junit.md>), [maestro](<https://devfeed.tech/tags/maestro.md>), [playback](<https://devfeed.tech/tags/playback.md>), [resilience](<https://devfeed.tech/tags/resilience.md>), [screenshots](<https://devfeed.tech/tags/screenshots.md>), [storage](<https://devfeed.tech/tags/storage.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

Maestro describes recent improvements to its console, including clearer playback steps, inline videos, flow run history, and fixes for JUnit reporting, video recording, and resilience when uploading screenshots and videos.

### Source excerpt

Howdy, testers! We're excited to share a quick update on changes we've made to the Maestro console over the last few weeks. There's a bunch you'll have noticed already, but to m...

## Selectively running Android UI tests

DevFeed: [Selectively running Android UI tests](<https://devfeed.tech/articles/selectively-running-android-ui-tests-25843.md>)

Original publisher: [Read original article](<https://segunfamisa.com/posts/selectively-run-android-ui-tests>)

Author: Segun Famisa

Published: 2024-12-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Segun Famisa](<https://devfeed.tech/sources/segun-famisa.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Instrumentation](<https://devfeed.tech/topics/instrumentation.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [adb](<https://devfeed.tech/tags/adb.md>), [android](<https://devfeed.tech/tags/android.md>), [ci](<https://devfeed.tech/tags/ci.md>), [flag](<https://devfeed.tech/tags/flag.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [junit](<https://devfeed.tech/tags/junit.md>), [property](<https://devfeed.tech/tags/property.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [test-lab](<https://devfeed.tech/tags/test-lab.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This tutorial explains how to selectively run additional checks in Android UI tests. It uses a custom annotation and AndroidJUnitRunner filters to target specific tests, then passes arguments through adb or Gradle so the checks can be enabled only under chosen conditions, such as CI runs.

### Source excerpt

Intro This is really a note for my future self. Recently, I had a situation where I wanted to perform some extra checks after a test has been run. These additional checks are done after each test is run via a Junit rule SpecialRule which is applied to a test suite. For the purpose of illustration, let's say our SpecialRule looks like this: class SpecialRule : TestRule { override fun apply(statement: Statement, desc: Description): Statement { return object : Statement() { override fun evaluate() { try { // Run the test. statement.evaluate() } finally { // Perform extra checks after the test. Log.d("SpecialRule", "performing extra checks") } } } } } However, we were concerned about the run duration of the tests being extended significantly by the extra checks, so we wanted a bit more control. That led to some constraints. We wanted to: be able to selectively perform those checks on specific tests perform those checks only under certain conditions. Constraint #1 - Selectively perform additional checks on specific tests The immediate approach that came to mind was to use a custom annotation - @SpecialTest, and then somehow find a way to target the tests that are annotated with this. Luckily, the AndroidJunitRunner provides various filters to target specific annotations. For example, to run all the tests annotated with @SpecialTest , we will use something like: adb shell am instrument -w -e annotation com.mypackage.SpecialTest com.android.foo/androidx.test.runner.AndroidJUnitRunner If you use Flank to run your tests on Firebase Test Lab, then you can use: --test-targets: "annotation com.mypackage.SpecialTest" Now that we can selectively target the tests, we need to extend our test rule to only perform these checks if the test is annotated with @SpecialTest annotation. Our SpecialRule then becomes something like: class SpecialRule : TestRule { override fun apply(statement: Statement, desc: Description): Statement { return object : Statement() { override fun evaluate() { t

## Coroutine Testing

DevFeed: [Coroutine Testing](<https://devfeed.tech/articles/coroutine-testing-25239.md>)

Original publisher: [Read original article](<https://kau.sh/blog/coroutine-testing/>)

Author: Kaushik Gopal

Published: 2024-08-25T07:00:45Z

Content type: tutorial

Language: en

Sources: [Kaushik Gopal's Site](<https://devfeed.tech/sources/kaushik-gopal-s-site.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [LineageOS](<https://devfeed.tech/topics/lineageos.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutine-testing](<https://devfeed.tech/tags/coroutine-testing.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [flaky](<https://devfeed.tech/tags/flaky.md>), [junit](<https://devfeed.tech/tags/junit.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [migration-guide](<https://devfeed.tech/tags/migration-guide.md>), [testing](<https://devfeed.tech/tags/testing.md>), [time](<https://devfeed.tech/tags/time.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>)

### AI overview

A tutorial series on testing Kotlin coroutines in Android applications. It discusses changes to Kotlin testing APIs, unreliable virtual-time advancement, flaky tests, dispatchers, background scopes, and controlling time.

### Source excerpt

When the #androiddevs transitioned from Rx to coroutines the topic of testing didn't get as much attention in this new world of concurrency. It didn't help that there was a seismic change in Kotlin's testing apis with 1.6.0. A whole bunch of online resources and tutorials are now defunct courtesy this change.1 My journey in the matter started because I simply couldn't understand why test apis like advanceTimeBy wouldn't work reliably for me. The name made sense... but my time wasn't being advanced in any meaningful way. Then there's the issue of flaky tests. Here's an example: flaky test code on github Run each test individually and it will pass; run them together as one test suite and test2 alone will fail. test1 passes but it takes a full 3s to run the test. If I have 300 of these in my app, are my tests going to take 15 minutes to run? I needed to understand many core concepts in order to confidently explain all the above phenomena. I'd like to share my learnings from going down the rabbit hole, in this series of posts: series This is part of a series of posts on Coroutine Testing: <- Picking the right Dispatcher Never ending tests & backgroundscope Controlling time Helpful @Junit TestRule extension (coming soon) Full USF example for Android (coming soon) If you're looking for the most current and useful resources on coroutine testing today: Untangling Coroutine Testing - Marton Braun jetbrains official docs developer.android.com docs 1.6.0 Coroutines test migration guide ↩︎

## The Testing Pyramid

DevFeed: [The Testing Pyramid](<https://devfeed.tech/articles/the-testing-pyramid-17751.md>)

Original publisher: [Read original article](<https://blog.amigoscode.com/p/the-testing-pyramid>)

Author: Nelson Djalo

Published: 2024-08-05T16:01:01Z

Content type: tutorial

Language: en

Sources: [Amigoscode Newsletter](<https://devfeed.tech/sources/amigoscode-newsletter.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Java](<https://devfeed.tech/topics/java.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>), [Development](<https://devfeed.tech/topics/development.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [development](<https://devfeed.tech/tags/development.md>), [java](<https://devfeed.tech/tags/java.md>), [junit](<https://devfeed.tech/tags/junit.md>), [selenium](<https://devfeed.tech/tags/selenium.md>), [test-automation](<https://devfeed.tech/tags/test-automation.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A guide to the testing pyramid for Java applications, explaining the roles of unit, integration, end-to-end, and UI tests. It also introduces Java testing frameworks including JUnit, TestNG, and Selenium.

### Source excerpt

Layered Testing for Robust Software Development

## How We Handle Flaky Tests in Gradle

DevFeed: [How We Handle Flaky Tests in Gradle](<https://devfeed.tech/articles/how-we-handle-flaky-tests-in-gradle-24645.md>)

Original publisher: [Read original article](<https://blog.gradle.org/how-we-handle-flaky-tests-in-gradle>)

Author: Bo Zhang

Published: 2022-11-03T02:00:00Z

Content type: article

Language: en

Sources: [The Gradle Blog](<https://devfeed.tech/sources/the-gradle-blog.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [ci](<https://devfeed.tech/topics/ci.md>), [code productivity](<https://devfeed.tech/topics/code-productivity.md>), [superProductivity](<https://devfeed.tech/topics/superproductivity.md>)

Tags: [automated](<https://devfeed.tech/tags/automated.md>), [bazel](<https://devfeed.tech/tags/bazel.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [build](<https://devfeed.tech/tags/build.md>), [ci](<https://devfeed.tech/tags/ci.md>), [flaky](<https://devfeed.tech/tags/flaky.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [junit](<https://devfeed.tech/tags/junit.md>), [retry](<https://devfeed.tech/tags/retry.md>), [teamcity](<https://devfeed.tech/tags/teamcity.md>), [techniques](<https://devfeed.tech/tags/techniques.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [tools](<https://devfeed.tech/tags/tools.md>)

### AI overview

This article explains how the Gradle team manages flaky automated tests. It covers retrying failed tests, automatically identifying flaky failures in CI, using dashboards and analytics to troubleshoot trends, and quarantining tests that are too unreliable. It also mentions Gradle's Test Retry Gradle plugin and alternatives such as Maven Surefire Plugin, JUnit Pioneer, and Bazel test rules.

### Source excerpt

Test flakiness is one of the main challenges of automated testing. Even though Gradle's focus is increasing developer productivity, the development of Gradle itself suffers from flaky automated tests. This blog explains some best practices when developing Gradle, which have proved effective over the years we fight with flaky tests. The Story Like in many other projects, every commit of Gradle must pass tens of thousands of automated tests. Any tiny flakiness may cause developer productivity loss. When I joined Gradle 5 years ago, the CI was full of flaky test failures - people would rerun a build, again and again, hoping to be lucky enough to get a green build. Later, we started a dedicated developer productivity team to deal with all the flakiness on CI, especially test flakiness. Here's how we do it step by step. Retry Failed Tests When a test fails, how do we determine if it's flaky or not? The easiest way is obviously retrying the failed test immediately: if the second run succeeds, the failed test is flaky. As a rule of thumb, by simply rerunning the failed test one more time, the test failures due to flakiness can be reduced by 90%. Many CI systems can recognize such flaky tests and mark the build as green automatically: In this example, the first run fails because of a network error, but the rerun succeeds. TeamCity recognizes this situation and "mutes" the test failure. If the build is connected to a Gradle Enterprise instance and that build has a published Build Scan, you can see the flaky tests in the test dashboard: In Gradle, we automatically retry the failed test classes with the Test Retry Gradle plugin. Please consult the documentation for how to adopt it in your build. Other Techniques to Retry Failed Tests If you are not using Gradle, that's okay. There are many alternatives that provide similar functionalities: Maven Surefire Plugin - Rerun failing tests JUnit Pioneer - Retrying Failing Tests Bazel flaky attribute in test rules All the tools above

## How to Integration Test Stored Procedures with jOOQ

DevFeed: [How to Integration Test Stored Procedures with jOOQ](<https://devfeed.tech/articles/how-to-integration-test-stored-procedures-with-jooq-28942.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-integration-test-stored-procedures-with-jooq/>)

Author: lukaseder

Published: 2022-08-22T12:36:00Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Database](<https://devfeed.tech/topics/database.md>), [Testcontainers](<https://devfeed.tech/topics/testcontainers.md>), [Java](<https://devfeed.tech/topics/java.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [database](<https://devfeed.tech/tags/database.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [integration-test](<https://devfeed.tech/tags/integration-test.md>), [integration-testing](<https://devfeed.tech/tags/integration-testing.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [junit](<https://devfeed.tech/tags/junit.md>), [maven](<https://devfeed.tech/tags/maven.md>), [stored-procedures](<https://devfeed.tech/tags/stored-procedures.md>), [testcontainers](<https://devfeed.tech/tags/testcontainers.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>)

### AI overview

This tutorial explains how to integration-test database stored procedures and functions with Java, jOOQ, Testcontainers, and JUnit. It shows how to run PostgreSQL in Testcontainers, generate jOOQ classes for stored procedures, and reuse Java test infrastructure instead of manually binding to procedures through JDBC.

### Source excerpt

When you write stored procedures and functions in your database, you want to ensure their correctness, just like with your Java code. In Java, this is done with unit tests, typically with JUnit. For example, if you have the following code in Java: Then, you might write a test like this: But how do we ... Continue reading How to Integration Test Stored Procedures with jOOQ ->

## Migrating to the new coroutines 1.6 test APIs

DevFeed: [Migrating to the new coroutines 1.6 test APIs](<https://devfeed.tech/articles/migrating-to-the-new-coroutines-1-6-test-apis-27041.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/migrating-to-the-new-coroutines-1-6-test-apis-b99f7fc47774>)

Author: Márton Braun

Published: 2022-06-29T20:00:00Z

Content type: tutorial

Language: en

Sources: [zsmb.co](<https://devfeed.tech/sources/zsmb-co.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [migration](<https://devfeed.tech/topics/migration.md>), [unit tests](<https://devfeed.tech/topics/unit-tests.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [junit](<https://devfeed.tech/tags/junit.md>), [migration](<https://devfeed.tech/tags/migration.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

This tutorial explains how to migrate Android projects from deprecated coroutines 1.6 testing APIs to the new APIs. It covers using runTest, handling the main thread in unit tests, and testing Flow collection.

### Source excerpt

See the steps we took to migrate our samples to the new APIs, and then get started on migrating your own project!

## Our Android testing process

DevFeed: [Our Android testing process](<https://devfeed.tech/articles/our-android-testing-process-24579.md>)

Original publisher: [Read original article](<https://medium.com/headspace-engineering/our-android-testing-process-e055f1c7e15c?source=rss-3da90e297190------2>)

Author: Headspace

Published: 2022-06-22T05:16:52Z

Content type: article

Language: en

Sources: [Stories by Headspace on Medium](<https://devfeed.tech/sources/stories-by-headspace-on-medium.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>), [Mocking](<https://devfeed.tech/topics/mocking.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-testing](<https://devfeed.tech/tags/android-testing.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [junit](<https://devfeed.tech/tags/junit.md>), [mental-health](<https://devfeed.tech/tags/mental-health.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [mobile-test-automation](<https://devfeed.tech/tags/mobile-test-automation.md>), [mocking](<https://devfeed.tech/tags/mocking.md>), [quality-assurance](<https://devfeed.tech/tags/quality-assurance.md>), [test-lab](<https://devfeed.tech/tags/test-lab.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

Headspace describes its Android testing strategy after rewriting its app, including unit-test coverage standards, selective end-to-end testing, mocking, dependency injection, Robolectric, and Firebase Test Lab.

### Source excerpt

Our testing strategy, how we integrate it into our development workflow, and what the future holds for testing at Headspace. By John Qualls, Senior Software Engineer, Greg Rami, Principal Software Engineer, and Anton Gerasimenko, Software Engineer Introduction When we took on the daunting task of rewriting our entire app at the end of 2019, one of our key focus areas was testability. At the time, we had less than 20% of our code covered by unit tests -- no integration or end-to-end (E2E) tests -- and adding any tests to the code base was a big effort. From the beginning, we agreed on the standard of at least 80% unit test coverage on all Pull Requests (PRs), E2E tests for critical flows, and an architecture that was focused on testability. The result is a more robust codebase. Today, we're able to capture critical bugs via our tests suite coverage before they hit our users and, very importantly, it's now trivial, and very fast, to add new tests. Let's detail our testing strategy, how we integrate it into our development workflow, and what the future holds for testing at Headspace. Testing Strategy Shortly after the rewrite, we had hundreds of unit tests and around twenty E2E tests. We wanted to optimize the number of E2E tests that we do to only certain use cases where it makes sense to take on the additional time and costs in exchange for the reduced risk. Test selection pyramid for cost and speedUnit Tests Our unit tests are straightforward. They test a very small unit of code by relying on JUnit 5 and different layers of mocking: MockK to mock all the dependencies that are unrelated to the current test. This is made easier by using good architecture principles such as Single Responsibility Principle (SRP) and Dependency Injection (DI) We introduced a Java Faker library, that provides "fakes" for primitive values that do not need to have a specific value Similarly, we have our own "model Fakers" that provide domain objects. That way when the underlying classes chang

## Slow unit tests: objects mocking

DevFeed: [Slow unit tests: objects mocking](<https://devfeed.tech/articles/slow-unit-tests-objects-mocking-26139.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2022/06/03/slow-unit-tests-part-1-objects-mocking.html>)

Author: Vadzimv Dev Blog

Published: 2022-06-03T09:00:00Z

Content type: article

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Mocking](<https://devfeed.tech/topics/mocking.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>)

Tags: [junit](<https://devfeed.tech/tags/junit.md>), [mocking](<https://devfeed.tech/tags/mocking.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

This article measures factors that affect unit-test execution time, focusing on object mocking. It compares a baseline with real objects, manually written test doubles, and mocking libraries such as Mockito and Mockk. In the reported measurements, Mockito significantly increased execution time when creating the first mock, while repeated mocks and behavior verification had little additional cost.

### Source excerpt

What does make unit tests slow? Is it objects mocking?

## Leveraging Kotlin for Tests

DevFeed: [Leveraging Kotlin for Tests](<https://devfeed.tech/articles/leveraging-kotlin-for-tests-25968.md>)

Original publisher: [Read original article](<https://jossiwolf.medium.com/leveraging-kotlin-for-tests-311bfd8335ee?source=rss-8efc0359e234------2>)

Author: Jossi Wolf

Published: 2021-12-01T15:00:03Z

Content type: tutorial

Language: en

Sources: [Stories by Jossi Wolf on Medium](<https://devfeed.tech/sources/stories-by-jossi-wolf-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Behavior-driven development](<https://devfeed.tech/topics/bdd.md>), [Cucumber](<https://devfeed.tech/topics/cucumber.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bdd](<https://devfeed.tech/tags/bdd.md>), [given-when-then](<https://devfeed.tech/tags/given-when-then.md>), [junit](<https://devfeed.tech/tags/junit.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This article explains how Kotlin language features and naming patterns can improve test readability. It covers the Given/When/Then pattern, meaningful test names, and using Kotlin backtick function names to make tests clearer.

### Source excerpt

Writing tests can be an important part of developing applications. Whether unit tests, integration tests or others, Kotlin's language features and clever naming patterns can help us increase the readability of tests. The patterns suggested here aren't new or innovative; rather they are more modern adaptions of well-established practices. I learned about these adaptions from my lovely colleague Volodymyr Galandzij who did fantastic work in setting up the testing framework in a codebase we worked on together. Given/When/Then You may have heard of the Given/When/Then pattern -- also known as the Cucumber/Gherkin syntax -- if you have written tests before, or you might even recognize it from Jira tickets. Originally introduced as a part of BDD (Behavior Driven Development), similar patterns like the Four-Phase Test (you'll see some similarities to JUnit here) have existed for a good amount of time. Martin Fowler gives a good small summary of all of this in his article about the Given/When/Then pattern: The essential idea is to break down writing a scenario (or test) into three sections:The given part describes the state of the world before you begin the behavior you're specifying in this scenario. You can think of it as the pre-conditions to the test.The when section is that behavior that you're specifying.Finally the then section describes the changes you expect due to the specified behavior. Regardless of the testing philosophy you follow, there's a good chance that the Given/When/Then pattern can be applied to your tests. But how does this look in practice? I heard that adding a featured image helps increase clicks. Does it work? Who knows! If it does, thank you, Sigmund on Unsplash!Test Names I argue that test names are one of the most important parts of writing good tests. The name of the test should help you understand what the test does. One quality of a good test is that it fails when the actual outcome is different from the expected outcome. When a test fails, it

## Introducing JfrUnit 1.0.0.Alpha1

DevFeed: [Introducing JfrUnit 1.0.0.Alpha1](<https://devfeed.tech/articles/introducing-jfrunit-1-0-0-alpha1-18835.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/introducing-jfrunit-1-0-0-alpha1/>)

Published: 2021-08-04T17:10:00Z

Content type: release

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [JDK Flight Recorder](<https://devfeed.tech/topics/jdk-flight-recorder.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Java](<https://devfeed.tech/topics/java.md>), [Quarkus](<https://devfeed.tech/topics/quarkus.md>), [Groovy](<https://devfeed.tech/topics/groovy.md>), [Maven](<https://devfeed.tech/topics/maven.md>)

Tags: [groovy](<https://devfeed.tech/tags/groovy.md>), [java](<https://devfeed.tech/tags/java.md>), [jdk-flight-recorder](<https://devfeed.tech/tags/jdk-flight-recorder.md>), [junit](<https://devfeed.tech/tags/junit.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [maven-central](<https://devfeed.tech/tags/maven-central.md>), [quarkus](<https://devfeed.tech/tags/quarkus.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

### AI overview

The article announces JfrUnit 1.0.0.Alpha1, a JUnit extension for asserting JDK Flight Recorder events in unit tests. It describes uses including validating custom events, detecting potential performance regressions, and white-box testing with JMC Agent, and outlines setup and usage with Maven, Quarkus, Groovy, and Spock examples.

### Source excerpt

Table of Contents Getting Started With JfrUnit Groovier Tests With Spock Outlook Unit testing, for performance It's with great pleasure that I'm announcing the first official release of JfrUnit today! JfrUnit is an extension to JUnit which allows you to assert JDK Flight Recorder events in your unit tests. This capability opens up a number of interesting use cases in the field of testing JVM-based applications: You can use JfrUnit to ensure your application produces the custom JFR events you expect it to emit You can use JfrUnit to identify potential performance regressions of your application by means of tracking JFR events e.g. for garbage collection, memory allocation and network I/O You can use JfrUnit together with JMC Agent for whitebox tests of your application, ensuring specific methods are invoked with the expected parameters and return values

## JUnit Coroutines Runner

DevFeed: [JUnit Coroutines Runner](<https://devfeed.tech/articles/junit-coroutines-runner-38650.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2021_07_10_junit_coroutines_runner/>)

Published: 2021-07-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [coroutines](<https://devfeed.tech/tags/coroutines.md>), [junit](<https://devfeed.tech/tags/junit.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-compiler](<https://devfeed.tech/tags/kotlin-compiler.md>), [runner](<https://devfeed.tech/tags/runner.md>), [suspend-function](<https://devfeed.tech/tags/suspend-function.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This tutorial explores how to reduce repeated runBlockingTest setup in Kotlin coroutine tests by creating a custom JUnit rule. It explains the resulting suspend-function and bytecode validation issues and investigates their root cause.

### Source excerpt

Introduction Recently while writing tests for kotlin code with coroutines I found one annoying thing: almost all the tests start with runBlockingTest. Typing the same stuff repeatedly is something we can't accept! So, I decided to think about how to improve this. Disclaimer. Yes, this is an example of how to spend few hours to optimize some task that requires you 2 seconds to complete each time. Even on a scale of hundreds of usages such optimization most likely won't pay your time back. But it is always fun to do some weird things even if you understand that they are stupid.

## Migrating from Burst to TestParameterInjector

DevFeed: [Migrating from Burst to TestParameterInjector](<https://devfeed.tech/articles/migrating-from-burst-to-testparameterinjector-20888.md>)

Original publisher: [Read original article](<https://code.cash.app/migrating-from-burst-to-testparameterinjector>)

Author: Jake Wharton

Published: 2021-04-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>)

Topics: [migration](<https://devfeed.tech/topics/migration.md>), [Java](<https://devfeed.tech/topics/java.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [java](<https://devfeed.tech/tags/java.md>), [junit](<https://devfeed.tech/tags/junit.md>), [migration](<https://devfeed.tech/tags/migration.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [switching](<https://devfeed.tech/tags/switching.md>), [test](<https://devfeed.tech/tags/test.md>)

### AI overview

This article explains why Cash App is migrating from Square's Burst library to Google's TestParameterInjector for JUnit 4 tests. It describes the deprecation of Burst, the straightforward migration process, and a limitation for Android instrumentation tests: TestParameterInjector currently supports API 26 and newer.

### Source excerpt

This post was published externally on Cash App Code Blog. Read it at https://code.cash.app/migrating-from-burst-to-testparameterinjector.

## Unit Tests and Concurrency

DevFeed: [Unit Tests and Concurrency](<https://devfeed.tech/articles/unit-tests-and-concurrency-25874.md>)

Original publisher: [Read original article](<http://lordraydenmk.github.io//2021/unit-tests-and-concurrency/>)

Author: Stojan Anastasov

Published: 2021-01-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stojan Anastasov's blog](<https://devfeed.tech/sources/stojan-anastasov-s-blog.md>)

Topics: [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Android](<https://devfeed.tech/topics/android.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [junit](<https://devfeed.tech/tags/junit.md>), [observeon](<https://devfeed.tech/tags/observeon.md>), [recyclerview](<https://devfeed.tech/tags/recyclerview.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [scheduler](<https://devfeed.tech/tags/scheduler.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [trampoline](<https://devfeed.tech/tags/trampoline.md>)

### AI overview

This tutorial explains how replacing RxJava schedulers with a single test scheduler can hide concurrency problems. It presents an Android example involving concurrent API calls and discusses refactoring the RxJava chain to update the UI as results become available.

### Source excerpt

Once Retrofit added RxJava support, RxJava became my go-to concurrency framework for writing Android apps. One of the great things about RxJava is the excellent testing support. It includes TestObserver, TestScheduler, RxJavaPlugins so you can switch your schedulers in tests. A common approach in testing RxJava code is using a JUnit rule that replaces the Scheduler pools with Schedulers.trampoline() before tests are run and resets them to the original thread pools after the tests. This makes the whole Observable chain runs on a single thread, the same thread the test runs on, which means we can write assertions without worrying about concurrency. However the production code usually is not single threaded. IO operations are done on the IO thread pool, views are updated on the main thread and everything else happens on the computation pool. By using different schedulers in the tests and using a different strategy (single threaded) we make those unit tests useless in catching concurrency issues. A real world scenario I was working on a side project. The screen consists of a RecyclerView displaying a list of elements. To get the elements I need to perform two different API calls. The first API call returns a list with N elements, then for each item in the list I need to perform the second call. After combining the data I send it to the UI for displaying. Using RxJava this looks like: // Emits Loading then Content or Problem private fun requestData(): Observable<ViewState> = service.firstApiCall() .observeOn(Schedulers.computation()) .map { it.message } .flatMap(this::secondApiCall) .map<ViewState> { ViewState.Content(it) } .startWith(Single.just(ViewState.Loading)) .onErrorReturn { ViewState.Problem } .toObservable() // Concurrently executes secondApiCall for each element in list. // Transforms the result to ViewEntity, combines everything in a list private fun secondApiCall(list: List<String>): Single<List<ViewEntity>> = Observable.fromIterable(list) .concatMapEager {

## Композитная сборка как альтернатива buildSrc в Gradle

DevFeed: [Композитная сборка как альтернатива buildSrc в Gradle](<https://devfeed.tech/articles/buildsrc-gradle-23618.md>)

Original publisher: [Read original article](<https://habr.com/ru/companies/badoo/articles/514094/>)

Author: ChPr (Badoo)

Published: 2020-08-06T12:04:36Z

Content type: tutorial

Language: ru

Sources: [Badoo EN](<https://devfeed.tech/sources/badoo-en.md>), [Badoo RU](<https://devfeed.tech/sources/badoo-ru.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [ide](<https://devfeed.tech/topics/ide.md>), [Groovy](<https://devfeed.tech/topics/groovy.md>), [Stack Overflow](<https://devfeed.tech/topics/stackoverflow.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [groovy](<https://devfeed.tech/tags/groovy.md>), [ide](<https://devfeed.tech/tags/ide.md>), [junit](<https://devfeed.tech/tags/junit.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

### AI overview

This article explains how Gradle composite builds can replace buildSrc for shared plugins, tasks, and configuration. It describes buildSrc's cache invalidation drawback and discusses the author's experience with modular Android projects, including migration challenges and IDE support.

### Source excerpt

В Gradle -- системе автоматической сборки -- подход с buildSrc уже успел стать стандартом для реализации собственных плагинов и задач, а также создания общих конфигураций, например списков зависимостей и версий. Но у него есть существенный недостаток: при изменении buildSrc кеш сборки становится недействительным. При этом Gradle предоставляет альтернативный подход -- композитные сборки, лишённые этого недостатка. В этой статье я расскажу, как использовать композитную сборку вместо buildSrc и с какими сложностями можно столкнуться при миграции. Читать дальше ->

## Instrumenting Firebase Test Lab

DevFeed: [Instrumenting Firebase Test Lab](<https://devfeed.tech/articles/instrumenting-firebase-test-lab-15695.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/instrumenting-firebase-test-lab>)

Author: P-Y Ricau

Published: 2020-01-15T20:00:00Z

Content type: tutorial

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Firebase](<https://devfeed.tech/topics/firebase.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Instrumentation](<https://devfeed.tech/topics/instrumentation.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [automated](<https://devfeed.tech/tags/automated.md>), [ci](<https://devfeed.tech/tags/ci.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [exception](<https://devfeed.tech/tags/exception.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [java](<https://devfeed.tech/tags/java.md>), [junit](<https://devfeed.tech/tags/junit.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

This tutorial describes utilities Square built around Firebase Test Lab for Android instrumentation testing. It explains how uncaught exceptions on non-instrumentation threads can cause unhelpful test failures, and presents a JUnit run listener that reports those exceptions before the process terminates. It also discusses runner arguments and adding test names to Firebase Test Lab videos.

### Source excerpt

Automated testing with Firebase Test Lab at Square

## Decreasing Applitools Android Boilerplate with Kotlin and JUnit

DevFeed: [Decreasing Applitools Android Boilerplate with Kotlin and JUnit](<https://devfeed.tech/articles/decreasing-applitools-android-boilerplate-with-kotlin-and-junit-20360.md>)

Original publisher: [Read original article](<https://engineering.ziffmedia.com/decreasing-applitools-android-boilerplate-with-kotlin-and-junit-46c61b5e10ce?source=rss----d6bb34696ef5---4>)

Author: Ben Boral

Published: 2019-11-15T17:46:53Z

Content type: tutorial

Language: en

Sources: [RetailMeNot](<https://devfeed.tech/sources/retailmenot.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [SDKs](<https://devfeed.tech/topics/sdks.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [applitools](<https://devfeed.tech/tags/applitools.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [code](<https://devfeed.tech/tags/code.md>), [espresso](<https://devfeed.tech/tags/espresso.md>), [junit](<https://devfeed.tech/tags/junit.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This tutorial shows how to reduce boilerplate in Applitools visual regression tests for Android by using Kotlin and JUnit. It describes encapsulating repeated setup and cleanup in a helper and JUnit rule so the test code is more concise and easier to maintain.

### Source excerpt

Background At RetailMeNot, we are excited by the promise of automating visual regression tests with Applitools. In this post, I'll show how to make writing Applitools tests for Android a cinch. We'll start with the official integration guide recommendations and then use JUnit and Kotlin features to make our tests concise and maintainable. This post assumes the reader is familiar with Applitools visual testing. Our Starting Point: lots of boilerplate code Applitools's official integration guide for Espresso recommends a test that looks approximately like the below code block. I'll explain each line of this snippet later in the article. But for now, notice the excessive setup code and cleanup code that's getting in the way of our actual test code. This boilerplate would need to be copied for every test. https://medium.com/media/c042e70c7b2c423afde35fc101bc6e31/hrefThe Solution: a much simpler test We can reduce the boilerplate to achieve the following test. By stripping away the setup and cleanup as much as possible, we are left with the kernel of the test. In doing so, the purpose of the test is much easier to comprehend. ApplitoolsHelper, on line 2, has encapsulated the setup and cleanup. This will make long-term maintenance easier, because when the Applitools APIs change, we'll only need to update them in the one location. https://medium.com/media/de1efe74c1f65542057b061fd3b4ad35/hrefThe Required Steps to Run an Applitools Test Before diving into the helper code that enables our concise test, let's review the steps involved in an Applitools visual test: val eyes = Eyes() eyes.apiKey = "YOUR_API_KEY" eyes.appName = "YOUR_APP_NAME" We must initialize the Applitools SDK and set our API key and app name. This is going to be the same for every test in our suite. We will extract this code into a JUnit test rule. eyes.open("TEST_NAME"); This starts the Applitools test session. This must be called with a unique test name for each test. We will use a lambda expression, expl

## Handling Swallowed Exceptions in RxJava 2 Tests

DevFeed: [Handling Swallowed Exceptions in RxJava 2 Tests](<https://devfeed.tech/articles/chasing-swallowed-exceptions-15576.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/chasing-swallowed-exceptions>)

Author: Ralf Wondratschek

Published: 2019-08-13T19:00:00Z

Content type: tutorial

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [engineering](<https://devfeed.tech/tags/engineering.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [junit](<https://devfeed.tech/tags/junit.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

The article explains how exceptions in RxJava 2 streams can reach the JVM's uncaught exception handling path without causing a test to fail. It traces the behavior through RxJava, thread, and global uncaught exception handlers.

### Source excerpt

Handling uncaught errors and crashes in testing

[Next page](<https://devfeed.tech/tags/junit.md?cursor=WyIyMDE5LTA4LTEzVDE5OjAwOjAwKzAwOjAwIiwgIjAwYWZlYmQyLTQ4OTktNDIyMC1iY2UzLTE3OTRmMGM3NzMyNiJd>)