# Unit Testing Custom Lint Checks

DevFeed: [Unit Testing Custom Lint Checks](<https://devfeed.tech/articles/unit-testing-custom-lint-checks-22847.md>)

Original publisher: [Read original article](<http://androidessence.com/unit-testing-custom-lint-checks/>)

Author: Adam McNeilly

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

Content type: tutorial

Language: en

Sources: [Android Essence](<https://devfeed.tech/sources/android-essence.md>)

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

## AI overview

A tutorial on unit testing custom Android lint checks. It explains the required dependencies, test setup, mock XML or Java/Kotlin inputs, optional configuration, task execution, and assertions for successful lint results.

## Source excerpt

In our previous post we looked at writing a custom lint check to enforce usages of a custom view instead of an Android framework implementation. In this post, we'll go over how to unit test such a scenario, and take the opportunity to look at some additional options of unit testing with lint as well.