Hacker News new | ask | show | jobs
by hasley 35 days ago
Some questions that bother me:

Are people reviewing all the tests that have been created automatically?

What about existing tests? How do we make sure that AI does not fake them (by silent changes or by faking the test output)?

edit: corrected typo

4 comments

>Are people reviewing all the tests that have been created automatically?

No.

> How do we make sure that AI does not fake them by silently (by silent changes or by faking the test output)?

I have never seen this happen for a couple of months at least.

Well yeah you’re not reviewing the tests so you wouldn’t catch them.
You seem to forget what tests are.

They're representative of scenarios which your application can enter.

So if the tests were mocked and a bug went live he'd still notice, after all it means your software behaved incorrectly and now you gotta clean up the pieces.

But the purpose of a test is to catch a bug before it goes live.
This is becoming cyclical, did you forget what this comment chain went about?

The discussion went from tests being written by ai, to nobody actually reviewing the tests, to the claim that given those circumstances, you wouldn't notice that the tests may not tests anything anymore because of mocks.

My statement was merely pointing out that your previous comment was groundless because they still would've found out about those bugs when they went live.

>My statement was merely pointing out that your previous comment was groundless because they still would've found out about those bugs when they went live.

Maybe. You're assuming visible and obvious bugs.

That's a big issue in my team. We cannot really review tests manually, we already have too much just reviewing the code. And even then, sometimes the 'is this change necessary' question is forgotten or ignored (happened to me 20 minutes ago) because I an tired of fighting my junior+AI. I try to make AI refactor the tests every weeks ande that's it.
> Are people reviewing all the tests that have been created automatically?

Absolutely not! Some people ask a code assistant to write only integration/end-to-end tests and commit them. Unittests is only to help LLM generate correct code.

Yes, but periodic audits.