---
title: "Discussion on \"Writing Unit Test In Flutter With Mockito\" | Hashnode"
description: "Discussion on \"Writing Unit Test In Flutter With Mockito\". In this article, we'll be writing unit test for a simple flutter application that makes use of the random joke api.\nUnit test is all about writing code to verify/validate the behavior of a function, method or class. This way, with more features being..."
url: "https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Writing Unit Test In Flutter With Mockito](https://o-ifeanyi.hashnode.dev/writing-unit-test-in-flutter-with-mockito?utm_source=hashnode&utm_medium=feed)

In this article, we'll be writing unit test for a simple flutter application that makes use of the random joke api. Unit test is all about writing code to verify/validate the behavior of a function, method or class. This way, with more features being...

Mar 22, 2021 · 6 min read · o-ifeanyi.hashnode.dev  
Updated Apr 4, 2021  
Read the article

-   [#flutter](https://hashnode.com/tag/flutter)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)
-   [#test](https://hashnode.com/tag/test)

## Written by

[Onuoha ifeanyi](https://hashnode.com/@o-ifeanyi)

@o-ifeanyi · Abuja, NG

  
[View profile](https://hashnode.com/@o-ifeanyi)

Flutter Developer

## Responses 5

Markdown supported · ⌘↵ to post

[omorubore oluwatobi](https://hashnode.com/@Edamijueda)

[Aug 17, 2022](https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f/comment/62fd0dcb0cfd6de8c7d7875a)

Thank you Ifeanyi

[Karthikeyan Jayamani](https://hashnode.com/@KarthikJKK)

[Mar 7, 2022](https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f/comment/6225d0c3c705276a2dd2fbb4)

Nice article.!!! Is there a way to write unit test for Flutter website?

[Emeka Chukwu](https://hashnode.com/@emeka_chukwu)

[Apr 9, 2021](https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f/comment/60700f68d741af6659cfa35b)

This is a good read bro

[Onuoha ifeanyi](https://hashnode.com/@o-ifeanyi)

[Apr 9, 2021](https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f/comment/60700f68d741af6659cfa35b#reply-607092d78b2b857c0bdb4efe)

Thanks man

[Catalin Pit](https://hashnode.com/@Catalinpit)

[Mar 23, 2021](https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f/comment/6059899725962412b9818092)

Good article, but could you split it into sections and add some headings?

[Onuoha ifeanyi](https://hashnode.com/@o-ifeanyi)

[Mar 23, 2021](https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f/comment/6059899725962412b9818092#reply-6059a16c5771a2129446b44a)

Thank you, I added the headings. I'm not sure how to split it into sections though.

[Samuel Adekunle](https://hashnode.com/@TechWithSam)

[Mar 22, 2021](https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f/comment/60588dc91f7b6e0b04be7793)

Nice article 👍

[Onuoha ifeanyi](https://hashnode.com/@o-ifeanyi)

[Mar 22, 2021](https://hashnode.com/posts/writing-unit-test-in-flutter-with-mockito/60585d7a63a05a21443f411f/comment/60588dc91f7b6e0b04be7793#reply-60589d3a6e30c70f6b007f73)

Thank you 🙏
