From the course: Software Testing Assistance with GitHub Copilot AI

Unlock the full course today

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

AI and automated testing

AI and automated testing

- [Instructor] This is the heart of this course. You know that you or your team probably don't write enough tests and Copilot can help. To be clear, this is about using AI to support traditional automated testing. The first step to adding tests is finding the right things to test. Not all functions or classes are in a testable state. Identifying the right place to start with will help you continue to write tests once you get going. Asking Copilot to write tests for a function or method is a way to quickly see how complex the test will be. And this test looks pretty simple. It passes an array and compares it to the expected sorted array. A tip, usually the first test I write in every app is a test that asserts that true equals true. This is so I can test that the tests we harness is correctly configured. That'll help a lot. From there, I can be confident that as I add tests and assertions, there will be value in running them. So I'll say tests. Test, tests, run, and I will assert that…

Contents