Turning a Take-Home Test Into a Portfolio Piece in the AI Era
Most take-home tests die in a private repo the moment the interview process ends. You got the job and moved on, or you didn't and you'd rather forget it. That's a waste. A take-home is already a scoped, realistic automation problem with a deadline and constraints, which is exactly the kind of evidence a hiring manager wants to see. The work is done. What's left is presenting it properly.
AI tools change what "presenting it properly" means. A reviewer looking at a take-home today knows Copilot or a coding agent could have written most of the tests. So the suite alone doesn't tell them much. What they want to know is what you decided, what you checked, and whether you can tell a test that protects behaviour from one that merely passes. A take-home is a good place to show that, because the constraints are written down and your choices against them are easy to explain.
Here's what I'd do after submitting: get permission to share it, clean it up without erasing the story, be open about AI use, and write a README that does the interviewing for you.
Learn Python, Behave, GitHub Copilot, APIs, and CI/CD by building a real framework you can finish in a weekend.
Check you're allowed to publish it
Before anything else, read the terms the company gave you. Some take-homes are explicitly confidential, some use a private API or internal data, and some companies reuse the same exercise for every candidate. If in doubt, ask. A short, polite email asking whether you can publish your solution is normal, and the worst outcome is a no.
When you can publish, strip anything that identifies the company or its systems: names, internal URLs, real credentials, and the original prompt if they'd rather it stayed private. Restate the problem in your own words instead. If the target was the company's own API, point the suite at a public API or a small mock with the same shape, so the repo still runs for a reviewer.
Clean up without erasing the story
The instinct is either to leave it exactly as submitted or to rewrite it. Neither is right. Aim for a deliberate cleanup that keeps your problem-solving visible.
Start with history. Squashing everything into one commit throws the process away. Instead, tidy the noise ("asdf", "why won't this work") with an interactive rebase, but keep meaningful checkpoints: scaffold, auth handling, negative cases, CI. Then fix the shortcuts that made sense at midnight:
- Hardcoded URLs and credentials move to environment variables, with a
.env.examplecontaining placeholders. - Copy-pasted setup moves into fixtures or a client helper.
- Happy-path-only coverage gets at least one 4xx case, one boundary input and one check of an error body, not just a status code.
- Magic values like
assert body["id"] == 4829get a name and an explanation, or get replaced by data the test creates itself.
The goal is intentionality. Every choice should look deliberate, including "I kept this simple because the scope didn't justify more". That kind of restraint reads as experience.
If an agent helps with the cleanup, prove the tests can still fail
Using Copilot or an agent to refactor duplicated setup into fixtures is a reasonable use of it. The risk is a refactor that keeps every test green because the tests stopped checking anything. A fixture returns the wrong object, an assertion gets loosened, or a test is no longer collected at all.
So after any assisted refactor, I check two things. First, the test count before and after is the same:
pytest --collect-only -q | tail -n 1
Second, the tests still fail when the behaviour is wrong. Temporarily break the thing each important test guards (point the mock at a wrong status, remove a required field from a stub response) and confirm the right tests go red. It takes minutes and it's the most convincing quality check you can describe in an interview. My general approach to supervising assistant output is in using GitHub Copilot to draft test cases safely.
Be open about AI use
Take-home rules on AI vary. Some allow it, some forbid it, many don't say. Whatever the rules were, follow them, and say in the README what you did. If you used an assistant, describe how: what it drafted, what you reviewed, and something you changed. "Copilot generated assertions against the full response body. I replaced them with schema checks and the two business rules the brief specified, because the full-body assertions would fail on any harmless field addition." That shows exactly the judgement a reviewer is looking for.
If you set up a .github/copilot-instructions.md or similar file to steer the assistant, commit it. It shows you know how to direct a tool, not just accept what it gives you.
Write the README that does the interviewing
A README that says "run pytest" tells a reviewer nothing about how you think. This structure turns the repo into a conversation:
- Problem statement. Two or three sentences in your own words: what was under test and what constraints you had (time box, framework, no external libraries).
- What I tested and why. The most important section and the one almost nobody writes. Why auth before pagination? Why check the error body and not just the code?
- Structure. Fixtures, data separated from logic, a client layer. Name the choices briefly.
- How to run it. Prerequisites, environment variables, one command.
- How I used AI. As above, short and specific.
- What I'd do with more time. Contract tests for the schema, token-expiry cases, a pass-rate test if the system had a model-backed feature. This shows you know where the gaps are.
Keep it short. A README longer than the test suite is its own problem. For turning these sections into spoken answers, see talking about test automation work in a technical interview.
Add CI so it runs for anyone
A small GitHub Actions workflow makes the repo feel like a project rather than homework, and the status badge GitHub offers for it shows it's green:
name: tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -r requirements.txt
- run: pytest -q -m "not live_api"
Keep live calls out of the default run so the badge reflects your tests, not someone else's API uptime. The same thinking scales up to real pipelines, as I cover in where API tests belong in a CI/CD pipeline.
Connect it to the rest of your work
A single polished take-home helps. A portfolio where pieces reinforce each other helps more. Mention in each README where you use the same patterns elsewhere. Pull a genuinely reusable helper into its own small repo. Make the occasional small improvement so the project stays alive. The same principles apply to personal projects, which I cover in turning a side project into a testing portfolio piece.
You already did the hard part under time pressure. A few hours of deliberate cleanup, with permission, an honest account of your tools and a clear README, turns it into lasting evidence of how you work. If you'd like a full project to practise these habits on, my API testing courses build one step by step with GitHub Copilot.