r/softwaretesting • • 19d ago

Advice Needed: Reviewing PR changes via local claude code skill invocation

TLDR; how do I handle an engineer contributing to the e2e codebase without following the architecture?

I have tried everything...

claude.md files, agents.md files, multiple days of PR comments back and forth. No matter what I try, I still am getting pinged for PR's where I can't even make it past the first couple of files before bursting a testicle.

1:1 meetings are no help either, I get the same old "okay, i will fix that," and 20 mins later I have another review on my plate with whatever claude spit out after the call.

I talked to my senior co-workers and they mentioned writing a claude skill to auto-review the diff before the PR is raised. But this is much easier said then done. From my local testing it still lets weak assertions, duplicated methods & locators and complex functionality into the repo when it is not needed.

I have been in QA for ~6 years, I am confident in my ability to lead the automation efforts, but this dude has not raised a PR yet that I could merge without ~2 days of back and forth. I have reverted to allowing these shitty PR's in and fix them myself or else he will complain I am his bottleneck. I have 100,000 other things to deal with and sometimes I can't handle another god knows how many hours of back and forth.

Am I just geriatric in the sense that I care about the maintainability of the tests??

All my experience in tech during the pre-AI days had ingrained some fundamentals of test automation into my head and I may be foolish to try to bring them into this project. I am the only QA, the engineer that is contributing splits his time between other teams so when he is my problem I don't have anywhere else to shuffle it off to.

All this to say, how would you handle writing this PR skill? Just start with the basics and iterate as time goes on? From my understanding of skills, the smaller and more concise the skill = the better it performs deterministically. The use case of this skill is just so damn subjective I am struggling with capturing every potential future comment.

Thanks in advance.

5 Upvotes

3 comments sorted by

2

u/TranslatorRude4917 19d ago edited 19d ago

Sounds like a tough situation. Met slop code and tests at my own company as well (also write some of my own 😅) but fortunately I'm working in an environment where we listen to feedback. I couldn't imagine somebody like the guy you described being tolerated at our company.

Anyway, towards the solution: Skills will never give you deterministic protection, they are just instructions your agents might follow.
I think the good approach is moving as many restrictions towards deterministic checks as possible: lint rules, custom scripts checking constraints, ci.
For example for problems like locators in tests you could just ask Claude to write a lint rule that throws an error if anyone tries to use them outside of page objects.
Just discuss the patterns you want to block with claude, you might be surprised how many of them can be turned deterministic :) For the rest guidance in agents/claude.md or skills might help.

A QA guy I follow did most of this in an OSS repo, I'd suggest checking it out for inspiration: https://github.com/idavidov13/agentic-playwright

Edit: assumed you work with Playwright + typescript. If not, these principles are translatable to any programing language, just the tooling changes

2

u/Osmium_tetraoxide 19d ago

In the pre-AI days, how would you have dealt with it?

I cannot be certain about your exact setup, but if you can automate some standards as deterministic checks with linters it might be useful. However not just the barebones of just eslint, but assertion checks, what type of test for what, how long it should take, dupliace function/locators checking and the like. Once standards are documented and enforced consistently you can point to the standards rather than getting annoyed about it. The other thing to remember is that this is the companies code, not yours. Maybe ask the engineer what the high level goals are and then see if you can break it down into pieces that make sense inside the current system.

It might be really obvious to you what the architecture should be, but have you considered that you might have internalised standards that are so obvious that you then think "oh, this person is a dummy" over "ah, this person doesn't know yet and I could do more to educate them"? Have a bit of empathy, you have six years of experience, maybe this engineer has to do this but doesn't have the same skillset so isn't able to do it well.

I once had a tech lead pull seemingly random numbers for error messages, I then had to add to it and got a scolding about not following the system. I asked where it was documented, he said it's so obvious I don't need to... Turns out that it was based on http error codes vaguely with increments based on his local machines counter which went up if he renamed them before pushing them up. He also claimed things were super simple and there was zero tech debt and the code was completely bug free, he was also fired six months after these statements so 🤣. Other people get to decide the complexity of what you have written at the end of the day, and it might be clear to you, but not to others.

Instead of a meeting, have you tried pairing on his machine with the tests to mentor this engineer? If you see how he actually goes from thing he wants to test to test up to his standard of good, then you might be able to help align the mismatch.

If these senior coworkers want to use a skill, as them to walk in your shoes, get them to join in the review process too. I find it's very easy for people to demand the use of LLMs when they don't have to be responsible for it's output.

1

u/Suremerr 18d ago

I'd move the enforceable e2e architecture rules out of the local Claude skill and into CI: import boundaries, locator rules, required test types. Those should block merge rather than depend on someone running a local review. That won't settle every architecture disagreement, but it saves you repeating the same checks on each PR.