News for hackers. Stuff that matters.
Re:GitHub Copilot by ec109685 on Tuesday June 29, 2021 @11:45AM (#27677545)
It has the ability to generate unit tests as well, which will help cut down some on the verification side if you feed it enough cases.
Re:GitHub Copilot by freedomben on Tuesday June 29, 2021 @11:53AM (#27677668)
I think I'd love to use this to generate tests and then write the functions myself. Test generation seems like a killer feature.
Re:GitHub Copilot by taftster on Tuesday June 29, 2021 @01:50PM (#27679348)
Yes!! Totally agree. Imagine writing a method and then telling an AI to write your unit tests for it. The AI would likely be able to come up with the edge cases and such that you would not normally take the time to write.

While I think the AI generating your mainline code is interesting, I must certainly agree that generating test code would be the killer feature. I would like to see this showcased a little more on the copilot page.

Re:GitHub Copilot by kimburgess on Tuesday June 29, 2021 @11:39PM (#27684590)
You don’t need AI for that. While example based testing is familiar to most, other approaches exist that can achieve this with less complexity. See: property based testing.
Re:GitHub Copilot by taftster on Thursday July 01, 2021 @12:49AM (#27696341)
Yes, I agree. But just to ask, wouldn't we consider that a form of AI testing, even just in very primitive form? We're begging the question for the very definition of AI. I would argue that your example is just the primordial version of what machine reasoned testing could potentially offer.
Re:GitHub Copilot by CloselyChunky on Tuesday June 29, 2021 @11:51AM (#27677653)
Well then you have to check the generated tests. That's just one more layer, isn't it?
Re:GitHub Copilot by IncRnd on Tuesday June 29, 2021 @01:47PM (#27679319)
If you question the veracity of the code that is produced, you have to question the usefulness of the unit test that is produced.