Skip to contentমূল লেখায় যান

Part 23পর্ব 23 · Case Study

Load and Browser Automation

The last step of the QA chain adds two kinds of automation to the practice app: a k6 load test for Send Money, and a Playwright suite for the web app. This part shows how the k6 script builds its test data from the business limits, which thresholds decide pass or fail, how the Playwright suite keeps one saved session per role, and why each browser test checks the UI, the API, and the data.

12 min read12 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 10 sources10টি সোর্স · updated Nov 2026আপডেট: Nov 2026

A k6 ramp against a daily limitদৈনিক সীমার বিরুদ্ধে একটা k6 র‍্যাম্প

Ramp virtual users to 10, then run again on the same day and see skipped sends fail the run.ভার্চুয়াল ব্যবহারকারী 10 পর্যন্ত বাড়ান, তারপর একই দিনে আবার চালান আর দেখুন স্কিপ হওয়া send রানটাকে ব্যর্থ করে।

2 min2 মিনিট8 steps8টি ধাপ
  • VUs nowএখন VU0
  • Sent todayআজ পাঠানো0 / 10
  • Skippedস্কিপ0
0 s0 s30 s30 s50 s50 s60 s60 sVUs over timeVU সময় ধরে3 VUs3 VU10 VUs10 VU0 VUs0 VUk6k6load testলোড টেস্টskipped 0স্কিপ 0Customerগ্রাহক0 / 100 / 10left 10 · planned 9বাকি 10 · plan 9sent today 0/10আজ পাঠানো 0/10Verdictফলাফল……

You’ll learnআপনি শিখবেন

  • How the stages ramp the VUsstages কীভাবে VU বাড়ায়
  • Why setup plans sends from the limitssetup কেন সীমা থেকে send পরিকল্পনা করে✓
  • Which thresholds decide pass or failকোন থ্রেশহোল্ড পাস বা ব্যর্থ ঠিক করে
  • Why a second run the same day failsএকই দিনে দ্বিতীয় রান কেন ব্যর্থ হয়

Where these facts come from

The workspace is the author's private practice workspace, in its state of 2026-10-07 (25 commits from 2026-09-19). The numbers and the excerpts on this page come from its files. Values such as emails, phone numbers, passwords, and host names are left out or replaced with placeholders. Claude Code, k6, and Playwright facts link to the official docs.

The two suites

The author added both suites on 2026-10-07, after the fixes of Part 22. The workspace README ends its QA chain with "re-test ──▶ k6 performance check".

SuiteFilesWhat it checksStored result
k6 load testapi/performance/: one .k6.js script and its README.mdSend Money under a staged load of one minuteA reference run in the workspace README only. There is no k6 summary file.
Playwright suiteweb/playwright.config.ts and web/e2e/Admin user list, agent login with an email OTP, agent cash-inNone. The result folders are ignored in git.

No prompt is recorded for this part

The two session logs of the workspace end on 2026-10-04. They do not mention k6 or the Playwright suite. So this page shows the files that the author kept, not the conversation that made them.

সহজ English

The author added two test suites on 2026-10-07, after the fixes of Part 22. The workspace README ends its QA chain with "re-test ──▶ k6 performance check".

  • The k6 load test is in api/performance/: one .k6.js script and its README.md. It checks Send Money under a staged load of one minute. The only result is one reference run in the workspace README. There is no k6 summary file.
  • The Playwright suite is in web/playwright.config.ts and web/e2e/. It checks the admin user list, the agent login with an email OTP, and the agent cash-in. It has no stored result, because git ignores the result folders.

No prompt is recorded for this part. The two session logs of the workspace end on 2026-10-04, and they do not mention k6 or the Playwright suite. So this page shows the files that the author kept, not the conversation that made them.

বাংলা ব্যাখ্যা

