# Using Property-Based Testing to Find Password Validator Bugs

DevFeed: [Using Property-Based Testing to Find Password Validator Bugs](<https://devfeed.tech/articles/writing-bulletproof-code-with-property-based-testing-pbt-25696.md>)

Original publisher: [Read original article](<https://sergiosastre.hashnode.dev/writing-bulletproof-code-with-property-based-testing-pbt>)

Author: Sergio Sastre Florez

Published: 2021-07-07T15:19:35Z

Content type: tutorial

Language: en

Sources: [Sergio's little tech corner](<https://devfeed.tech/sources/sergio-s-little-tech-corner.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Code](<https://devfeed.tech/topics/code.md>), [passwords](<https://devfeed.tech/topics/passwords.md>), [ci](<https://devfeed.tech/topics/ci.md>)

Tags: [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [ci](<https://devfeed.tech/tags/ci.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [password](<https://devfeed.tech/tags/password.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

## AI overview

This tutorial explains how property-based testing can complement example-based and parameterised tests. Using a password validator example, it shows how tests may remain green when selected examples fail to cover an implementation error, and how broader valid inputs can expose the bug.

## Source excerpt

In the previous post, we saw how Parameterised Tests help write more focused, concise and scalable tests. However, Parameterised Tests belong to the so-called Example-Based Tests: the tests run only with the input and expected values we choose to pas...