Add daily email for 2024-06-01
Don't use AI to write your automated tests
This commit is contained in:
parent
a50d4b0b79
commit
7a8a9703ea
29
source/_daily_emails/2024-06-01.md
Normal file
29
source/_daily_emails/2024-06-01.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: Don't use AI to write your automated tests
|
||||
date: 2024-06-01
|
||||
permalink: daily/2024/06/01/dont-use-ai-to-write-your-automated-tests
|
||||
tags:
|
||||
- software-development
|
||||
- automated-testing
|
||||
cta: testing_course
|
||||
snippet: |
|
||||
Do you rely on AI tools to write your automated tests?
|
||||
---
|
||||
|
||||
In [yesterday's email][0], I mentioned some of the recent issues I've seen from AI tools.
|
||||
|
||||
I'm wary of any code generated by AI, as I've often found it to be incorrect.
|
||||
|
||||
If you rely on AI-generated code, I'd be especially wary if it also generates the automated tests.
|
||||
|
||||
Automated tests verify your application works as expected, so you need to ensure they are testing the correct things and the logic is correct.
|
||||
|
||||
Can you make a test purposely fail by changing some logic within the test or implementation code?
|
||||
|
||||
Is it clear what each test is doing?
|
||||
|
||||
Are the tests running the implementation code or just testing mocks or running meaningless assertions like `self::assertTrue(TRUE)`?
|
||||
|
||||
Writing tests is about building confidence, which you can't do if you don't know what your tests are testing or how.
|
||||
|
||||
[0]: {{site.url}}/daily/2024/05/31/putting-glue-on-pizza
|
Loading…
Reference in a new issue