লেখক 2026-10-07 তারিখে, Part 22-এর fix-গুলোর পরে, দুটি test suite যোগ করেন। Workspace README তার QA chain শেষ করে "re-test ──▶ k6 performance check" দিয়ে।

  • k6 load test আছে api/performance/-এ: একটি .k6.js script এবং তার README.md। এটি এক মিনিটের staged load-এ Send Money check করে। এর একমাত্র result হলো workspace README-তে লেখা একটি reference run। কোনো k6 summary file নেই।
  • Playwright suite আছে web/playwright.config.ts এবং web/e2e/-এ। এটি admin user list, email OTP দিয়ে agent login, এবং agent cash-in check করে। এর কোনো result রাখা নেই, কারণ git result folder-গুলো ignore করে।

এই অংশের কোনো prompt রেকর্ড করা নেই। Workspace-এর দুটি session log 2026-10-04 তারিখে শেষ হয়, এবং সেগুলোতে k6 বা Playwright suite-এর কোনো উল্লেখ নেই। তাই এই পাতা লেখকের রাখা file-গুলো দেখায়, সেগুলো তৈরির কথোপকথন নয়।

The k6 load test

The load profile

The script uses k6 stages, not scenarios. A stage is a { target, duration } object that ramps the number of virtual users (VUs) up or down. Source 1সোর্স 1 stages is a shortcut for one scenario with a ramping VUs executor. Source 1সোর্স 1

const STAGES = [
    { duration: '30s', target: 3 },
    { duration: '20s', target: 10 },
    { duration: '10s', target: 0 },
];
TimeVUsWhat happens
0–30 s0 → 3The first 3 users start to send.
30–50 s3 → 107 more users join. All users keep sending.
50–60 s10 → 0All users leave.

Each user waits THINK_TIME seconds between two sends. The default is 3 s. The k6 README estimates about 75 sends per run with this default.

Test data built from the business limits

The script creates no users. It reuses existing customers, and it plans every send before the load starts.

k6 calls setup one time per test, before the VU stage. Source 2সোর্স 2 The value that setup returns goes to the default function, and each VU gets its own copy. Source 2সোর্স 2 Only data (JSON) can pass between setup and the other stages. Source 2সোর্স 2

In this script, setup does these steps:

  1. It lists the users and keeps each customer that is active and has a balance of at least MIN_BALANCE (default 1000).
  2. It reads the statement of each customer and counts the outgoing use since the start of the UTC day and the UTC month.
  3. It calculates the capacity of each customer. The capacity is the smallest of the daily count left, the monthly count left, the daily amount left, the monthly amount left, and the balance. The three amounts are divided by the cost of one send (the amount plus a flat fee).
  4. It keeps a customer only if the capacity is more than 0 and the customer can log in.
  5. It fails the run if fewer than 2 customers are left.
  6. It builds a list of round-robin slots. Each customer gets at most its capacity in slots, and each customer always pays the next customer in the list.
  7. It prints the send capacity and the estimated number of sends. It warns if the capacity is below the estimate.

The API does not give the outgoing limits, so the script holds them as constants. A code comment names the section of the business requirements that sets them.

setup logs in each usable customer, and the script sets setupTimeout: '2m'. The default is 60 s, and the test fails if setup runs longer. Source 1সোর্স 1

One slot for each iteration

VU code runs over and over through the test duration. Source 2সোর্স 2 Each iteration reads exec.scenario.iterationInTest. This is the unique, zero-based number of the current iteration in the scenario. Source 3সোর্স 3 The iteration uses that number as the index of its slot.

If no slot is left, the iteration sends nothing. It adds 1 to the custom counter send_skipped. So the test never sends more than the limits allow, and a shortage of test data shows in the result.

সহজ English

The virtual users (VUs) go from 0 to 3 in 30 s, to 10 in the next 20 s, and to 0 in the last 10 s. Each user waits 3 s (the default THINK_TIME) between two sends. With this default, the k6 README estimates about 75 sends per run.

Before the load starts, setup keeps the active customers with a balance of at least MIN_BALANCE (default 1000). It calculates how many sends each customer can make within the limits and the balance, and plans each send as a slot. If an iteration finds no slot, it sends nothing and adds 1 to send_skipped.

বাংলা ব্যাখ্যা

