Setting up Copilot | Bondar Academy
Course: Playwright API Testing with TypeScript
Module: AI-Assisted Scripting with Copilot
Instructor: Artem Bondar
Lesson Summary
In this lesson, we explore how to use GitHub Copilot to enhance the efficiency of writing API tests within Visual Studio Code . The key points covered include: Setup and Activation Ensure you have the latest version of Visual Studio Code installed. Access Copilot by clicking the frog icon in the top right corner and selecting Open Chat . If prompted, authorize with your GitHub account to activate Copilot. Synchronize your GitHub account status to ensure full functionality. Managing Copilot Settings After configuration, click the frog icon again and select Manage Copilot . Enable additional models like Cloud 3.5 Sonnet for enhanced capabilities. Features of Copilot Copilot Code Complete : A smart intellisense feature that suggests code based on your typing and GitHub repository history. Copilot Chat : An interface to interact with a large language model (LLM) for coding assistance and project context. Workspace Organization You can customize the layout of Copilot Chat: Keep it on the right side (default) or move it to the left sidebar for convenience. Open it in a separate window, especially useful if using multiple monitors. This concludes the quick setup and overview of using GitHub Copilot for API testing. Stay tuned for the next lesson!
Video Transcript
Hey guys, welcome back and let's have some fun. Let's use AI to speed up writing our API tests. How about that? For that, we're going to use GitHub Copilot. Why? Because Copilot already built in Visual Studio Code. We don't need to technically set up or install anything over there. Also, it's free, so the free version for free limit for the GitHub Copilot is enough to complete the tasks that we need. So in this video, we're going to make quick setup and I show you around how to organize your workspace with Copilot. So here is Visual Studio Code. If you are already on the latest version of Visual Studio Code, and I recommend you to make sure that you are up-to-date, Copilot is already installed. So here in the top right corner, you need to click on this little frog icon over here and click Open Chat. So for me, it's Open Chat automatically. But for you, if you run this for the first time, Visual Studio Code will ask you to authorize with your GitHub account and complete the synchronization and authorization with your GitHub account. Very, very straightforward process. Just follow the suggestion which it says and Copilot will be activated. Also, make sure that you are synchronized with your GitHub account status. So currently, I have Bonder Artem with GitHub. Make sure that you also synchronized with your GitHub account. That's pretty much it. You don't need to do anything else. So you can start using Copilot. One more thing I would recommend to do right after the configuration. So click here on this icon one more time and click Manage Copilot. So you will be redirected to the GitHub page settings, to the Copilot settings, and you can activate other models which are, as far as I know, not active by default over here. So Cloud 3.5 Sonnet for Copilot. So select Enabled, and you can also activate Gemini 2.0 Flash model. We're not going to use it. We're going to use Sonnet 3.5, and you can enable it as well. It will not cost you anything anyway. So and that's it, going back. Now, if we talk about the Copilot as a product, it technically has two different products, Copilot and Copilot Chat. The Copilot is, or Copilot Code Complete, is a kind of a smart intellisense built in Visual Studio Code. So when you type the code or type the function, Copilot Code Complete kind of guessing or suggesting which next line you are about to type. The way how it works, it's looking into the history of all repositories on the GitHub, everything it has, and looking at the history of past coding experience of people on GitHub, it can guess what next thing you're about to write and kind of saving you type, do you just press tab and it's filling out the code instead of you. That's the feature number one. And the feature number two is actually Copilot Chat. So Copilot Chat is the interface to interact with large language model. You can provide the context of your code, entire project, feed this into LLM of your choice, and that way interact with your project and write the code also help ask LLM, help write your code instead of you. So it's pretty, pretty cool feature. We're not gonna use the first one. I will show you and demo how the Copilot Code Complete work, but we're gonna use the second one, which is actually Copilot Chat. We're gonna interact with large language models. So, and moving on. Also this window is Copilot Chat that we actually gonna use and you can organize the work environment however you want. So by default, it's located on the right. You can also put this as a window inside of the editor. So next to your other files open over here, you can open Copilot Chat that way. And you also can open as a new window like this. So for example, if you have two monitors, you can put chat on one monitor and the code on the second monitor and work that way. Or you can also can relocate this guy to a primary sidebar like this. So it will be moved under this icon and you can switch between different modes over here, including the Copilot. And the last and I believe not most inconvenient way is to use the Copilot here in the panel. We're not gonna use it. I would move it to a primary sidebar. So just for me, for better and more convenient organization of the workflow and continuing the demo of this lesson, I'm gonna keep it on the left. It's just more convenient for me. But if you want, you can keep it on the right how it's by default. It's actually by default, pretty convenient layout when you have the File Explorer on the left, your code in the center and the Copilot Chat on the right. And that way you interact with your application. So that's it. That's the quick setup and overview and see you in the next lesson.