• ZoteTheMighty@lemmy.zip
    link
    fedilink
    arrow-up
    11
    ·
    6 hours ago

    I’ve actually found a lot of success with the opposite where I write the code and AI writes the unittests. I would have otherwise written a few unit tests, but AI makes typically 20x that many. Since my code is already documented, it can get lots of good context. I typically instruct it to check the branch’s diff relative to main and test only those changes. I might skim them over, delete some that don’t make sense in context and would never pass, and update one or two. Typically after a few rounds of iteration, I have tons of tests I would never have written on my own, and a human-made feature.

      • Huginn12@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        4 hours ago

        In a perfect world yes, but even after all the solution in and planning, once a developer gets into the request and looks at the code things often change.

        Requirement only written test steps are rarely going to be enough to cover every scenario. Saying this as a 10 year ba veteran