Copilot Chat writes Unit Tests for you!

preview_player
Показать описание
Discover GitHub Copilot Chat, an efficient tool in the Copilot X suite, which can generate automatic unit tests for your code. But is it reliable? Today I'll give it a try while focusing on some key aspects that arise during the demo.

Learn about Copilot's logic guessing, its limited understanding of testing goals and business logic, and the scope of the generated tests.

See Copilot Chat in action and find out how it can streamline your testing process. Remember to review and customize the generated tests for optimal accuracy.
_______________________________

Hit like and subscribe for more content! :D

You can also follow me on the other platforms:
_______________________________

#copilot #copilotx #ai #github

00:00 Teaser
00:10 Copilot Chat
00:42 Example 1: FizzBuzz
03:50 Example 2: Roman Converter
05:38 Example 3: Truck Weight
Рекомендации по теме
Комментарии
Автор

Great video ! I was thinking of making a similar video on copilot chat with tests & was looking for other people's take on this haha, I do have some unrelated questions if you would like to answer:

How do you have autocomplete in terminal ?
what is nr ? short for npm run ? (i am guessing you use ni)
what is the -g flag ? (looks like it's used to run specific test but i have never used it)
if you write 'as any', how does ts accept it ? if the function accepts only number ? (so as means interpret it however you want just run it lol) if we say as string it infers it as string, if we say as any it removes types altogether ! wow ? and why doesn't undefined need it ?

Sa-So
Автор

Great video, however I felt like we do not have anything yet which can generate test cases considering all scenarios :(

ShikharDadhich
Автор

Hey, I tried to use Github copilot to help to generate unit tests, and there are some problems.
If i have files that are connected (model, service, controller, dto etc.), the copilot only reference 1 file(that are open) and not see the other files to make unit tests works.

There are other options?
Thanks!

brunolopes
Автор

give me the link of the extension please

sadokabdelbasset
Автор

Well, shouldn't it be exactly the other way around? Humans should write tests (first) that specify the expected software behavior and co-pilot (or whatever-AI) should then generate the code that fulfills the test.

synapty