{"id":27304421,"url":"https://github.com/sergio-sastre/multiplying_the_quality_of_unit_tests","last_synced_at":"2025-09-12T11:42:57.565Z","repository":{"id":39878229,"uuid":"370679468","full_name":"sergio-sastre/Multiplying_the_quality_of_unit_tests","owner":"sergio-sastre","description":"An Android project in Jetpack Compose to showcase how to level up our unit tests step by step with parameterized tests, property-based test \u0026 stateful tests","archived":false,"fork":false,"pushed_at":"2023-04-10T19:46:35.000Z","size":303,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-02T03:11:06.781Z","etag":null,"topics":["android","jetpack-compose","parameterized-tests","property-based-testing","testing","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergio-sastre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-25T12:07:40.000Z","updated_at":"2024-05-02T03:11:06.782Z","dependencies_parsed_at":"2023-01-17T18:45:16.718Z","dependency_job_id":null,"html_url":"https://github.com/sergio-sastre/Multiplying_the_quality_of_unit_tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergio-sastre%2FMultiplying_the_quality_of_unit_tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergio-sastre%2FMultiplying_the_quality_of_unit_tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergio-sastre%2FMultiplying_the_quality_of_unit_tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergio-sastre%2FMultiplying_the_quality_of_unit_tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergio-sastre","download_url":"https://codeload.github.com/sergio-sastre/Multiplying_the_quality_of_unit_tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248511128,"owners_count":21116357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","jetpack-compose","parameterized-tests","property-based-testing","testing","unit-testing"],"created_at":"2025-04-12T03:25:03.338Z","updated_at":"2025-04-12T03:25:03.916Z","avatar_url":"https://github.com/sergio-sastre.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"part of the blog post [**Top-notch stateful testing in Android**](https://sergiosastre.hashnode.dev/top-notch-stateful-testing-in-android) \u003c/br\u003e\n\u003ca href=\"https://androidweekly.net/issues/issue-534\"\u003e\n\u003cimg src=\"https://androidweekly.net/issues/issue-534/badge\"\u003e\n\n# Multiplying the quality of unit tests\nAn Android project to showcase how to improve our unit tests step by step:\n1. From tests *multiple assertions* to *parameterized example-based tests*,\n2. Add extra *property-based tests* to catch regression bugs that *parameterized tests* cannot.\n3. Advanced use of *property-based tests* for stateful testing: \n  verify that the state of our model is correct after performing any action on it.\n\nFor 1. \u0026 2, we test the logic behind the **strong password validator** of a [**create account**](https://github.com/sergio-sastre/Multiplying_the_quality_of_unit_tests/tree/master/passwordvalidator) screen.\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"250\" src=\"https://user-images.githubusercontent.com/6097181/169895372-f21adba4-5478-4bd4-8b9d-3676da049d4d.gif\"\u003e\n\u003c/p\u003e\n\n\nFor 3, we test that the state of a [**text editor**](https://github.com/sergio-sastre/Multiplying_the_quality_of_unit_tests/tree/master/texteditor) (i.e. displayed text \u0026 text to display upon undo/redo actions) is correct after editing, undoing and redoing in any *random order*.\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"250\" src=\"https://user-images.githubusercontent.com/6097181/181569006-db7cee16-b200-4bc2-88ba-2e6ad2441a94.gif\"\u003e\n\u003c/p\u003e\n\nYou can find the blog posts on the topic here:\n\n1) [Better unit tests with Parameterized testing](https://sergiosastre.hashnode.dev/better-unit-tests-with-parameterized-testing)\n\n2) [Writing bulletproof code with Property-Based testing](https://sergiosastre.hashnode.dev/writing-bulletproof-code-with-property-based-testing-pbt)\n\n3) [Top-notch stateful testing in Android](https://sergiosastre.hashnode.dev/top-notch-stateful-testing-in-android)\n\nAnd also the video and slides of my tech-talk \"Writing bulletproof code with Property-Based testing\" at Droidcon Lisbon 2022 (only slides) \u0026 Droidcon Berlin 2022\n\n1) [Tech-talk video Droidcon Berlin 2022](https://www.droidcon.com/2022/08/01/writing-bulletproof-code-with-property-based-testing/)\n2) [Slides Droidcon Lisbon 2022 \u0026 Droidcon Berlin 2022](https://speakerdeck.com/gio_sastre/writing-bulletproof-code-with-property-based-testing)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergio-sastre%2Fmultiplying_the_quality_of_unit_tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergio-sastre%2Fmultiplying_the_quality_of_unit_tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergio-sastre%2Fmultiplying_the_quality_of_unit_tests/lists"}