When I took my first real dev job in the late 90s, it was not common for developers to write their own automated tests. Instead, large companies depended on teams of testers, who tested manually, or were experts in complex (and expensive) automation software. Small companies were more likely to depend on code review, months of “integration” after the “development,”…or most commonly: pure hope.
A super fast JSDom based Selenium Webdriver API. Write end to end tests once and run them against this super fast, headless browser built on node.js, then once those tests pass you can run them against real browsers in the cloud!
I think that's the direction we're heading. Less emphasis on unit tests, because we're no longer doing test-first as a design practice, and more emphasis on, yes, slow, system tests. (Which btw do not need to be so slow any more, thanks to advances in parallelization and cloud runner infrastructure).
Selenium cannot reliably control a browser when its window is not in focus, or when you accidentally interact with the browser frame. This will result in flickering tests, which are "randomly" red and green. In fact, this behavior is not random at all and completely depends on whether or not the browser window had focus at the time. This card will give you a better understanding of Selenium focus issues, and what you can do to get your test suite stable again.
Setting up End-to-End testing (for Nyssetutka.fi) using Nightwatch.js, Selenium and ChromeDriver and running the tests in a headless Chrome instance was super easy.
Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome.
You can automatically run tests as a part of your build process using TestCafe and Travis CI. There are Linux versions of Chrome and Firefox browsers available for Travis CI builds, so you can run your tests completely in the cloud.
Page Object Model is a design pattern which has become popular in test automation for enhancing test maintenance and reducing code duplication. A page object is an object-oriented class that serves as an interface to a page of your AUT.