{"id":296,"date":"2024-12-06T21:52:08","date_gmt":"2024-12-06T21:52:08","guid":{"rendered":"https:\/\/www.mitango.app\/?post_type=definition&#038;p=296"},"modified":"2024-12-06T22:45:38","modified_gmt":"2024-12-06T22:45:38","slug":"aaa-framework","status":"publish","type":"definition","link":"https:\/\/www.mitango.app\/fr\/definition\/aaa-framework\/","title":{"rendered":"AAA Framework"},"content":{"rendered":"<p>AAA framework is a way to make your tests and acceptance criteria easier to write but also to make it easier to check for their correctness.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">AAA quality<\/h2>\n\n\n\n<p>Any acceptance criteria or test following the AAA framework will be divided into three steps.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"809\" src=\"https:\/\/www.mitango.app\/app\/uploads\/2024\/12\/0fc9f535-7a05-4595-b7e1-c2dc32aa2e52_6102x4821-1024x809.jpg\" alt=\"\" class=\"wp-image-290\" srcset=\"https:\/\/www.mitango.app\/app\/uploads\/2024\/12\/0fc9f535-7a05-4595-b7e1-c2dc32aa2e52_6102x4821-1024x809.jpg 1024w, https:\/\/www.mitango.app\/app\/uploads\/2024\/12\/0fc9f535-7a05-4595-b7e1-c2dc32aa2e52_6102x4821-300x237.jpg 300w, https:\/\/www.mitango.app\/app\/uploads\/2024\/12\/0fc9f535-7a05-4595-b7e1-c2dc32aa2e52_6102x4821-768x607.jpg 768w, https:\/\/www.mitango.app\/app\/uploads\/2024\/12\/0fc9f535-7a05-4595-b7e1-c2dc32aa2e52_6102x4821-15x12.jpg 15w, https:\/\/www.mitango.app\/app\/uploads\/2024\/12\/0fc9f535-7a05-4595-b7e1-c2dc32aa2e52_6102x4821.jpg 1456w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Arrange the initial state<\/h3>\n\n\n\n<p>The first step is to create the initial state of the application before testing.<\/p>\n\n\n\n<p>The idea behind this approach is to list everything that is necessary to make sure that the scenario described will be producing the same result if it is executed multiple times.<\/p>\n\n\n\n<p>This is particularly useful as reproducing the result consistently is key when automating a test to have consistent results and not having the CI randomly produce different outputs on each run.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Defining logic to test<\/h3>\n\n\n\n<p>Once the initial state is defined, the next step is to define the logic to be tested, and this is done in the second step, also called act.<\/p>\n\n\n\n<p>For that the logic that has to be executed will be detailed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Asserting final state<\/h3>\n\n\n\n<p>Finally, the last step involves asserting that after executing all the previous steps, the final step is the expected one.<\/p>\n\n\n\n<p>For that the last step of the AAA framework, assert, needs to describe what the final state of the application should look like.<\/p>\n\n\n\n<p>That way it will be possible to verify whether there is a mismatch between the actual output and the desired outcome.<\/p>\n\n\n\n<div class=\"wp-block-group alignfull has-base-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-e52b7025 wp-block-group-is-layout-constrained\" style=\"margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group alignwide has-tertiary-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-b23f7dc8 wp-block-group-is-layout-constrained\" style=\"border-radius:12px;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--20)\">\n<p class=\"has-text-align-center has-large-font-size\" style=\"font-style:normal;font-weight:600\">Any questions? We\u2018re here to help!<\/p>\n\n\n\n<p class=\"has-text-align-center has-medium-font-size\">If you still have questions or need further assistance, please don\u2018t hesitate to reach out to me.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-d565fcec wp-block-buttons-is-layout-flex\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/www.mitango.app\/fr\/contact-me\/\">Contactez moi<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>AAA framework is a way to make your tests and acceptance criteria easier to write but also to make it easier to check for their correctness. AAA quality Any acceptance criteria or test following the AAA framework will be divided into three steps. Arrange the initial state The first step is to create the initial [&hellip;]<\/p>","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"class_list":["post-296","definition","type-definition","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.mitango.app\/fr\/wp-json\/wp\/v2\/definition\/296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mitango.app\/fr\/wp-json\/wp\/v2\/definition"}],"about":[{"href":"https:\/\/www.mitango.app\/fr\/wp-json\/wp\/v2\/types\/definition"}],"version-history":[{"count":3,"href":"https:\/\/www.mitango.app\/fr\/wp-json\/wp\/v2\/definition\/296\/revisions"}],"predecessor-version":[{"id":301,"href":"https:\/\/www.mitango.app\/fr\/wp-json\/wp\/v2\/definition\/296\/revisions\/301"}],"wp:attachment":[{"href":"https:\/\/www.mitango.app\/fr\/wp-json\/wp\/v2\/media?parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mitango.app\/fr\/wp-json\/wp\/v2\/categories?post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}