---
title: "Comment by Miki Szeles on \"Clean Code Tip: AAA pattern for tests: why is it important?\" | Hashnode"
description: "Great writing Davide. 👏 Seeing testing topic here is very heartwarming for me. I hope we will see more great testing content from you. 😊 This AAA pattern is b"
url: "https://hashnode.com/posts/clean-code-tip-aaa-pattern-for-tests-why-is-it-important/62334e21bef4c71aa6f0c9ff/comment/6233604cbef4c71aa6f0cbe4"
---

[Discussion](https://hashnode.com/posts/clean-code-tip-aaa-pattern-for-tests-why-is-it-important/62334e21bef4c71aa6f0c9ff)

Comment [Clean Code Tip: AAA pattern for tests: why is it important?](https://hashnode.com/posts/clean-code-tip-aaa-pattern-for-tests-why-is-it-important/62334e21bef4c71aa6f0c9ff)

[Miki Szeles](https://hashnode.com/@mszeles)

[Mar 17, 2022](https://hashnode.com/posts/clean-code-tip-aaa-pattern-for-tests-why-is-it-important/62334e21bef4c71aa6f0c9ff/comment/6233604cbef4c71aa6f0cbe4)

Great writing Davide. 👏

Seeing testing topic here is very heartwarming for me.

I hope we will see more great testing content from you. 😊

This AAA pattern is basically the same as Given-When-Then right?

[Davide Bellone](https://hashnode.com/@davidebellone)

[Mar 18, 2022](https://hashnode.com/posts/clean-code-tip-aaa-pattern-for-tests-why-is-it-important/62334e21bef4c71aa6f0c9ff/comment/6233604cbef4c71aa6f0cbe4#reply-623439326647c71acb64141f)

Yes, indeed! They're the same thing, just with an acronym easier to remember.

Both AAA and Given-When-Then just refer to setting up preconditions, executing the main operation, and checking the result.

[Miki Szeles](https://hashnode.com/@mszeles)

[Mar 18, 2022](https://hashnode.com/posts/clean-code-tip-aaa-pattern-for-tests-why-is-it-important/62334e21bef4c71aa6f0c9ff/comment/6233604cbef4c71aa6f0cbe4#reply-62343e206647c71acb6414ca)

Exactly [Davide Bellone](https://hashnode.com/@davidebellone) 😊