Script-টি k6 stages ব্যবহার করে, scenarios নয়। প্রথম 30 সেকেন্ডে virtual user (VU) 0 থেকে 3 হয়, পরের 20 সেকেন্ডে 10 হয়, আর শেষ 10 সেকেন্ডে আবার 0 হয়। প্রতিটি user দুটি send-এর মাঝে THINK_TIME সেকেন্ড অপেক্ষা করে; default হলো 3 সেকেন্ড। এই default-এ k6 README প্রতি run-এ প্রায় 75টি send ধরে।

Script কোনো user তৈরি করে না। Load শুরুর আগে setup সেই active customer-দের রাখে, যাদের balance কমপক্ষে MIN_BALANCE (default 1000)। তারপর daily ও monthly limit এবং balance থেকে প্রতিটি customer-এর capacity হিসাব করে, আর প্রতিটি send-এর জন্য একটি round-robin slot তৈরি করে। 2 জনের কম customer থাকলে run fail করে। প্রতিটি iteration exec.scenario.iterationInTest দিয়ে নিজের slot বেছে নেয় Source 3সোর্স 3। কোনো slot না থাকলে iteration কিছু পাঠায় না এবং send_skipped counter-এ 1 যোগ করে।

Thresholds as pass criteria

Thresholds are the pass and fail criteria for the metrics of a test. Source 4সোর্স 4 If a threshold fails, the test finishes with a failed status, and k6 exits with a non-zero exit code. Source 4সোর্স 4 This is the options block of the script:

export const options = {
    setupTimeout: '2m',
    stages: STAGES,
    thresholds: {
        'checks{name:send}': ['rate==1'],
        'http_req_failed{name:send}': ['rate==0'],
        'http_req_duration{name:send}': ['max<60000'],
        // Fails the run if the reusable customers ran out of limit or balance.
        send_skipped: ['count==0'],
    },
};

Tag names. In this excerpt and on this page, send replaces the original tag value, and send_skipped replaces the original counter name. The original names contain the name of the app.

Threshold form. A threshold expression has the form <aggregation_method> <operator> <value>. Source 4সোর্স 4 A threshold can apply to a sub-metric with a tag, in the form 'metric_name{tag_name:tag_value}', and to checks with a tag. Source 4সোর্স 4 The script gives each send request and its checks the tag name: 'send'. So the login calls of setup do not count.

ThresholdMeaning in this test
checks{name:send} rate==1Every check passes: the status is 201, and the message is "Send money successful".
http_req_failed{name:send} rate==0No send request fails.
http_req_duration{name:send} max<60000No send takes 60 s or longer.
send_skipped count==0No iteration found its slot empty.

Checks. The checks threshold is necessary. A failed check does not stop the test and does not give a failed exit status. Source 5সোর্স 5 Each check creates a rate metric, and a threshold on it can fail the test. Source 5সোর্স 5 The skip counter is a Counter metric, and a threshold on a Counter can use count. Source 4সোর্স 4

Latency. The requirements define no latency target. The k6 README says to read p(95) from the summary as information only. That is why the duration threshold is only a 60 s ceiling.

The result: README only

One reference run, no stored output

The only k6 result is one sentence in the workspace README: on the local machine, 78 sends had 0 failures, a 95th percentile of 14.5 ms, and a maximum of 23 ms. No k6 summary file or log is in the workspace. The tutorial treats the numbers as a record of one run, not as a baseline.

What the test does not show

  • A second run on the same day. Each run uses most of the daily limit of the reused customers (10 sends per UTC day). The README says that a second run on the same UTC day reports skipped sends. The send_skipped threshold then fails the run.
  • Scale. The README says that the k6 figures come from a table of about 1,000 rows. It also says that response times grow with the table size. In the tutorial's view, a fast local run does not predict the speed on a large database.
  • Other environments. The k6 README says that the script is for local and dev use only, because it writes real ledger rows.
  • Capacity. The peak is 10 VUs. The tutorial reads the script as a correctness check of the limits under concurrent sends, not as a capacity test.

সহজ English

Thresholds decide pass or fail Source 4সোর্স 4. Every send check must pass, no send request can fail, no send can take 60 s or longer, and send_skipped must stay at 0. A failed check alone does not fail the test Source 5সোর্স 5.

