[{"data":1,"prerenderedAt":412},["ShallowReactive",2],{"docs-/docs/patterns/random-data":3},{"id":4,"title":5,"body":6,"description":403,"extension":404,"meta":405,"navigation":406,"path":408,"seo":409,"stem":410,"__hash__":411},"docs/docs/patterns/random-data.md","Random Data Generation",{"type":7,"value":8,"toc":396},"minimark",[9,13,22,68,73,81,85,276,289,293,305,337,341,348,354,357,369,373,392],[10,11,5],"h1",{"id":12},"random-data-generation",[14,15,16,17,21],"p",{},"Use ",[18,19,20],"code",{},"{{ rand:type }}"," anywhere in your Gherkin steps to generate a fresh value at runtime — no custom step code required.",[23,24,29],"pre",{"className":25,"code":26,"language":27,"meta":28,"style":28},"language-gherkin shiki shiki-themes github-light github-dark","And I store the value \"{{ rand:uuid }}\" into \"user_id\" variable\nAnd I store the value \"{{ rand:email:domain=example.com }}\" into \"user_email\" variable\nWhen I set the request body to:\n  \"\"\"\n  { \"id\": \"{{user_id}}\", \"email\": \"{{user_email}}\" }\n  \"\"\"\n","gherkin","",[18,30,31,39,45,51,57,63],{"__ignoreMap":28},[32,33,36],"span",{"class":34,"line":35},"line",1,[32,37,38],{},"And I store the value \"{{ rand:uuid }}\" into \"user_id\" variable\n",[32,40,42],{"class":34,"line":41},2,[32,43,44],{},"And I store the value \"{{ rand:email:domain=example.com }}\" into \"user_email\" variable\n",[32,46,48],{"class":34,"line":47},3,[32,49,50],{},"When I set the request body to:\n",[32,52,54],{"class":34,"line":53},4,[32,55,56],{},"  \"\"\"\n",[32,58,60],{"class":34,"line":59},5,[32,61,62],{},"  { \"id\": \"{{user_id}}\", \"email\": \"{{user_email}}\" }\n",[32,64,66],{"class":34,"line":65},6,[32,67,56],{},[69,70,72],"h2",{"id":71},"syntax","Syntax",[23,74,79],{"className":75,"code":77,"language":78},[76],"language-text","{{ rand:type }}\n{{ rand:type:option=value }}\n{{ rand:type:option=value,option=value }}\n","text",[18,80,77],{"__ignoreMap":28},[69,82,84],{"id":83},"generators","Generators",[86,87,88,104],"table",{},[89,90,91],"thead",{},[92,93,94,98,101],"tr",{},[95,96,97],"th",{},"Type",[95,99,100],{},"Example",[95,102,103],{},"Options",[105,106,107,123,141,180,206,238,258],"tbody",{},[92,108,109,115,120],{},[110,111,112],"td",{},[18,113,114],{},"uuid",[110,116,117],{},[18,118,119],{},"{{ rand:uuid }}",[110,121,122],{},"—",[92,124,125,130,135],{},[110,126,127],{},[18,128,129],{},"email",[110,131,132],{},[18,133,134],{},"{{ rand:email:domain=example.com }}",[110,136,137,140],{},[18,138,139],{},"domain"," (optional)",[92,142,143,148,153],{},[110,144,145],{},[18,146,147],{},"phone",[110,149,150],{},[18,151,152],{},"{{ rand:phone:country=FR,format=e164 }}",[110,154,155,158,159,162,163,166,167,170,171,170,174,158,177,179],{},[18,156,157],{},"country"," (default ",[18,160,161],{},"US","), ",[18,164,165],{},"format",": ",[18,168,169],{},"e164",", ",[18,172,173],{},"national",[18,175,176],{},"international",[18,178,169],{},")",[92,181,182,187,192],{},[110,183,184],{},[18,185,186],{},"int",[110,188,189],{},[18,190,191],{},"{{ rand:int:min=1,max=99 }}",[110,193,194,158,197,162,200,158,203,179],{},[18,195,196],{},"min",[18,198,199],{},"0",[18,201,202],{},"max",[18,204,205],{},"1000",[92,207,208,213,218],{},[110,209,210],{},[18,211,212],{},"date",[110,214,215],{},[18,216,217],{},"{{ rand:date:direction=future,format=2006-01-02 }}",[110,219,220,166,223,170,226,170,229,158,232,234,235,237],{},[18,221,222],{},"direction",[18,224,225],{},"past",[18,227,228],{},"future",[18,230,231],{},"now",[18,233,225],{},"); ",[18,236,165],{}," (default RFC3339)",[92,239,240,245,250],{},[110,241,242],{},[18,243,244],{},"words",[110,246,247],{},[18,248,249],{},"{{ rand:words:count=6 }}",[110,251,252,158,255,179],{},[18,253,254],{},"count",[18,256,257],{},"3",[92,259,260,265,270],{},[110,261,262],{},[18,263,264],{},"regex",[110,266,267],{},[18,268,269],{},"{{ rand:regex:pattern=[A-Z]{3}-\\d{4} }}",[110,271,272,275],{},[18,273,274],{},"pattern"," (required)",[277,278,280],"alert",{"type":279},"info",[14,281,282,283,170,285,288],{},"For ",[18,284,264],{},[18,286,287],{},"pattern="," consumes the rest of the expression — commas and colons inside the pattern are safe.",[69,290,292],{"id":291},"reuse-a-value","Reuse a value",[14,294,295,296,299,300,304],{},"Each ",[18,297,298],{},"{{ rand:... }}"," call produces a ",[301,302,303],"strong",{},"new"," value. Store it in a variable first if you need it in multiple places:",[23,306,308],{"className":25,"code":307,"language":27,"meta":28,"style":28},"And I store the value \"{{ rand:uuid }}\" into \"request_id\" variable\nWhen I set the request body to:\n  \"\"\"\n  { \"id\": \"{{request_id}}\" }\n  \"\"\"\nThen the response should contain \"{{request_id}}\"\n",[18,309,310,315,319,323,328,332],{"__ignoreMap":28},[32,311,312],{"class":34,"line":35},[32,313,314],{},"And I store the value \"{{ rand:uuid }}\" into \"request_id\" variable\n",[32,316,317],{"class":34,"line":41},[32,318,50],{},[32,320,321],{"class":34,"line":47},[32,322,56],{},[32,324,325],{"class":34,"line":53},[32,326,327],{},"  { \"id\": \"{{request_id}}\" }\n",[32,329,330],{"class":34,"line":59},[32,331,56],{},[32,333,334],{"class":34,"line":65},[32,335,336],{},"Then the response should contain \"{{request_id}}\"\n",[69,338,340],{"id":339},"debugging","Debugging",[14,342,343,344,347],{},"Generated values are printed in the console with a ",[18,345,346],{},"[rand]"," prefix:",[23,349,352],{"className":350,"code":351,"language":78},[76],"[rand] generated '{{ rand:uuid }}' → 4a8b2c1d-...\n",[18,353,351],{"__ignoreMap":28},[14,355,356],{},"Use this output to reproduce failing tests.",[277,358,360],{"type":359},"warning",[14,361,362,364,365,368],{},[18,363,298],{}," is resolved at step execution time. It does not work in ",[18,366,367],{},"testflowkit.yml",".",[69,370,372],{"id":371},"next-steps","Next Steps",[374,375,376,385],"ul",{},[377,378,379,384],"li",{},[380,381,383],"a",{"href":382},"/docs/patterns/variables","Variables"," — Store and reuse values across steps",[377,386,387,391],{},[380,388,390],{"href":389},"/docs/guides/api-testing","API Testing"," — REST and GraphQL testing",[393,394,395],"style",{},"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":28,"searchDepth":41,"depth":41,"links":397},[398,399,400,401,402],{"id":71,"depth":41,"text":72},{"id":83,"depth":41,"text":84},{"id":291,"depth":41,"text":292},{"id":339,"depth":41,"text":340},{"id":371,"depth":41,"text":372},"Generate dynamic test data inline in Gherkin with {{ rand:type:options }}","md",{},{"title":407},"Random Data","/docs/patterns/random-data",{"title":5,"description":403},"docs/patterns/random-data","ofsJB-Epr9Is6Gti4rYy8FfiRlEPjnglwpiEJ1K5slU",1781768344691]