@ploum Yeah that would be a rookie mistake. (3) Keep your competent engineers to get the work done faster and (4) let Copilot help you write the tests much faster. Still the same difficulty, but speed. Copilot is aptly named if you think about it.
Top-level
11 comments
So far i've had good experience with chatgpt, even its bug fixing skills are pretty decent, but i haven't coded anything complex so far just basic api tools, userscript, wordpress themes and plugins. @yac @ploum I have trouble trusting code from AI in general. But I could be OK if it is well tested. But trusting AI to write my test? Nope. This is clearly, for me, the place where there should be no AI. @dolanor @yac @ploum I might be ok with it sketching out some tests, creating some setup GivenXCondition methods and high level tests with comments about what it thinks needs to be tested, but it's not going to know the _semantic_ details of how things inside the code under test work. Like, a method returns an object that has a certain string field defined - should that be expected to have a value given the inputs, and what should that value be? For any nontrivial code, this is the use case. |
@yac @ploum I'd rather let it write the code, then the tests. If it fucks up the tests, you would either miss the bugs, or have flaky tests being an extreme pain leading you to step 5. If you write decent tests, you would catch it on writing poor code. But TBH, it shouldn't write either of those, unless you treat it as a templating engine to write some very simple boilerplate for you.