The only result is one README sentence: 78 sends, 0 failures, a 95th percentile of 14.5 ms, and a maximum of 23 ms. It is a record of one run, not a baseline.

বাংলা ব্যাখ্যা

Threshold-গুলোই pass বা fail ঠিক করে Source 4সোর্স 4। প্রতিটি send check pass করতে হবে, কোনো send request fail করা যাবে না, কোনো send 60 সেকেন্ড বা তার বেশি নিতে পারবে না, এবং send_skipped 0 থাকতে হবে। একটি failed check নিজে থেকে test-কে fail করায় না Source 5সোর্স 5, তাই checks threshold দরকার। Requirement-এ কোনো latency target নেই, তাই duration threshold শুধু 60 সেকেন্ডের একটি ceiling।

একমাত্র result হলো README-র একটি বাক্য: local machine-এ 78টি send, 0 failure, 95th percentile 14.5 ms, এবং maximum 23 ms। এটি একটি run-এর রেকর্ড, baseline নয়। একই UTC দিনে দ্বিতীয় run skipped send দেখায়, তাই fail করে। Script শুধু local ও dev ব্যবহারের জন্য, কারণ এটি আসল ledger row লেখে।

The Playwright suite

Layout

Folder or fileContent
web/playwright.config.ts4 projects, 2 web servers, traces and screenshots on failure
web/e2e/admin.setup.ts, web/e2e/agent.setup.tsOne login setup for each role
web/e2e/pages/3 page objects: login, user list, cash-in
web/e2e/tests/admin/1 spec, 1 test: search the user list by role
web/e2e/tests/agent/2 specs, 6 tests: login with an email OTP (5), cash-in (1)
web/e2e/utils/Session check, OTP email reader, API helper

One setup project for each role

A project is a logical group of tests that run with the same configuration. Source 6সোর্স 6 Dependencies are projects that must run before the tests of another project. Source 6সোর্স 6 The dependent tests start only after all tests of the setup project pass. Source 6সোর্স 6

The config has a setup project and a test project for each role. This is the start of its projects block:

  // One session per role. Each <role>-setup logs in (skipped while the saved session is still valid)
  // and saves cookie + localStorage to e2e/<role>_auth.json; specs in e2e/tests/<role>/ start with it.
  projects: [
    { name: 'admin-setup', testMatch: /admin\.setup\.ts/ },
    { name: 'agent-setup', testMatch: /agent\.setup\.ts/ },
    {
      name: 'admin',
      testMatch: /tests\/admin\/.*\.spec\.ts/,
      dependencies: ['admin-setup'],
      use: { ...devices['Desktop Chrome'], storageState: authFile('admin') },
    },
    // … the 'agent' project has the same form, with 'agent-setup'
  ],

The test reporters show the setup tests, and the trace viewer records traces of the setup. Source 6সোর্স 6 So a failed login shows as a failed setup test, not as a failure in each spec.

A different layout from the docs

For several roles, the Playwright docs authenticate several times in one setup project. They set storageState for each test file or test group. Source 7সোর্স 7 The workspace uses one setup project and one test project for each role instead. A spec gets its role from its folder: tests/admin/ or tests/agent/.

Saved sessions

Saved state. A saved state covers cookies, local storage, IndexedDB, and passkey authentication. Source 7সোর্স 7 Each setup in the workspace saves the session cookie and the local-storage keys of its role to e2e/<role>_auth.json.

Expiry. The Playwright docs say that you must delete the stored state when it expires. Source 7সোর্স 7 The workspace does this check in code. Each setup skips the login while the saved session is valid:

  • The file exists.
  • It has the correct role.
  • Its token has more than 10 min left.

The agent setup needs this most, because each agent login sends a new OTP email.

A session file is a credential

