QA Interview
SDET Take Home Assignment Examples (2026)
Study SDET take home assignment examples with realistic API, UI, CI, test strategy, scoring rubrics, model answers, and runnable 2026 code for interviews.
28 min read | 4,562 words
TL;DR
The best SDET take home submission is small, reproducible, risk-driven, and easy to review. Deliver a working critical path, focused negative coverage, clean diagnostics, CI execution, and a README that makes assumptions and tradeoffs explicit.
Key Takeaways
- Treat the assignment as a small engineering delivery with explicit scope, risks, evidence, and tradeoffs.
- Prioritize a reliable critical path, meaningful API and UI assertions, and diagnostics over a large test count.
- Document assumptions and deferred work so reviewers can distinguish deliberate scope from an overlooked requirement.
- Keep secrets outside the repository and make setup reproducible with one install command and one test command.
- Use stable locators, state-based waits, isolated data, and bounded retries to demonstrate deterministic automation.
- Submit concise failure artifacts and a readable README that lets a reviewer reproduce results quickly.
- Prepare to defend one tradeoff, diagnose one failure, and explain the next improvement after submission.
sdet take home assignment examples usually ask you to automate a small web or API workflow, review defective test code, or design a test approach under a time limit. The winning submission is not the one with the most files. It is the one a reviewer can install, run, understand, and trust.
This guide gives you realistic prompts, runnable Playwright and Node.js examples, and model answers for the questions that follow the exercise. Use the examples as practice briefs, then adapt the design to the target product, stack, and stated evaluation criteria.
You should also rehearse the broader SDET interview questions guide because the take-home defense often becomes a live discussion about framework design, debugging, APIs, and risk. When you want a timed rehearsal, open the SDET practice workspace and explain each decision aloud.
TL;DR
| Assignment type | Minimum credible delivery | Evidence reviewers expect | Common trap |
|---|---|---|---|
| API automation | Critical happy path, contract checks, negative cases | Request-safe logs and assertion diffs | Checking only status codes |
| Web UI automation | One stable user journey plus a boundary case | Trace, screenshot, or HTML report | Brittle CSS chains and sleeps |
| Framework exercise | Clear structure and one useful abstraction | Tests for custom utilities | Building layers with no demonstrated need |
| Test strategy | Risks, scope, environments, data, and exit criteria | Prioritized coverage matrix | Listing generic test types |
| Debug or review task | Root cause, focused patch, regression proof | Before-and-after failure evidence | Rewriting unrelated code |
| CI task | Reproducible command, caching, and artifacts | Passing workflow plus failure artifacts | Hiding failures with retries |
A practical sequence is inspect -> clarify -> timebox -> implement the highest-risk path -> add diagnostics -> run from a clean state -> document tradeoffs. Reserve the final 15 to 20 percent of the allowed time for clean-install verification and README work.
1. SDET Take Home Assignment Examples: Formats and Expectations
Q: What does a typical SDET take home assignment contain?
A typical brief provides a small application or API, two to five required scenarios, a preferred language, and submission instructions. It may also request a README, CI workflow, defect notes, or a short test strategy. Translate every requested artifact into a checklist before writing code so that a polished framework does not distract you from a missing deliverable.
Q: How much work should you submit for a four-hour assignment?
Aim for one complete critical workflow, two or three high-value variations, deterministic setup, and useful failure output. Four hours is not enough for a universal framework, broad cross-browser coverage, performance testing, and exhaustive negative cases. State what you deliberately deferred, estimate the next increment, and stop when the documented timebox expires.
Q: Should you use the company's preferred language or your strongest language?
Use the requested stack when the brief makes it mandatory because following constraints is part of the evaluation. If the language is optional, select the one in which you can deliver readable automation, tests for helpers, and reliable setup without learning basic syntax during the exercise. Mention the choice in the README and connect it to execution speed, team maintainability, or available tooling rather than personal comfort alone.
Q: Is a large framework more impressive than a small test suite?
A large structure earns little credit when its abstractions serve only one test or make failures harder to trace. Reviewers generally learn more from a compact suite with clear boundaries, typed data, specific assertions, and one justified reusable component. Add a layer only when it removes real duplication, isolates volatility, or improves diagnostics in the submitted scenarios.
Q: What product knowledge should appear in the solution?
Show that you identified the user's goal, the irreversible actions, the important business rules, and the most likely failure boundaries. For a checkout task, asserting that the order confirmation contains the selected item and total is more valuable than checking that a generic success heading exists. Include one short risk note that explains why your chosen scenarios protect revenue, data integrity, access, or customer trust.
2. Scope, Assumptions, and the First 30 Minutes
Q: What should you do immediately after receiving the brief?
Run the application manually and record the exact environment, credentials mechanism, and observable workflow before choosing a framework shape. Build a requirement table with columns for requested behavior, test level, priority, and completion status. This first pass exposes blocked dependencies and lets you ask a narrow clarification while there is still time to adjust.
Q: How should you handle an ambiguous requirement?
Write the ambiguity as a concrete decision, such as whether a duplicate email returns 409 or updates an existing account. Ask the contact if communication is allowed, but continue with a stated assumption and make the assertion easy to change. A reviewer can evaluate transparent reasoning; they cannot evaluate an unstated guess hidden inside a magic value.
Q: How do you create a realistic timebox?
Split the available window into reconnaissance, critical implementation, supporting coverage, CI and reporting, then final reproduction. Give the critical test a hard checkpoint near the first third of the schedule so you still have a deliverable if a tool issue appears later. Cut optional browser matrices and cosmetic refactors before cutting clean setup, meaningful assertions, or documentation.
Q: Where should assumptions be documented?
Place a short Assumptions and Decisions section near the top of the README, not in a buried code comment. Tie each assumption to its effect, for example, Orders are immediately consistent, so the test reads the order after POST without polling. When code depends on the decision, add a local comment only if the reason would otherwise be surprising.
Q: How do you turn the brief into a coverage matrix?
Map each business risk to the lowest test level that can provide dependable evidence. Use columns for risk, scenario, API or UI level, data need, oracle, and priority, then select the smallest set that covers distinct failure modes. The test strategy writing guide provides a deeper model for connecting scope to risks and exit criteria.
3. API Automation Assignment Example
A common exercise asks you to validate read and create operations, demonstrate negative coverage, and keep the suite runnable without a global Playwright installation. The following setup uses the official @playwright/test package and JSONPlaceholder, a public fake REST service. In a real assignment, point baseURL at the supplied environment and replace example fields with its documented contract.
Create the project and install current packages:
npm init -y
npm install --save-dev @playwright/test@latest typescript@latest @types/node@latest
Add playwright.config.ts:
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './tests',
fullyParallel: true,
reporter: [
['list'],
['html', { open: 'never', outputFolder: 'playwright-report' }],
],
use: {
baseURL: process.env.API_BASE_URL ?? 'https://jsonplaceholder.typicode.com',
trace: 'retain-on-failure',
},
});
Add tests/posts-api.spec.ts:
import { test, expect } from '@playwright/test';
test('reads a post with contract-relevant fields', async ({ request }) => {
const response = await request.get('/posts/1');
expect(response.status()).toBe(200);
const post = await response.json();
expect(post).toEqual(
expect.objectContaining({
id: 1,
userId: expect.any(Number),
title: expect.any(String),
body: expect.any(String),
}),
);
expect(post.title.length).toBeGreaterThan(0);
});
test('creates a post and returns the submitted values', async ({ request }) => {
const payload = { title: 'Assignment note', body: 'API evidence', userId: 7 };
const response = await request.post('/posts', { data: payload });
expect(response.status()).toBe(201);
const created = await response.json();
expect(created).toEqual(expect.objectContaining(payload));
expect(created.id).toEqual(expect.any(Number));
});
Verify the API example with npx playwright test tests/posts-api.spec.ts. The command should report two passed tests and create playwright-report/index.html. For more service-level scenarios, use the API testing interview questions as a prompt bank.
Q: Which API scenarios belong in a small submission?
Cover one representative success path, one authorization or validation failure, one boundary with business meaning, and one read-back or state-transition check when the service supports it. Choose scenarios that exercise different risks instead of repeating the same endpoint with cosmetic value changes. If time remains, add concurrency, idempotency, or pagination based on the API's responsibilities.
Q: Why is checking only the HTTP status insufficient?
A 200 response can contain the wrong entity, stale state, a partial payload, or an error encoded in the body. Assert stable contract fields, business values, relevant headers, and the relationship between the request and returned state. Avoid asserting every volatile field because timestamps, generated identifiers, and optional metadata can turn harmless changes into noisy failures.
Q: How should a create test verify persistence?
Capture the server-generated identifier, retrieve the resource through an independent read endpoint, and compare the fields whose persistence matters. If the system is eventually consistent, poll a documented state with a total deadline and log each observed state rather than sleeping for a fixed duration. Delete the record through an approved cleanup path or use isolated data that expires safely.
Q: How do you test API authentication without exposing secrets?
Read the token from an environment variable or CI secret store and fail with a clear setup message when it is absent. Log the authentication scheme and response status, but redact token values, cookies, and sensitive response fields from reports. Submit an .env.example containing variable names only, and confirm the real .env is ignored before creating the archive.
Q: What should an idempotency test prove?
Send the same operation twice with the same idempotency key and verify that the business effect occurs once. Compare the documented response identifiers or final resource count, while recognizing that the second status code may differ by contract. Then send the equivalent payload with a new key to show that the server distinguishes a legitimate second operation from a transport retry.
4. Web UI Automation Assignment Example
The UI portion should demonstrate accessible locators, state-based synchronization, and assertions tied to user-visible behavior. Add the following self-contained test as tests/cart-ui.spec.ts; it uses page.setContent, so the interaction is runnable without depending on a changing demo site.
import { test, expect } from '@playwright/test';
test('adding an available item updates the cart status', async ({ page }) => {
await page.setContent(`
<main>
<h1>Catalog</h1>
<button id="add-keyboard">Add keyboard</button>
<p role="status">Cart: 0 items</p>
</main>
<script>
document.querySelector('#add-keyboard').addEventListener('click', () => {
document.querySelector('[role=status]').textContent = 'Cart: 1 item';
});
</script>
`);
await page.getByRole('button', { name: 'Add keyboard' }).click();
await expect(page.getByRole('status')).toHaveText('Cart: 1 item');
});
Install the browser once with npx playwright install chromium, then verify the UI example using npx playwright test tests/cart-ui.spec.ts. If the brief expects a larger architecture, study the Playwright TypeScript framework tutorial after you have the critical path working.
Q: Which UI flow makes the strongest first test?
Select a short journey that crosses an important business boundary, such as sign-in followed by access to protected content or cart checkout followed by order confirmation. Keep the path narrow enough that a failure identifies a meaningful area rather than traversing the entire product. Add a precondition through an API or fixture when the setup itself is not what the exercise asks you to test.
Q: How should you choose Playwright locators?
Prefer getByRole with an accessible name for interactive controls, followed by label, placeholder, text, or an explicit test ID when semantics are unavailable. Avoid long CSS ancestry and positional selectors because layout changes can break them without changing behavior. If the application lacks a stable contract, document the issue and propose an accessible name or test attribute rather than hiding brittleness in a page object.
Q: What replaces fixed sleeps in a reliable UI test?
Wait for the state that proves readiness, such as a response, visible confirmation, enabled control, URL, or persisted value. Playwright assertions retry until their timeout, so await expect(locator).toHaveText(...) is preferable to delaying before reading text. When no observable state exists, identify that testability gap instead of scattering waitForTimeout calls.
Q: How do you demonstrate that a UI test is not flaky?
Run the focused spec repeatedly from clean state, vary execution order, and inspect traces for hidden dependencies. A local command such as npx playwright test tests/cart-ui.spec.ts --repeat-each=10 provides useful evidence, although ten passes do not prove permanent stability. Explain how data isolation, locator contracts, bounded waits, and cleanup address known sources of nondeterminism.
Q: How much cross-browser testing belongs in the assignment?
Use the browser explicitly requested and add another engine only when the product risk or rubric values compatibility. A three-browser matrix can consume time while multiplying identical failures from an environment issue. Describe the intended production matrix in the README, but keep the submitted default command fast enough for a reviewer to run.
5. Framework and Utility Design Assignment
Framework tasks often reveal whether you can separate test intent from mechanics without creating a maze of base classes. A useful custom utility should have its own unit tests. This retry helper uses standard JavaScript and retries only errors accepted by the caller's classifier.
Add src/retry.mjs:
export async function retry(
operation,
{ attempts = 3, delayMs = 0, shouldRetry = () => false } = {},
) {
if (!Number.isInteger(attempts) || attempts < 1) {
throw new RangeError('attempts must be a positive integer');
}
let lastError;
for (let attempt = 1; attempt <= attempts; attempt += 1) {
try {
return await operation(attempt);
} catch (error) {
lastError = error;
if (attempt === attempts || !shouldRetry(error)) throw error;
if (delayMs > 0) await new Promise((resolve) => setTimeout(resolve, delayMs));
}
}
throw lastError;
}
Add tests/retry.test.mjs:
import test from 'node:test';
import assert from 'node:assert/strict';
import { retry } from '../src/retry.mjs';
test('retries classified transient errors and returns the result', async () => {
let calls = 0;
const result = await retry(
async () => {
calls += 1;
if (calls < 3) throw new Error('temporary');
return 'ready';
},
{ attempts: 3, shouldRetry: (error) => error.message === 'temporary' },
);
assert.equal(result, 'ready');
assert.equal(calls, 3);
});
test('does not retry an unclassified failure', async () => {
let calls = 0;
await assert.rejects(
retry(
async () => {
calls += 1;
throw new Error('invalid input');
},
{ attempts: 3, shouldRetry: () => false },
),
/invalid input/,
);
assert.equal(calls, 1);
});
Verify this utility independently with node --test tests/retry.test.mjs. It should report two passing tests without launching a browser.
Q: What folder structure is appropriate for a small automation task?
Separate executable tests, focused support code, and fixtures only when each category actually exists. A practical layout might contain tests/, src/ for utilities or page components, playwright.config.ts, and a top-level README. Deep folders such as core/base/factory/manager add navigation cost unless the submitted design has multiple implementations that require them.
Q: When is a page object justified?
Create a page or component object when several tests share a stable interaction vocabulary or when selectors are genuinely volatile. Keep assertions about business outcomes in the test unless the object exposes a meaningful domain check used consistently. A one-test assignment may be clearer with local locators than with a class containing one method per click.
Q: How should test data be modeled?
Use typed builders or small fixtures that produce valid defaults and let each test override only the field under examination. Generate unique identifiers predictably, record the seed if randomness is involved, and avoid shared mutable accounts across parallel workers. Separate secrets from scenario data so examples remain safe to commit and easy to understand.
Q: Why is a generic retry wrapper dangerous?
Blind retries can convert deterministic defects into slow, intermittent passes and can repeat non-idempotent business actions. Require an explicit error classifier, a bounded attempt count, and a clear statement that the operation is safe to repeat. The submitted retry helper demonstrates this policy by refusing to retry unless shouldRetry approves the caught error.
Q: Which framework code deserves unit tests?
Test logic that transforms data, calculates expected values, classifies errors, polls state, or controls retries because defects there can invalidate many scenarios. Simple locator wrappers rarely need isolated tests when an end-to-end spec already exercises them. Focus utility tests on boundary values and failure semantics, not only the successful return path.
6. Test Strategy and Coverage Assignment
Q: How do you prioritize tests when requirements exceed the timebox?
Rank scenarios by impact, likelihood, change exposure, and how cheaply a lower-level test can detect the failure. Cover irreversible payments, authorization boundaries, and data corruption before cosmetic layout variants. Show the deferred list with reasons so reviewers can see a risk decision rather than an accidental omission.
Q: What makes a negative test valuable?
A useful negative case targets a defined rule and asserts the system's safe response, not merely that something fails. For an upload endpoint, choose an oversized file, disallowed content type, or mismatched declared type and confirm that no record or object is created. Include the expected error contract and verify that sensitive implementation details do not leak to the client.
Q: How should database validation be used?
Query storage when persistence is the behavior under test or when an independent oracle is necessary to diagnose an API result. Avoid coupling every UI test to internal tables because schema changes can break tests that should care only about public behavior. Use read-only access, unique keys, explicit cleanup, and narrow queries that identify the exact record.
Q: Should accessibility and performance appear in a functional assignment?
Mention both when they materially affect the supplied feature, then implement a focused check if the timebox and tools support it. A keyboard path, accessible name assertion, response budget, or payload-size observation is more credible than claiming full WCAG or load coverage. Distinguish a quick automated signal from a complete accessibility audit or statistically sound performance test.
Q: How do you prove requirement traceability without heavy tooling?
Give each requested behavior a short identifier in the coverage table and reference that identifier in the test title or README result list. This lightweight mapping lets a reviewer see which requirements are automated, explored manually, or deferred. Do not copy the entire prompt into test names, because long titles obscure the behavior and produce unreadable reports.
7. CI, Reporting, and Reproducibility Assignment
A submission should behave the same on a reviewer's machine and in CI. The following GitHub Actions job uses official actions, installs dependencies from the lockfile, installs Chromium with operating-system dependencies, executes the shared Playwright configuration, and preserves the HTML report on failure.
name: assignment-tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
if-no-files-found: ignore
Save it as .github/workflows/tests.yml, commit package-lock.json, and push to a practice repository to verify the workflow. The expected result is a passing test job with a downloadable playwright-report artifact; the guide to adding CI to a test framework covers branch policies and other providers.
Q: What must the default test command do?
It should run the intended reviewer suite with no hidden editor task, local global package, or manual file edit. Keep optional tags and broader matrices documented separately so npm test or the stated equivalent remains predictable. Return a nonzero exit code on failure and print enough context to locate the report.
Q: Which artifacts are useful after a failure?
Preserve the HTML report, trace for the failed test, and a screenshot or video only when it improves diagnosis. Include safe request metadata and console output for relevant service or browser failures, while redacting credentials and personal data. Short retention and failure-only capture keep CI storage reasonable without removing the evidence a reviewer needs.
Q: How should tests be parallelized?
Begin with isolated data and independent test state, then enable worker parallelism and confirm the suite passes under repeated execution. Partitioning dependent tests across workers creates speed at the cost of nondeterministic ordering bugs. If a constrained shared account forces serialization, document the limitation and identify the data or environment change required to remove it.
Q: What is an acceptable flaky-test policy in the assignment?
Do not hide instability behind several CI retries. One retry can collect evidence when the rubric permits it, but report the initial failure and explain the suspected source. Quarantine only with an owner, reason, and removal condition; a permanently skipped critical test is not coverage.
Q: How should a CI quality gate be chosen?
Fail the workflow when required tests fail, setup is incomplete, or the test command crashes. Treat optional lint, broader browser checks, and experimental scenarios according to the brief rather than inventing arbitrary percentage thresholds. A simple all-required-tests gate is easier to defend than a coverage number that does not represent business risk.
8. Debugging and Code Review Assignment
Q: How should you approach a deliberately flaky test?
Reproduce it with traces and controlled repetition, then classify whether the instability comes from data, timing, selectors, environment, or the product. Replace guesses with an observable condition and verify the patch against the smallest failing scenario plus nearby regression cases. Record the original symptom and root cause so the reviewer can distinguish diagnosis from random editing.
Q: What is wrong with catching every exception in test code?
A broad catch that logs and continues can turn a broken setup or failed assertion into a false pass. Catch only when you can add context, perform guaranteed cleanup, or translate a known error while preserving the original cause. Let the runner receive unexpected failures so exit status and reports remain trustworthy.
Q: How do you review a fixed delay such as five seconds?
Identify the state the delay is trying to approximate and wait for that state with a bounded timeout. A fixed five seconds is simultaneously too slow when the event completes quickly and too short when the environment is legitimately slower. Ask for trace or timestamp evidence before changing the timeout value, because increasing it may only conceal the missing synchronization contract.
Q: What race conditions commonly appear in test frameworks?
Parallel tests often reuse the same account, output filename, database record, download folder, or mutable singleton. Look for read-modify-write sequences and cleanup that can delete another worker's data. Prove the fix with worker-specific identifiers, atomic server operations where needed, and a repeated parallel run rather than a single green execution.
Q: How should code review feedback be presented?
Lead with correctness and risk, name the exact file or behavior, and propose the smallest verifiable change. Separate blocking issues such as swallowed failures or exposed secrets from optional naming preferences. Include a test or reproduction for important findings so the author can confirm both the defect and the repair.
9. README, Evidence, and Submission Quality
Q: What belongs in the assignment README?
Include the tested scope, prerequisites, exact install and run commands, environment variables, project structure, assumptions, results, and deferred work. Add a short design rationale for choices that a reviewer might reasonably question, such as API setup or a custom retry policy. Keep troubleshooting limited to failures you actually encountered instead of pasting a generic framework manual.
Q: How much execution evidence should you attach?
Provide a CI link or concise terminal result plus the generated report path, and attach a trace or screenshot for an illustrative failure only if allowed. Do not commit huge videos, browser binaries, dependency folders, or reports containing tokens. Evidence should help reproduce and diagnose the suite, not inflate the repository.
Q: Does commit history matter in a take-home task?
A few purposeful commits can show progression from setup to critical path, supporting checks, and documentation. Reviewers do not need dozens of keystroke-sized commits, and a single final dump loses useful context. Never rewrite history solely to manufacture a story; clear current code and reproducible results remain the primary evidence.
Q: How should incomplete work be disclosed?
Name the exact unfinished behavior, why it was deferred, and the next concrete step. Distinguish a blocked item from a timebox choice, and never mark a placeholder test as coverage. Honest scope control demonstrates engineering judgment, especially when the core path is complete and reliable.
Q: How should AI assistance be handled?
Follow the employer's stated policy and disclose material assistance when requested. You remain responsible for every API call, assertion, license, and design decision in the repository, so run all generated code and remove irrelevant scaffolding. Never paste proprietary prompts, application data, credentials, or confidential source into an unapproved service.
Before submitting, compare the README and repository against strong QA portfolio GitHub examples. You can also upload your resume at QAJobFit Resume Studio and make sure the project is described with measurable evidence rather than a tool list.
10. SDET Take Home Assignment Examples: Interview Questions and Answers
Q: How would you walk an interviewer through your submission in five minutes?
Start with the product risk and the exact scope you completed, then run or show the critical test. Explain one design choice, one diagnostic artifact, and one limitation with its next step. Finish by inviting the interviewer to select a test or failure for deeper inspection rather than touring every folder.
Q: Which tradeoff should you be ready to defend?
Choose a decision that affected reliability or review cost, such as API-based setup instead of UI setup, a single browser instead of three, or a local helper instead of a framework dependency. State the constraint, alternatives considered, and evidence that the selected option met the brief. Also describe the condition under which you would reverse that decision in production.
Q: What should you do if a test fails during the review call?
Read the runner output, preserve the trace, and reproduce the smallest failing case before editing. Narrate what the evidence confirms and what remains a hypothesis, then make a focused change only when the root cause is clear. A calm diagnostic sequence often demonstrates more SDET skill than an uninterrupted green demo.
Q: What would you add with one more hour?
Pick the highest residual risk from the deferred list and describe a deliverable, not a vague promise to add more tests. For example, add an unauthorized update scenario with API-created data and confirm that the original record is unchanged. Estimate the setup, implementation, and verification work so the answer shows prioritization as well as technical awareness.
Q: How would you productionize the assignment?
Move environment configuration and secrets into approved CI controls, define owned test data, and connect required checks to merge policy. Add observability, failure triage, dependency update automation, and a browser or service matrix based on actual release risk. Establish owners and maintenance expectations before scaling the suite, because unattended automation quickly becomes untrusted noise.
The separate interviewQnA collection below gives you additional concise prompts for mock practice. For reporting choices you may be asked to defend, review the Allure reporting guide.
11. How Interviewers Grade Your Answers
Most reviewers use an explicit or informal rubric. They rarely award equal weight to every file, so optimize first for correctness, reproducibility, and reasoning. A concise scorecard can look like this:
| Area | Strong evidence | Weak evidence | Illustrative weight |
|---|---|---|---|
| Correctness | Tests prove requested behavior and fail for the right reason | Green checks assert incidental text | 25% |
| Risk coverage | Scenarios protect distinct business or technical risks | Many near-duplicate happy paths | 15% |
| Reliability | Isolated data, observable waits, stable selectors | Shared state, sleeps, broad retries | 15% |
| Code quality | Clear names, focused abstractions, tested utilities | Premature layers and hidden control flow | 15% |
| Diagnostics | Actionable diffs, trace, safe logs, CI artifact | Failure says only expected true |
10% |
| Reproducibility | Clean install and one documented command | Undeclared globals and local paths | 10% |
| Communication | Assumptions, tradeoffs, and deferred work are explicit | Reviewer must infer scope and decisions | 10% |
These percentages are an example, not a universal company standard. Use the rubric in the brief when one is supplied. During your final review, score each area using repository evidence and fix the weakest high-weight category before polishing low-risk formatting.
Interviewers also evaluate how you respond to challenge. A credible candidate can identify an assertion's oracle, explain why a wait is deterministic, and change direction when new evidence invalidates an assumption. Avoid defending every choice as permanent; good engineering decisions are conditional on constraints.
12. Common Mistakes
- Automating every visible step through the UI even when API setup would be faster and more stable.
- Asserting a status code or page title without proving the requested business result.
- Building generic factories, base classes, and managers that have only one consumer.
- Using hard-coded sleeps, shared accounts, or fixed output filenames under parallel execution.
- Retrying all exceptions and reporting the final pass without the initial failure evidence.
- Committing tokens, cookies,
.envfiles, personal data, or unredacted request logs. - Requiring global tools or undocumented manual setup on the reviewer's machine.
- Omitting negative coverage while adding low-value browser or data permutations.
- Writing a README that lists technology but never states scope, assumptions, or tradeoffs.
- Submitting skipped placeholders as though they were completed tests.
- Changing unrelated application code during a focused review or debugging task.
- Claiming exhaustive accessibility, security, or performance coverage from one lightweight check.
Run the project from a fresh clone or clean temporary directory before delivery. Confirm the install command, required environment names, default test command, exit status, artifact path, ignored files, and README match the actual repository. This rehearsal catches more submission failures than another cosmetic abstraction.
13. Conclusion
Use these SDET take home assignment examples to practice finishing a narrow, defensible engineering task under a real timebox. A strong submission connects risks to scenarios, executes reliably, protects secrets, produces useful failure evidence, and makes every important assumption visible.
Build the API and UI samples, run the utility tests, and push the CI workflow to a disposable practice repository. Then rehearse the five defense questions without notes. Your goal is not to look like you had unlimited time; it is to prove that you can make sound quality decisions when time, evidence, and product risk are constrained.
Interview Questions and Answers
How did you decide which scenario to automate first?
I ranked the requested behaviors by business impact, likelihood, and dependency cost. I implemented the shortest path through the highest-risk behavior first, then added a distinct negative case. This ensured the timebox produced a complete and defensible delivery.
Why did you choose Playwright for this assignment?
The task required both browser and API checks, and Playwright provides supported fixtures for both in one runner. Its locator assertions, trace viewer, and isolated browser contexts addressed reliability and diagnosis needs. I would reconsider the choice if the team's supported language or application platform required another tool.
How did you prevent test data collisions?
Each test creates data with a worker-aware unique key and avoids mutating a shared account. Cleanup targets only records created by that test, and parallel workers use separate output paths. I also run the suite repeatedly in parallel to expose residual coupling.
Why did you avoid fixed waits?
Fixed delays estimate timing instead of observing readiness. I wait for the response, visible state, URL, or persisted value that proves the workflow advanced, with an explicit total timeout. This reduces wasted time and produces a more meaningful timeout failure.
How do your API assertions avoid overfitting?
I assert the documented status, required contract fields, types, and business values related to the request. I do not snapshot generated timestamps or optional metadata unless they are part of the behavior. This keeps real regressions visible without coupling the test to harmless payload changes.
What does your retry policy allow?
Retries require a classified transient error, bounded attempts, and an operation that is safe to repeat. Assertion failures and validation errors are not retried. The helper is unit-tested for eventual success and immediate propagation of unclassified failures.
How would you investigate a CI-only failure?
I would compare runtime versions, environment variables, resources, locale, clock, network access, and execution order against local runs. Then I would inspect the retained trace and logs and reproduce inside the same container or runner image. I would fix the confirmed environmental or synchronization cause instead of simply raising the timeout.
Why did you automate setup through the API?
The test's purpose was to verify the checkout UI, not account registration or catalog administration. API setup creates the required state faster and with fewer unrelated failure points. I still validate the user-visible precondition before performing the checkout action.
How would you scale this suite across browsers?
I would first confirm data isolation and stable behavior on the required browser. Then I would define Playwright projects for the browser engines justified by production usage and shard independent tests in CI. Failure artifacts would retain the project name so compatibility defects remain diagnosable.
What security checks did you include?
I covered the relevant authorization boundary and confirmed that rejected operations did not change stored state. Secrets come from environment or CI controls and are redacted from artifacts. I describe these as focused functional security checks, not a complete penetration test.
What is the weakest part of your current submission?
The shared test environment limits destructive parallel scenarios, so those cases currently run serially. The next improvement is isolated tenant data with an API cleanup contract, followed by a repeated multi-worker run. Naming this limitation is more accurate than presenting serialization as the final architecture.
How do you know the tests fail for the right reason?
I temporarily violate each important precondition or expected value and inspect the resulting assertion and artifact. The message identifies the business state, relevant identifier, expected value, and observed value without exposing secrets. I also keep setup failures separate from product assertions so a broken environment cannot masquerade as a regression.
Frequently Asked Questions
How long should an SDET take home assignment take?
Follow the employer's stated limit and record your actual time. If no limit is provided, ask for an expectation before starting and define a reasonable timebox in the README rather than expanding the task indefinitely.
What should I submit with an SDET automation assignment?
Submit source code, dependency lockfile, configuration, a concise README, and any requested CI or report artifacts. Exclude dependencies, browser binaries, secrets, personal data, and oversized generated evidence.
Should a take-home assignment include both API and UI tests?
Include both only when the brief or product risk supports them. A focused API setup plus one critical UI journey can be effective, but two incomplete layers are weaker than one reliable required layer.
How many test cases are enough for an SDET take home?
There is no universal count. Choose a small set that covers the critical success path, a meaningful validation or authorization failure, and the highest-risk boundary, then document what remains.
Can I use Playwright for an SDET take home test?
Yes, when the stack is allowed and the assignment involves browser or HTTP automation. Use official Playwright APIs, commit the lockfile, document browser installation, and keep the default command reproducible.
Should I include bugs found during the assignment?
Yes, report reproducible product defects separately from automation failures. Provide steps, expected and actual behavior, environment, evidence, and impact without changing the test oracle merely to make the suite pass.
What if I cannot finish the take-home assignment?
Submit the working core, clearly identify unfinished requirements, and explain the next implementation and verification step. Do not disguise placeholders or skipped tests as completed coverage.