From the course: GitHub Copilot for Software Developers by Microsoft Press

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Automate repetitive test-writing tasks

Automate repetitive test-writing tasks

- All right, well, in this final video, we're going to take a look at how GitHub Copilot can help you automate repetitive test writing tasks by duplicating patterns, you know, changing inputs around if you need to do that, and also doing things like generating parameterized test cases. Now, we actually already saw an example of this a little bit earlier inadvertently, because GitHub Copilot used the parametrize function with pytest in order to, you know, in order to actually generate a variety of different test cases with different inputs. all right, so the first thing here that I wanted to talk about is that Copilot is really good at recognizing patterns in your test structure and then duplicating those tests with new data. So, you know, if you already have a lot of test cases around that you've written yourself, right, chances are, you're not starting fresh. I mean, the application that you're working on has probably been a thing since before generative AI tools like GitHub Copilot…

Contents