The browser state file may contain sensitive cookies and headers. The Playwright docs discourage checking it into a repository. Source 7সোর্স 7 The workspace ignores /e2e/*_auth.json in git.

সহজ English

The suite has 7 tests. Each role has a setup project that logs in and a test project. The dependent tests start only after all tests of the setup project pass Source 6সোর্স 6.

Each setup saves the session of its role to e2e/<role>_auth.json. It skips the login while the saved session is valid: the file exists, the role is correct, and the token has more than 10 min left. This matters most for the agent: each agent login sends a new OTP email. The file can contain sensitive cookies and headers Source 7সোর্স 7, so git ignores it.

বাংলা ব্যাখ্যা

Suite-টিতে 7টি test আছে: admin-এর 1টি এবং agent-এর 6টি। প্রতিটি role-এর একটি setup project আছে, যা login করে, এবং একটি test project আছে। Setup project-এর সব test pass করার পরেই কেবল dependent test-গুলো শুরু হয় Source 6সোর্স 6।

প্রতিটি setup তার role-এর session e2e/<role>_auth.json-এ save করে। Saved session valid থাকলে setup login বাদ দেয়, অর্থাৎ যখন file-টি আছে, role ঠিক আছে, এবং token-এর মেয়াদ 10 মিনিটের বেশি বাকি। Agent-এর জন্য এটি সবচেয়ে জরুরি, কারণ প্রতিটি agent login একটি নতুন OTP email পাঠায়। এই file-এ sensitive cookie ও header থাকতে পারে Source 7সোর্স 7, তাই workspace git-এ /e2e/*_auth.json ignore করে।

The email OTP helper

The agent role logs in with a password and a one-time password (OTP) from an email. The helper reads the newest OTP email through the Gmail REST API, with a token from e2e/.env. It follows one rule: use only an OTP from this login.

  • It skips an email that came before the login. Each login replaces the previous OTP, so an older email is not valid, even inside its 2-minute window.
  • It skips an email whose OTP has expired. It treats an OTP as expired 10 s before the end of the 2 minutes, so the test has time to type it.
  • It polls until a new email arrives. The defaults are a poll every 3 s and a limit of 60 s.

The login spec has 5 tests. One test logs in through the browser and starts logged out, with an empty storageState. The other 4 tests stub the mailbox API and use no browser. They cover an expired email, an email from an earlier login, no new email, and an OTP that is about to expire. The real mailbox cannot give these cases on demand.

One test, three checks

Playwright Test has a built-in request fixture that respects options such as baseURL. Source 8সোর্স 8 API calls can prepare the server state or check postconditions on the server. Source 8সোর্স 8 The cash-in test uses the API to read a balance before and after the action.

  1. Precondition. The test reads the balance of the customer through the API. If the cash-in would pass the wallet cap, the test fails with a message that says which value to change.
  2. API response. The page object starts page.waitForResponse for the deposit request before the click. The test asserts status 201, the success message, and the format of the transaction ID.
  3. Page. The page shows the success message, the same transaction ID as the API response, and the total.
  4. Data. The balance from the API is the old balance plus the amount.

Step 2 asserts the exact status, not "any 2xx". The page object notes that the backend returns HTTP 208 for a business rejection. A test that accepts any 2xx code would pass a rejected deposit.

Web servers and reports

Web servers. webServer launches one or more web servers during the tests. Source 9সোর্স 9 With reuseExistingServer: true, Playwright reuses a server that already runs on the port or URL. Source 9সোর্স 9 The default timeout is 60000 ms. Source 9সোর্স 9 The workspace config starts the API and the web app, reuses both when they run, and gives the web app 120 s to start.

Reports. The config keeps traces and screenshots on failure. It writes a list report and an HTML report. In CI, it retries a failed test 2 times.

No stored Playwright run

The workspace has no Playwright report and no test result. Git ignores /test-results/ and /playwright-report/. This page describes the suite as written. It does not claim that the 7 tests pass.

সহজ English

The OTP helper reads the newest OTP email through the Gmail REST API. It uses only an OTP from this login. It skips emails from before the login and expired OTPs. By default, it polls every 3 s for at most 60 s.

The cash-in test checks the API response, the page, and the new balance. It asserts the exact status 201, because the backend returns HTTP 208 for a business rejection.

No Playwright run is stored, so the page does not claim that the 7 tests pass.

বাংলা ব্যাখ্যা

OTP helper Gmail REST API দিয়ে সবচেয়ে নতুন OTP email পড়ে। এর নিয়ম একটি: শুধু এই login-এর OTP ব্যবহার করে। এটি login-এর আগের email বাদ দেয়, এবং 2 মিনিট শেষ হওয়ার 10 সেকেন্ড আগেই OTP-কে expired ধরে। Default হিসেবে এটি প্রতি 3 সেকেন্ডে poll করে, সর্বোচ্চ 60 সেকেন্ড পর্যন্ত। Login spec-এর 5টি test-এর মধ্যে 1টি browser দিয়ে login করে; বাকি 4টি mailbox API stub করে।

Cash-in test একসাথে তিনটি জিনিস দেখে: API response, page, এবং API থেকে পাওয়া নতুন balance। এটি exact status 201 assert করে, "যেকোনো 2xx" নয়, কারণ backend business rejection-এর জন্য HTTP 208 ফেরত দেয়।

Config failure-এ trace ও screenshot রাখে, এবং CI-তে একটি failed test 2 বার retry করে। কোনো Playwright run রাখা নেই, তাই এই পাতা দাবি করে না যে 7টি test pass করে।

The /playwright command

The author wrote the rules for this suite as a command in .claude/commands/playwright.md. Custom commands are merged into skills. A file in .claude/commands/ and a skill in .claude/skills/<name>/SKILL.md both create /<name>, and existing command files keep working. Source 10সোর্স 10 The Skills page explains the skill format.

The command gives a workflow in 9 steps: read the project, explore with agent-browser, ask about ambiguity, write the test, run it, fix it, prove the assertion, run cold, and report. It says that the work is done only when the test passes and the assertion is proved able to fail. This is step 7:

7. **Prove the assertion.** Change one expected value to a wrong value and run. The test must fail with a clear message. Restore the value, run again, and check `git diff`.

Two more rules protect the tests from a weak fix:

  • Fixes. "Keep the assertions as strong as before. Change an expected value only when evidence shows that the expectation was wrong."
  • Assertions. "Check the UI, the API response, and the result in the data (for example, a balance from the API)."

The cash-in test follows the second rule. The table of common failures in the command also names the 208 problem: assert the exact status, for example 201, not ok().

The workspace also registers the Playwright MCP server, but the command explores with agent-browser. No skill or command names a Playwright MCP tool. Part 24 lists this and other setup issues. The Browser Testing with Playwright page explains Playwright MCP and the Playwright Test Agents.

সহজ English

The author wrote the rules for this suite as a command in .claude/commands/playwright.md. A file in .claude/commands/ and a skill in .claude/skills/<name>/SKILL.md both create /<name> Source 10সোর্স 10.

The command gives a workflow in 9 steps: read the project, explore with agent-browser, ask about ambiguity, write the test, run it, fix it, prove the assertion, run cold, and report. The work is done only when the test passes and the assertion is proved able to fail. To prove an assertion, change one expected value to a wrong value and run. The test must fail with a clear message. Then restore the value, run again, and check git diff.

Two more rules protect the tests. A fix keeps the assertions as strong as before. A test checks the UI, the API response, and the result in the data. The command also says: assert the exact status, for example 201, not ok().

The workspace also registers the Playwright MCP server, but the command explores with agent-browser.

বাংলা ব্যাখ্যা

লেখক এই suite-এর নিয়মগুলো .claude/commands/playwright.md-এ একটি command হিসেবে লিখেছেন। .claude/commands/-এর একটি file এবং .claude/skills/<name>/SKILL.md-এর একটি skill, দুটিই /<name> তৈরি করে, এবং পুরোনো command file-গুলো কাজ করতে থাকে Source 10সোর্স 10।

Command-টি 9 ধাপের একটি workflow দেয়: project পড়া, agent-browser দিয়ে explore করা, অস্পষ্ট বিষয়ে প্রশ্ন করা, test লেখা, run করা, fix করা, assertion প্রমাণ করা, cold run করা, এবং report দেওয়া। কাজ শেষ হয় কেবল তখন, যখন test pass করে এবং প্রমাণ হয় যে assertion fail করতে পারে। Assertion প্রমাণ করতে একটি expected value ভুল value-তে বদলে run করুন। Test-কে একটি পরিষ্কার message দিয়ে fail করতে হবে। তারপর value ফিরিয়ে আনুন, আবার run করুন, এবং git diff দেখুন।

আরও দুটি নিয়ম test-কে দুর্বল fix থেকে রক্ষা করে। Fix-এর পরেও assertion আগের মতোই শক্ত রাখতে হবে; expected value বদলানো যাবে কেবল তখন, যখন প্রমাণ দেখায় যে expectation ভুল ছিল। আর test-কে UI, API response, এবং data-র result, তিনটিই check করতে হবে। Cash-in test দ্বিতীয় নিয়মটি মেনে চলে। Command-এর common failure table-ও 208 সমস্যার কথা বলে: exact status assert করুন, যেমন 201, ok() নয়।

Workspace Playwright MCP server-ও register করে, কিন্তু command-টি agent-browser দিয়ে explore করে। কোনো skill বা command কোনো Playwright MCP tool-এর নাম নেয় না।

Take-aways

These points are the tutorial's own advice, from this case study.

  • Build load test data from the business limits. Plan each request in setup, and count a missing slot as a failure, not as a silent skip.
  • Put every pass criterion into a threshold. A failed k6 check alone does not fail the run.
  • If the requirements give no latency target, say so in the README. Do not invent one in a threshold.
  • Give each role its own saved session, check its expiry in code, and keep the file out of git.
  • Check the UI, the API response, and the data in one test. Assert the exact status code.
  • Store the run output, or say clearly that none is stored. One number in a README is not a baseline.

সহজ English

This is the tutorial's own advice, from this case study.

  • Plan the load test data from the business limits in setup. Count a missing slot as a failure.
  • Put every pass criterion into a threshold. A failed k6 check alone does not fail the run.
  • If the requirements give no latency target, write this in the README. Do not invent a target.
  • Give each role its own saved session. Check its expiry in code, and keep the file out of git.
  • In one test, check the UI, the API response, and the data. Assert the exact status code.
  • Store the run output, or say clearly that you did not. One number in a README is not a baseline.

বাংলা ব্যাখ্যা

এগুলো এই case study থেকে পাওয়া tutorial-এর নিজস্ব পরামর্শ।

  • Business limit থেকে load test data তৈরি করুন। প্রতিটি request setup-এ plan করুন, এবং একটি missing slot-কে চুপচাপ skip নয়, failure হিসেবে গণ্য করুন।
  • প্রতিটি pass criterion একটি threshold-এ রাখুন। একটি failed k6 check নিজে থেকে run-কে fail করায় না।
  • Requirement-এ কোনো latency target না থাকলে README-তে তা লিখুন। Threshold-এ নিজে থেকে কোনো target বানাবেন না।
  • প্রতিটি role-কে তার নিজের saved session দিন, code-এ তার মেয়াদ check করুন, এবং file-টি git-এর বাইরে রাখুন।
  • একটি test-এ UI, API response, এবং data, তিনটিই check করুন। Exact status code assert করুন।
  • Run-এর output রাখুন, অথবা পরিষ্কারভাবে বলুন যে কিছু রাখা হয়নি। README-র একটি সংখ্যা baseline নয়।
  1. [1]
    k6 options reference

    Grafana Labs (k6 docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  2. [2]
    k6 test lifecycle

    Grafana Labs (k6 docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  3. [3]
    k6/execution

    Grafana Labs (k6 docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  4. [4]
    k6 thresholds

    Grafana Labs (k6 docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  5. [5]
    k6 checks

    Grafana Labs (k6 docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  6. [6]
    Projects

    Microsoft (playwright.dev) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  7. [7]
    Authentication

    Microsoft (playwright.dev) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  8. [8]
    API testing

    Microsoft (playwright.dev) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  9. [9]
    Web server

    Microsoft (playwright.dev) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  10. [10]
    Extend Claude with skills

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10