Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
Lessons:25Length:2.9 hours
  • Overview
  • Transcript

5.1 Installing Protractor Dependencies

Hello, ladies and gentleman, and welcome to this next exciting series of tutorial lessons. In this series we're gonna learn about end-to-end testing with protractor. Here I am at the protractor GIT hub page, which is an excellent place to start when you're looking for information on Protractor. So the first question to ask is, what is Protractor and what is end to end testing? Well as I described earlier, it's rather simple to test say a reg x function that validates an e-mail. You just pass the bunch of e-mails and make sure it returns the expected thing. But if you have a whole series of steps, for example, you want to create a user on your backend, and then verify that it was created, you need something called end-to-end tests. Now when you're running end to end tests with angular you're in for a bit of a treat. Because angular has it's own end to end test runner called Protractor. Protractor allows you to run angular tests in an end to end fashion. And in this module we're going to be completely looking at that and taking it apart. Here I am for the webpage of Java. I mentioned at the beginning of this series that we need to install Java to get Protractor working. Protractor has a lot of dependencies like web driver and Selenium and some of these dependencies depend on Java. So Java must be installed on your computer. You can install Java by going to java.com/en/download and then download Java and install it to your computer. I'm not 100% sure if this is a requirement on Mac, but I do know that you will need to do this if you are on a PC. Either way, it's probably a good idea at this point to install Java on your computer before moving on, we'll wait. All right, so we have Java installed on all our computers. Now let's go to our terminal window, as we will be installing some npm packages. So we need to install a bunch of packages so let's just do it all in one go with mpn install -g. And we're gonna install protractor karma cli That's two things and lastly, webdriver-manager. When you press enter these will install some of them are pretty big, so this may take awhile. Just rejoin us once you've installed these packages on your computer and all our dependencies have been installed. For the last part of this video we're just gonna get our Selenium server kicked off, then in the next video we're going to link back to that in our app. So to make sure that works, type webdriver-manager start We get a message saying standalone is not present. Let's install Standalone with webdrive-manager, update, forward, forward Standalone. That's been completed, now let's see if our web driver manager start works. Very good, if you get this message, that means that your Selenium is now running. That means that we can now connect to it with Protractor. For the time being leave this terminal window open, as we're going to need it open for the next video.

Back to the top