LoadForge allows you to login to any website, and then browse the site as a logged in
user (or set of users).We recommend learning about regular user logins before this guide.
LoadForge will automatically keep sessions, meaning you can login and then
browse the site like a browser would.
This guide will give you an example of how to login as different users throughout the test,
simulating multiple user logins and site usage. Note that this typically isn’t needed,
as 1000 requests from a single login is generally the same load as 1000 separate users.
from locust import HttpUser, TaskSet, task, betweenimport timeclass AwesomeUser(HttpUser): wait_time = between(10, 20) # On start populate our user list def on_start(self): self.createUsernames() # Create an array of user1 -> user1000 def createUsernames(self): self.users = [] for i in range(1000): self.users.append("user"+str(i+1)) # Fetch the next user in our list def getUsername(self): return self.users.pop() # Login to the site def login(self): username = self.getUsername() loginInformation = { "username": username, "password":"passw0rd" } self.client.post("/login", loginInformation) # Logout from the site def logout(self): self.client.get('/logout', name="logout") # Define our tasks here @task(1) def load_page(self): # Login first self.login() # Put your logged in tasks here self.client.get('/profile/info') # Logout now self.logout()
The above code creates 1000 users named “user1” through “user1000” and logs in with each of those. It’s designed for a
1000 user test of course. You can easily modify this. You can also pick usernames at random like so:
You can modify this test to suit whatever pre-populated user system you have. You could also consider registering users
with the test and clearing your database afterwards.
LoadForge is powered by locust, meaning open source locust users can copy this script as well.
If you are a locust user, consider importing your script to LoadForge to supercharge your testing!
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LoadForge Docs","colors":{"primary":"#4f46e5","light":"#c4b4ff","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/loadforge/Yesb_PiwUXZO8WCZ/logo/light.svg?fit=max\u0026auto=format\u0026n=Yesb_PiwUXZO8WCZ\u0026q=85\u0026s=37648ac33faaf4c6fd3224ded36dbcaa","dark":"https://mintcdn.com/loadforge/Yesb_PiwUXZO8WCZ/logo/dark.svg?fit=max\u0026auto=format\u0026n=Yesb_PiwUXZO8WCZ\u0026q=85\u0026s=5df5c5ff8bdb12ed5c41759f60aaa433"},"favicon":"/favicon.ico","navbar":{"links":[{"href":"mailto:help@loadforge.com","label":"Support"}],"primary":{"type":"button","label":"Start Free","href":"https://app.loadforge.com/register"}},"footer":{"socials":{"github":"https://github.com/adventdevinc"},"links":[{"header":"Product","items":[{"label":"Pricing","href":"https://loadforge.com/pricing"},{"label":"Changelog","href":"https://blog.loadforge.com"},{"label":"Status","href":"https://status.loadforge.com"}]},{"header":"Resources","items":[{"label":"Documentation","href":"https://docs.loadforge.com"},{"label":"API Reference","href":"https://docs.loadforge.com/api-reference/introduction"},{"label":"Script Examples","href":"https://docs.loadforge.com/examples/overview"}]},{"header":"Company","items":[{"label":"Website","href":"https://loadforge.com"},{"label":"Blog","href":"https://blog.loadforge.com"},{"label":"Support","href":"mailto:help@loadforge.com"}]}]},"metadata":{"timestamp":false},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book","href":"https://docs.loadforge.com"},{"anchor":"Website","icon":"globe","href":"https://loadforge.com/"},{"anchor":"Test Examples","icon":"book-open-cover","href":"https://docs.loadforge.com/examples/overview"},{"anchor":"Pricing","icon":"credit-card","href":"https://loadforge.com/pricing"},{"anchor":"Blog","icon":"newspaper","href":"https://blog.loadforge.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"loadforge","hasAudioNarration":false,"actualSubdomain":"loadforge","customDomains":["docs.loadforge.com"],"gitSource":{"type":"github","owner":"adventdevinc","repo":"lf-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21f62bef4a07ceb9f83b96","collectionId":"a98d750b-4247-4c13-af9a-e9e18c7f13c8","schemaVersion":"v2"},"feedback":{"edits":true,"issues":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a21f62bef4a07ceb9f83b96:success","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Script Examples","count":84},{"language":"default","tag":"Guides","count":51},{"language":"default","tag":"API Reference","count":22},{"language":"default","tag":"Tests","count":15},{"language":"default","tag":"Authentication \u0026 Security","count":10},{"language":"default","tag":"Test Scripting","count":10},{"language":"default","tag":"Runs \u0026 Results","count":9},{"language":"default","tag":"QA Testing","count":8},{"language":"default","tag":"Hosts","count":7},{"language":"default","tag":"Emerging Technology","count":7}]},"assistantConfig":{"enableStarterQuestions":false,"deflection":{"enabled":true,"email":"help@loadforge.com","showHelpButton":true}},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"examples/authentication-security/multiple-users","slug":"/examples/authentication-security/multiple-users","pageMetadata":{"title":"Multi-user Login Examples","description":"How to login as different users throughout the test, simulating multiple user logins and site usage.","tags":"concurrency, users, simulation","href":"/examples/authentication-security/multiple-users","hidden":false},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How to login as different users throughout the test, simulating multiple user logins and site usage.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`LoadForge allows you to login to any website, and then browse the site as a logged in\nuser (or set of users).`}),`\n`,_jsxs(_components.p,{children:[`We recommend learning about `,_jsx(_components.a,{href:`login-examples`,children:`regular user logins`}),` before this guide.`]}),`\n`,_jsx(Note,{title:`Sessions are automatic`,children:_jsx(_components.p,{children:`LoadForge will automatically keep sessions, meaning you can login and then\nbrowse the site like a browser would.`})}),`\n`,_jsx(_components.p,{children:`This guide will give you an example of how to login as different users throughout the test,\nsimulating multiple user logins and site usage. Note that this typically isn’t needed,\nas 1000 requests from a single login is generally the same load as 1000 separate users.`}),`\n`,_jsx(Heading,{level:`2`,id:`generated-users-code-example`,children:`Generated users code example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`47`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`47`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` locust `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` HttpUser, TaskSet, task, between`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` AwesomeUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`HttpUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` wait_time `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` between(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # On start populate our user list`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` on_start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.createUsernames()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Create an array of user1 -> user1000`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createUsernames`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.users `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` i `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` range`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.users.append(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Fetch the next user in our list`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getUsername`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.users.pop()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Login to the site`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` login`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` username `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.getUsername()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` loginInformation `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"username\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: username,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"password\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"passw0rd\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.client.post(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/login\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, loginInformation)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Logout from the site`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` logout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.client.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/logout'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"logout\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Define our tasks here`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` @task`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` load_page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Login first`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.login()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Put your logged in tasks here`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.client.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/profile/info'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Logout now`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.logout()`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The above code creates 1000 users named “user1” through “user1000” and logs in with each of those. It’s designed for a\n1000 user test of course. You can easily modify this. You can also pick usernames at random like so:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` random`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getUsername`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(random.randint(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You can modify this test to suit whatever pre-populated user system you have. You could also consider registering users\nwith the test and clearing your database afterwards.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Note,{title:`Locust Test Example`,children:_jsxs(_components.p,{children:[`LoadForge is powered by locust, meaning open source locust users can copy this script as well.\nIf you are a locust user, consider importing your script to `,_jsx(_components.a,{href:`https://loadforge.com`,children:`LoadForge`}),` to supercharge your testing!`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Multi-user Login Examples","description":"How to login as different users throughout the test, simulating multiple user logins and site usage.","tags":"concurrency, users, simulation","href":"/examples/authentication-security/multiple-users","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Generated users code example","slug":"generated-users-code-example","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/loadforge/722b0e4fdbb88adb/chat.js"],"subdomain":"loadforge","siteName":"LoadForge Docs","title":"Multi-user Login Examples - LoadForge Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-07T13:16:57.323Z","originalFileLocation":"examples/authentication-security/multiple-users.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How to login as different users throughout the test, simulating multiple user logins and site usage.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LoadForge Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Multi-user Login Examples - LoadForge Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to login as different users throughout the test, simulating multiple user logins and site usage.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LoadForge Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.loadforge.com/examples/authentication-security/multiple-users\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://loadforge.mintlify.app/_mintlify/api/og/v2?division=Authentication+%26+Security\u0026amp;title=Multi-user+Login+Examples\u0026amp;description=How+to+login+as+different+users+throughout+the+test%2C+simulating+multiple+user+logins+and+site+usage.\u0026amp;theme=31ccfe9141d6d25333ba3d77\u0026amp;signature=d67ed4247b4ecf95af5a748c096280a11993039d5073e9613c9120cca02e7e54\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Multi-user Login Examples - LoadForge Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to login as different users throughout the test, simulating multiple user logins and site usage.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://loadforge.mintlify.app/_mintlify/api/og/v2?division=Authentication+%26+Security\u0026amp;title=Multi-user+Login+Examples\u0026amp;description=How+to+login+as+different+users+throughout+the+test%2C+simulating+multiple+user+logins+and+site+usage.\u0026amp;theme=31ccfe9141d6d25333ba3d77\u0026amp;signature=d67ed4247b4ecf95af5a748c096280a11993039d5073e9613c9120cca02e7e54\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/loadforge/rsEC3W5cwSJyagpS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LoadForge Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.loadforge.com/examples/authentication-security/multiple-users\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/examples/authentication-security/multiple-users.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.loadforge.com/#organization\",\"name\":\"LoadForge Docs\",\"url\":\"https://docs.loadforge.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/loadforge/Yesb_PiwUXZO8WCZ/logo/light.svg?fit=max\u0026auto=format\u0026n=Yesb_PiwUXZO8WCZ\u0026q=85\u0026s=37648ac33faaf4c6fd3224ded36dbcaa\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.loadforge.com#website\",\"name\":\"LoadForge Docs\",\"url\":\"https://docs.loadforge.com\",\"publisher\":{\"@id\":\"https://docs.loadforge.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.loadforge.com/examples/authentication-security/multiple-users#webpage\",\"url\":\"https://docs.loadforge.com/examples/authentication-security/multiple-users\",\"name\":\"Multi-user Login Examples\",\"description\":\"How to login as different users throughout the test, simulating multiple user logins and site usage.\",\"dateModified\":\"2026-03-07T13:16:57.323Z\",\"isPartOf\":{\"@id\":\"https://docs.loadforge.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.loadforge.com/examples/authentication-security/multiple-users#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.loadforge.com/examples/authentication-security/multiple-users#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Authentication \u0026 Security\",\"item\":\"https://docs.loadforge.com/examples/authentication-security/auth-login-flow\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multi-user Login Examples\",\"item\":\"https://docs.loadforge.com/examples/authentication-security/multiple-users\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.loadforge.com/examples/authentication-security/multiple-users#article\",\"headline\":\"Multi-user Login Examples\",\"name\":\"Multi-user Login Examples\",\"description\":\"How to login as different users throughout the test, simulating multiple user logins and site usage.\",\"url\":\"https://docs.loadforge.com/examples/authentication-security/multiple-users\",\"mainEntityOfPage\":{\"@id\":\"https://docs.loadforge.com/examples/authentication-security/multiple-users#webpage\"},\"dateModified\":\"2026-03-07T13:16:57.323Z\",\"publisher\":{\"@id\":\"https://docs.loadforge.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.loadforge.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LoadForge Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"LoadForge Docs","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book","href":"https://docs.loadforge.com"},{"anchor":"Website","icon":"globe","href":"https://loadforge.com/"},{"anchor":"Test Examples","icon":"book-open-cover","href":"https://docs.loadforge.com/examples/overview"},{"anchor":"Pricing","icon":"credit-card","href":"https://loadforge.com/pricing"},{"anchor":"Blog","icon":"newspaper","href":"https://blog.loadforge.com"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"Script Examples","groups":[{"group":"Overview","pages":[{"title":"LoadForge Examples","href":"/examples/overview"}]},{"group":"Getting Started","pages":[{"title":"Adding Custom Sleep Intervals","href":"/examples/getting-started/adding-sleeps"},{"title":"POSTing JSON data","href":"/examples/getting-started/json-posts"},{"title":"API Examples (REST)","href":"/examples/getting-started/rest-api"},{"title":"Including Static Content","href":"/examples/getting-started/static-content"},{"title":"Checking Status Codes","href":"/examples/getting-started/status-codes"}]},{"group":"Advanced API Patterns","pages":[{"title":"API Versioning Testing","href":"/examples/advanced-api-patterns/api-versioning"},{"title":"Simple Batch Operations","href":"/examples/advanced-api-patterns/simple-batch-operations"},{"title":"Simple Pagination Testing","href":"/examples/advanced-api-patterns/simple-pagination-testing"},{"title":"Simple Rate Limiting","href":"/examples/advanced-api-patterns/simple-rate-limiting"}]},{"group":"Advanced API Testing","pages":[{"title":"Load Testing GraphQL APIs","href":"/examples/advanced-api-testing/graphql-api"},{"title":"Load Testing GraphQL Subscriptions","href":"/examples/advanced-api-testing/graphql-subscriptions"},{"title":"Load Testing gRPC Streaming Services","href":"/examples/advanced-api-testing/grpc-streaming"},{"title":"Load Testing gRPC Services","href":"/examples/advanced-api-testing/grpc"},{"title":"Load Testing JSON‑API Chaining","href":"/examples/advanced-api-testing/json-api-chaining"},{"title":"XML-RPC Load Testing","href":"/examples/advanced-api-testing/xmlrpc-api"}]},{"group":"Advanced Testing Patterns","pages":[{"title":"Simple A/B Testing","href":"/examples/advanced-testing-patterns/simple-ab-testing"},{"title":"Simple Chaos Testing","href":"/examples/advanced-testing-patterns/simple-chaos-testing"},{"title":"Simple Contract Testing","href":"/examples/advanced-testing-patterns/simple-contract-testing"},{"title":"Simple Snapshot Testing","href":"/examples/advanced-testing-patterns/simple-snapshot-testing"}]},{"group":"Authentication \u0026 Security","pages":[{"title":"Load Testing Authenticated Login Flows","href":"/examples/authentication-security/auth-login-flow"},{"title":"Azure AD Authentication and Testing","href":"/examples/authentication-security/azure-ad-testing"},{"title":"Bypass CloudFlare Blocks","href":"/examples/authentication-security/bypassing-cloudflare-waf"},{"title":"Firebase Authentication","href":"/examples/authentication-security/firebase-auth"},{"title":"Getting Auth Tokens","href":"/examples/authentication-security/getting-auth-token"},{"title":"Simple JWT Authentication Testing","href":"/examples/authentication-security/jwt-token-refresh"},{"title":"Login Examples","description":"Test that logs in and then requests a profile page.","href":"/examples/authentication-security/login-examples"},{"title":"Multi-user Login Examples","href":"/examples/authentication-security/multiple-users"},{"title":"OAuth 2.0 Authorization Code Flow with PKCE","description":"Complete OAuth 2.0 authorization code flow with PKCE (Proof Key for Code Exchange) for secure authentication testing","href":"/examples/authentication-security/oauth2-flow"},{"title":"Simple API Key Testing","href":"/examples/authentication-security/simple-api-key-testing"}]},{"group":"Browser Testing","pages":[{"title":"Basic Browser Navigation","href":"/examples/browser-testing/basic-browser-navigation"},{"title":"Form Testing","href":"/examples/browser-testing/form-testing"},{"title":"Simple Mobile Browser Testing","href":"/examples/browser-testing/simple-mobile-testing"},{"title":"Simple Performance Testing","href":"/examples/browser-testing/simple-performance-testing"}]},{"group":"Compliance \u0026 Security","pages":[{"title":"Data Retention Testing","href":"/examples/compliance-security/data-retention-testing"},{"title":"Security Headers Validation","href":"/examples/compliance-security/security-headers-validation"}]},{"group":"E-Commerce \u0026 Business","pages":[{"title":"Simple CMS API Testing","href":"/examples/ecommerce-business/cms-apis"},{"title":"Simple Inventory API Testing","href":"/examples/ecommerce-business/inventory-apis"},{"title":"Simple Multi-Tenant API Testing","href":"/examples/ecommerce-business/multi-tenant-apis"},{"title":"Simple Payment API Testing","href":"/examples/ecommerce-business/payment-apis"},{"title":"Simple Shopping Cart API Testing","href":"/examples/ecommerce-business/shopping-cart-apis"}]},{"group":"Emerging Technology","pages":[{"title":"AI API Performance Comparison","href":"/examples/emerging-technology/ai-api-comparison"},{"title":"DeFi Protocol Testing","href":"/examples/emerging-technology/defi-protocol-testing"},{"title":"DigitalOcean AI Performance Testing","href":"/examples/emerging-technology/digitalocean-ai-testing"},{"title":"Infura Node Testing","href":"/examples/emerging-technology/infura-node-testing"},{"title":"Ollama Local AI Testing","href":"/examples/emerging-technology/ollama-testing"},{"title":"OpenSea NFT API Testing","href":"/examples/emerging-technology/opensea-nft-testing"},{"title":"Uniswap DeFi Testing","href":"/examples/emerging-technology/uniswap-defi-testing"}]},{"group":"Geographic \u0026 Localization","pages":[{"title":"Localization \u0026 Internationalization Testing","href":"/examples/geographic-localization/localization-internationalization"},{"title":"Multi-Region Latency Testing","href":"/examples/geographic-localization/multi-region-latency-testing"},{"title":"Regional Failover Testing","href":"/examples/geographic-localization/regional-failover-testing"}]},{"group":"Infrastructure \u0026 Scaling","pages":[{"title":"CDN Performance Testing","href":"/examples/infrastructure-scaling/cdn-performance-testing"},{"title":"Crawling Real HTTP User","href":"/examples/infrastructure-scaling/crawl-website"},{"title":"Custom HTTP Headers","href":"/examples/infrastructure-scaling/custom-headers"},{"title":"Efficiently Scraping Page Resources","href":"/examples/infrastructure-scaling/scrape-pages"},{"title":"Simple Serverless Testing","href":"/examples/infrastructure-scaling/simple-serverless-testing"}]},{"group":"Modern Web Frameworks","pages":[{"title":"Advanced E-Commerce Test Example","href":"/examples/modern-web-frameworks/ecommerce-site"},{"title":"NextJS Load Test","href":"/examples/modern-web-frameworks/nextjs"},{"title":"ReactJS Load Test","href":"/examples/modern-web-frameworks/reactjs"},{"title":"Load Testing a Single-Page Application (SPA)","href":"/examples/modern-web-frameworks/spa-load-test"},{"title":"WordPress Load Test Example","href":"/examples/modern-web-frameworks/wordpress"}]},{"group":"Performance Testing","pages":[{"title":"Controlling Request Rates","href":"/examples/performance-testing/controlling-request-rates"},{"title":"Enhancing Test Performance with FastHTTP","href":"/examples/performance-testing/fasthttp-performance"},{"title":"Checking Response Text and Times","href":"/examples/performance-testing/limiting-response-time"},{"title":"Setting a Random User-Agent with LoadForge","href":"/examples/performance-testing/random-user-agents"}]},{"group":"QA Testing","pages":[{"title":"Accessibility Testing","href":"/examples/qa-testing/accessibility-testing"},{"title":"Axe-Core Accessibility Testing","href":"/examples/qa-testing/axe-accessibility-testing"},{"title":"Broken Links Checker","href":"/examples/qa-testing/broken-links-checker"},{"title":"Browser Accessibility Testing","href":"/examples/qa-testing/browser-accessibility-testing"},{"title":"Image Validation Testing","href":"/examples/qa-testing/image-validation"},{"title":"Simple Form Validation","href":"/examples/qa-testing/simple-form-validation"},{"title":"Simple Performance Regression","href":"/examples/qa-testing/simple-performance-regression"},{"title":"Simple SEO Testing","href":"/examples/qa-testing/simple-seo-testing"}]},{"group":"Real-Time Applications","pages":[{"title":"Message Queue APIs Testing","href":"/examples/real-time-applications/message-queue-apis"},{"title":"Load Testing MQTT Protocol","href":"/examples/real-time-applications/mqtt"},{"title":"Server-Sent Events Testing","href":"/examples/real-time-applications/server-sent-events"},{"title":"WebSockets with SocketIO","href":"/examples/real-time-applications/socketio"},{"title":"Server-Sent Events (SSE) Testing","href":"/examples/real-time-applications/sse"},{"title":"Webhook Testing","href":"/examples/real-time-applications/webhook-testing"},{"title":"Load Testing WebSockets","href":"/examples/real-time-applications/websockets"}]},{"group":"Specialized Performance","pages":[{"title":"Simple Cache Testing","href":"/examples/specialized-performance/cache-testing"},{"title":"Simple Database API Testing","href":"/examples/specialized-performance/database-apis"},{"title":"Simple File Upload Testing","href":"/examples/specialized-performance/file-upload-testing"},{"title":"Simple Search API Testing","href":"/examples/specialized-performance/search-apis"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"title":"Multi-user Login Examples - LoadForge Docs","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":[],"chunks":[]}