课程: End-to-End JavaScript Testing with Cypress.io
Installing and running Cypress
- [Instructor] And if we hit Enter there, what that's going to do is it's going to run Cypress and open up this Cypress window, and what you'll see here is it asks us what type of testing we want to use Cypress for, right? Do we want to use it for End-to-End Testing, Component Testing? We're actually going to select End-to-End Testing, and what this is going to do is if we click on that link, it doesn't really make it very clear that it's going to do this when you click on it, but what it does is it'll actually add a number of different files to your project that will help you perform basic end-to-end testing here. All right, so let's just click Continue, then what it's going to ask us is what our preferred browser is for end-to-end testing. I'm just going to select Chrome here and I'm going to click Start End-to-End Testing in Chrome. All right, so now that we've selected that, what that's actually going to do is it's going to open up Cypress in a Chrome window, and you can see that it's got a number of links over here on the left hand side. Now, these links are all going to become a little bit more relevant once we actually start writing and running tests, but in general, this is the interface that you'll be using when you write and run Cypress tests. All right, so for example, this Specs link, this is where we're going to see a lot of these specifications that we create for our project. For Runs, this will show us the results of running our tests, right? If any of our tests failed. Debugging, this is used for actually figuring out what went wrong if something isn't working like we expected it to in our tests. And obviously Settings, this allows you to adjust some of the settings for your project, the device you're running it on, or just some Cypress Cloud settings here. So, feel free to explore these in a little bit more detail, but the next thing that we'll be doing is seeing how to write and run our first Cypress tests, which as you'll see, is going to kind of make this interface come alive a little bit and show us what each of these pages that we've seen are used for.
内容
-
-
-
-
Installing and running Cypress2 分钟 14 秒
-
Writing and running Cypress tests8 分钟
-
(已锁定)
Testing text inputs7 分钟 53 秒
-
(已锁定)
Selecting elements8 分钟 20 秒
-
(已锁定)
Element aliasing6 分钟 39 秒
-
(已锁定)
Working with command results5 分钟 43 秒
-
(已锁定)
Using beforeEach4 分钟 57 秒
-
(已锁定)
Setting a base URL3 分钟 29 秒
-
(已锁定)
Challenge 1: Writing your own tests1 分钟 46 秒
-
(已锁定)
Solution 1: Writing your own tests6 分钟 38 秒
-
-
-
-