Development Environment Setup | Bondar Academy
Course: Cypress UI Testing with JavaScript
Module: Introduction
Instructor: Artem Bondar
Lesson Summary
In this lesson, we will configure a development environment to run Cypress on your computer. The two essential components required are Node.js and Visual Studio Code . Installing Node.js To install Node.js: Open your browser and search for Node.js . Click on the first link, nodejs.org . Node.js allows you to run JavaScript applications outside of the browser. Click on the Get Node.js button and follow the installation instructions. For installation: If you are on Mac , select the appropriate processor (ARM64 for Apple Silicon or X64 for Intel) and download the installer. If you are on Windows , choose the correct processor type and download the installer. Always install the LTS (Long Term Support) version of Node.js to avoid compatibility issues. Installing Visual Studio Code Next, install Visual Studio Code : Search for Visual Studio Code (not just Visual Studio). Download the installer for your operating system and install it like a regular program. Post-Installation Steps After installing both components: Open Visual Studio Code and enable Auto Save in the File menu. Open the terminal and validate the Node.js installation by typing node -v and pressing Enter. You should see the installed version number. With these installations complete, you are ready to start working with Cypress in Visual Studio Code. See you in the next lesson!
Video Transcript
Hey guys, in this lesson, we will configure development environment to be able to run Cypress on your computer. And for that, we need just two components, Node.js and Visual Studio Code, all right? So let's get into it. Open Google in your browser and in the search type Node.js and hit Enter. And the very first link, nodejs.org, this is what we are looking for. Open this one. So first of all, what is Node.js? Node.js is a type of virtual environment that gives you possibility to run JavaScript applications on your computer. So previously, when JavaScript as a language was created, it was created only to run inside of the browser, and that's it. And JavaScript's still the only one language that can be executed inside of the browser. But when Node.js was created, it empowered developers to write completely new types of applications that can be executed outside of the browser, and Cypress is one of those. So let's click on this Get Node.js button, and here are some of the instructions how to install it. The default installation guide offers you to use just a command line. So download, first of all, NVM, it's Node Version Manager, install it. And then after that, install Node.js using command line as well. And for our purpose, we probably don't need NVM. NVM is if you would like to manage several versions of Node.js on your computer. We don't need this. We want to go the simplest way possible. And for that, just go down over here, and here you can download the installer for your system. Now, if you are on Mac computer, so you select here from the drop-down Mac OS, and then you need to select the processor for your Mac. So if you are on Apple chip or Apple Silicon, you will need to select IRM64. If you have Intel chip on your Mac, you need to select this X64. After that, you download this Mac OS installer. Click over here, then open this installer. It looks like this, and then you accept everything just by default. Click Continue, click Continue, Agree, Install. Then it's ask my password, install software. And just wait while installation will be completed, and then hit Close and move to Trash. And that's pretty much it. If you are on Windows, you do exactly the same thing. But you need to select here Windows, and then need to select which kind of processor do you have. So if you have Intel chip, you need to select this X64. Most likely, you will have an Intel chip. And newer Windows computers, some of them have IRM architecture, then you will have to choose this IRM64 binary. And after that, click Download Windows Installer, and do exactly the same thing. You run this installer, and just accept everything by default. Don't select anything like any special options over there. That's it, installation is complete. And one more thing, there are different versions of Node.js available. So look, there are versions, latest LTS and latest release. You see that latest release is 24 as of today, but LTS is version 22. So always install LTS version of Node.js. Never install this kind of latest version. Because with the latest version, you may have a compatibility issues that your system simply will not work as expected. The LTS version stands for Long Term Support. It means that this version was tested properly, so it will have a full compatibility with different packages, applications, systems, and so on. So this is the most stable version, download LTS only. And the second component that we need is Visual Studio Code. So go back to the search bar and type Visual Studio Code. And make sure that you search for Visual Studio Code, not just Visual Studio, because those are two different applications. So type Visual Studio Code. The first one is this Visual Studio Code, and just simple download installer as well. So for me, it's download for Mac OS. If you are on Windows, download for Windows, run and install on your computer, and you will install it as just a regular program on your computer. All right, after you've done both of those operations, you need to open Visual Studio Code on your computer. So you will see the window like this, or maybe you will see the welcome window, so it doesn't matter. One of the first thing I recommend you to do right away is go to File and enable this Auto Save flag over here. So this means that all changes that you will make later in your code will be automatically saved. Otherwise, you will have to save it manually every time to be reflected in your script. After that, select Terminal, New Terminal, and we need to validate that Node.js was installed successfully. For that, type node-v and hit Enter. So if you did everything right and Node.js was installed correctly, you will see a version printed over here. In my example, it's version 22.12. In your example, you should see the version that you have installed as of today for the LTS version of Node.js. And that's pretty much it, just two components. In Visual Studio Code, we will continue working with Cypress, writing our Cypress code, and see you in the next lesson.