[{"data":1,"prerenderedAt":123},["ShallowReactive",2],{"term-g\u002Fgiven-when-then":3,"related-g\u002Fgiven-when-then":108},{"id":4,"title":5,"acronym":6,"body":7,"category":89,"description":90,"difficulty":91,"extension":92,"letter":93,"meta":94,"navigation":95,"path":96,"related":97,"seo":102,"sitemap":103,"stem":106,"subcategory":6,"__hash__":107},"terms\u002Fterms\u002Fg\u002Fgiven-when-then.md","Given When Then",null,{"type":8,"value":9,"toc":83},"minimark",[10,15,19,23,26,30,72,76,79],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"Given When Then is AAA's cousin from the BDD world. Given = the setup situation. When = what the user\u002Fsystem does. Then = what should happen as a result. It reads more like a user story, which is why product managers can actually understand it.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Given-When-Then is a semi-structured way to write test scenarios, originating from BDD. Given describes the initial context, When describes the action or event, Then describes the expected outcome. It maps naturally to Gherkin syntax and makes tests double as documentation.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-gherkin shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Using Gherkin\nGiven a user has 3 items in their cart\nWhen they apply coupon 'SAVE10'\nThen the total should be reduced by 10%\nAnd a success message should be displayed\n","gherkin","",[38,39,40,48,54,60,66],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,47],{},"\u002F\u002F Using Gherkin\n",[41,49,51],{"class":43,"line":50},2,[41,52,53],{},"Given a user has 3 items in their cart\n",[41,55,57],{"class":43,"line":56},3,[41,58,59],{},"When they apply coupon 'SAVE10'\n",[41,61,63],{"class":43,"line":62},4,[41,64,65],{},"Then the total should be reduced by 10%\n",[41,67,69],{"class":43,"line":68},5,[41,70,71],{},"And a success message should be displayed\n",[11,73,75],{"id":74},"when-youll-hear-this","When You'll Hear This",[16,77,78],{},"\"Write acceptance criteria in Given-When-Then so QA can convert them directly to tests.\" \u002F \"Given-When-Then scenarios become runnable Cucumber tests.\"",[80,81,82],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":50,"depth":50,"links":84},[85,86,87,88],{"id":13,"depth":50,"text":14},{"id":21,"depth":50,"text":22},{"id":28,"depth":50,"text":29},{"id":74,"depth":50,"text":75},"testing","Given When Then is AAA's cousin from the BDD world. Given = the setup situation. When = what the user\u002Fsystem does. Then = what should happen as a result.","beginner","md","g",{},true,"\u002Fterms\u002Fg\u002Fgiven-when-then",[98,99,100,101],"AAA Pattern","BDD","Behavior-Driven Development","Test Case",{"title":5,"description":90},{"changefreq":104,"priority":105},"weekly",0.7,"terms\u002Fg\u002Fgiven-when-then","0yevMDOtFFzHyMrcQotTEavHys7PeBJej8jXrSO4c3U",[109,113,117,120],{"title":98,"path":110,"acronym":111,"category":89,"difficulty":91,"description":112},"\u002Fterms\u002Fa\u002Faaa-pattern","AAA","AAA stands for Arrange, Act, Assert.",{"title":99,"path":114,"acronym":99,"category":89,"difficulty":115,"description":116},"\u002Fterms\u002Fb\u002Fbdd","intermediate","BDD is like writing your tests in plain English so your non-coder boss can also understand them.",{"title":100,"path":118,"acronym":99,"category":89,"difficulty":115,"description":119},"\u002Fterms\u002Fb\u002Fbehavior-driven-development","Behavior-Driven Development is about describing HOW your app should behave before you build it — using language that makes sense to everybody, not just cod...",{"title":101,"path":121,"acronym":6,"category":89,"difficulty":91,"description":122},"\u002Fterms\u002Ft\u002Ftest-case","A test case is one specific scenario you want to check. 'Does the login work with a correct password?' — that's a test case.",1776518284291]