If you’ve ever used AngularJS, you’ll know that it has a pretty cool built-in testing setup - Karma for unit testing, and Protractor for end-to-end testing. I love Protractor, but recently ran into issues when trying to use it for a non-Angular project. Here’s how to get it working.
If you’ve not encountered end-to-end testing before, you’re in for a treat. Unlike unit testing, which is designed to validate very small components, an end-to-end test can be used to simulate how a user will actually interact with your website. We can make it go to a page, click a link, check the right page gets loaded, give it some input, check it displays the correct output - whatever you want, really. Used in conjunction with other forms of testing, it gives us a really useful look at how our site’s working, and is great for helping us catch any sneaky regressions.
Your new post is loading...