A GitHub Workflow for Part-Time Developer Testers and Agents
A lot of people writing test automation aren't doing it all day. They split their time between exploratory testing, refinement meetings, triaging bugs and, somewhere in between, writing Python or Node against an API. That stop-start rhythm is hard on a codebase. You come back to a branch you started days ago, you can't remember what half the changes were for, and the pull request you finally open is a grab bag nobody wants to review.
There's a second pressure now. Coding agents such as GitHub Copilot's coding agent or Claude Code can pick up an issue, write tests and open a pull request while you're in a meeting. That's useful, but it means your repository now has two kinds of part-time contributor: you, and an agent that never gets tired and never remembers context either. The workflow has to work for both.
Here is the GitHub workflow I recommend to testers in that position. It's deliberately small: short branches, commit messages written for your future self, pull requests that a reviewer (or you, a week later) can actually check, and a few guardrails so agent-written changes land through the same gate as yours.
Learn Node.js, Cucumber, GitHub Copilot, APIs, CI/CD, and modern automation by building a complete framework.
One branch per test story, not per sprint
The most common mistake I see from part-time automators is a long-lived branch named after the sprint or after themselves. It collects every half-finished idea for two weeks and turns into a merge nobody wants to touch. The fix is to branch per unit of test work you could describe in one sentence: "add negative tests for the orders endpoint" or "move auth into a fixture".
git switch main
git pull
git switch -c tests/orders-negative-cases
A small branch has three advantages when your time is fragmented. You can finish it in one or two sittings. If you get pulled away for a week, the branch is still easy to understand when you come back. And if it goes stale, you can throw it away without losing anything important.
Use a consistent prefix such as tests/, fix/ or chore/. It costs nothing and makes the branch list readable. If agents open branches in your repository too, they'll usually use their own prefix (Copilot's coding agent uses copilot/, for example), which makes it obvious at a glance which work came from where.
Commit messages that make sense after a three-day gap
When you work in bursts, your commit history is your memory. "wip" and "fix tests" tell you nothing on Thursday about what you did on Monday. I write commit messages for the version of me who has forgotten everything:
Add 422 cases for invalid order quantities
Covers zero, negative and non-integer quantity. The API returns 422
with a field-level error; asserting on the error field, not the message
text, because the copy is still changing.
The subject says what changed. The body says why, and especially why you chose one assertion over another. That last part matters more than it looks: when a test fails months later, the reasoning behind the assertion is what tells you whether the test or the API is wrong.
Commit in small, coherent steps. If you have to stop mid-task, commit what works with a clear message and leave yourself a note in the pull request description about what's left. Don't leave uncommitted changes sitting in your working copy for days; that's how work gets lost.
Pull requests that get reviewed, even when you're the only reviewer
On small teams the tester is often the only person who really understands the test code, so reviews are thin or don't happen. I still open a pull request for every change, even when I merge it myself, because the act of writing the description is a review. I open it as a draft early, so CI runs while I'm still working:
gh pr create --draft --fill
gh pr checks --watch
A useful test PR description answers four questions:
- What behaviour is now covered? In API terms, not file names.
- How did you see it fail? A test you've never seen fail hasn't proven anything. Break the assertion or point it at bad data once before you trust it.
- What did you deliberately not cover? Saves the reviewer guessing.
- Anything flaky or environment-dependent? Say so now rather than in a CI thread later.
When I'm reviewing my own work, I read the diff in the GitHub UI rather than my editor. Seeing it in a different place is surprisingly good at catching the leftover debug print or the hard-coded token.
Letting agents contribute without losing control
Once a coding agent can open pull requests against your test repository, the workflow above becomes the guardrail. The agent works on a branch, its changes arrive as a pull request, CI runs the suite, and a human approves the merge. None of that is new; what's new is that you're the reviewer far more often than you're the author.
A few settings and files make that sustainable:
- Protect
main. Require a pull request, require the test workflow to pass, and require at least one approval. That applies to agents and humans alike, which is the point. - Write repository instructions. Copilot reads
.github/copilot-instructions.md; Claude Code readsCLAUDE.md; other agents have their own equivalent. Put your conventions there once instead of repeating them in every prompt. - Keep agent tasks as small as your own branches. "Add negative tests for POST /orders" produces a reviewable PR. "Improve test coverage" produces a sprawling one.
The instructions file doesn't need to be long. Mine usually looks something like this:
## Test repository conventions
- One behaviour per test; name tests test_<endpoint>_<expected_behaviour>.
- Use the client in tests/api_client.py. No raw requests calls in tests.
- Never weaken or delete an existing assertion to make a test pass.
If the API disagrees with a test, stop and describe the mismatch in the PR.
- Never commit tokens, .env files or real customer data.
- Every PR description must say how each new test was seen to fail.
The "never weaken an assertion" rule is the one I care about most. Left alone, an agent asked to make CI green will sometimes do exactly that: loosen the check, add a skip, or assert on whatever the API currently returns. When reviewing agent PRs, I look at changed assertions before anything else. New tests are cheap to review; a quietly edited old one is where problems hide.
A minimal workflow that runs the suite on every pull request is enough to make the gate real:
name: api-tests
on:
pull_request:
push:
branches: [main]
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 --junitxml=results.xml
If you're unsure where this job should sit relative to deploys and other suites, I cover that in where API tests belong in a CI/CD pipeline, and splitting the run with markers is covered in tagging API tests so CI can run the right subset.
A weekly reset for part-time automators
The last habit is the least technical. Once a week, spend a few minutes on hygiene: delete merged branches, close or rebase anything stale, and skim open agent PRs so they don't pile up. A queue of unreviewed agent pull requests is the new version of the long-lived branch, and it rots the same way.
git fetch --prune
git branch --merged main | grep -v "main" | xargs -r git branch -d
gh pr list --state open
None of this is heavyweight process. It's a small set of habits that make fragmented time productive and make agent contributions safe to accept. For more on the editor and Git side of a tester's day, see my guide to developer workflows for testers. If you'd like to build a full API test project this way, with VS Code, GitHub and Copilot from the first commit, that's what my API testing courses walk through.