Skip to main content

Are there any specialized libraries or services for automated testing? Esp for webpage tests

J
Written by Jasmine Sunga
Updated over 5 years ago

Tests are generally a good thing and will keep your dev velocity up in the long term.  Not having tests will be a dealbreaker if you’re trying to hire senior engineers because they’ll just hear that you probably don’t have your stuff together, you don’t have good engineering discipline, that there will be a lot of tech debt, etc. That being said, the usefulness of tests is highly dependent on what you’re trying to build.  If your product is highly available complex software, you’re going to need to invest a lot more in testing than if software is just a means to an end for your product.  Additionally, depending on your architecture, you may need to test different things.  Specifically more integration tests for microservices, and more frontend tests if you’re building frontend-heavy apps (e.g. angular, react, etc.)

As for “web page tests”, there’s two things you could be talking about - testing javascript logic, and testing the rendered output of pages.  The former is relatively simple and relatively the same as the testing backend applications.  The latter is a waste of time because you’ll be dealing with flaky tests forever because of constantly changing networks, browsers, etc.

The old/current status is that people would use phantom or selenium to run headless firefox browsers.  Headless chromium is now a thing and although it’s pretty nice, there’s still the major browser testing problem of trying to tell A) what’s on the screen and is it positioned correctly, and B) telling when the DOM is fully loaded and whether there needs to be a refresh because of something stupid like cloudflare dropping a request to load jquery

You can also try out Jest’s snapshot. It is pretty quick, and easy to set it up
https://facebook.github.io/jest

Did this answer your question?