DEV Community

Cover image for Software Engineering : Testing
John Peters
John Peters

Posted on

Software Engineering : Testing

The jest of this article is that today, the Web browser is king. There's just Cypress, Puppeteer and Selenium. My bets are on Cypress.

Details

Test philosophy has changed over the last 25 years. Much of it being due to test tooling keeping up with current trends in software.

From The Desktop
There's only been two major players in the desktop testing space. UFT and CodedUI.

The challenges were inter-process messaging. A very low level technique to inject behaviors in processes not owned by the injection agent.

These tools made it possible, but writing tests were tough to achieve 100% reliability. UFT never upgraded their legacy VBScript libraries. CodedUI provide a C# environment but required vendors to write Automation Peers. Not all did.

To The Web
HTML was a unifier, anyone could make a WebBrowser but each had to support HTML specifications.

There were two ways testing tools could control a WebBrowser, low level messaging and using Middleware. By Middleware we should thing about HTTP interception and alteration prior to hitting the browser.

Selenium was the first interceptor agent. It was miraculous due to the security browsers had to prevent this type of behavior. Selenium did this the best for many years.

Along came Cypress. A new way of doing things using interception methodology but did not require a server running in the background.
Part of it's internals were exposed based on another feature it has. It can intercept and alter inbound or outbound HTTP requests. This was a Selenium disrupter.

Today there are just two WebBrowser testing tools following this design Cypress and Puppeteer.

Cypress does have some quirks, mostly being it's all JQuery based. But JQuery is mature and still the #1 web framework.

JQuery is just not needed any longer with the advent of native browser query selectors.

Karma, Jasmine et. al.
Technical debt catches a lot of software flat-footed. The design of Karma running with Jasmine was to spin up it's own browser. This made cross-site scripting issues with just hitting our backends. Any outbound request to a backend was an immediate failure without lots of work trying to get it to work. For this reason only, I reject these two because Cypress doesn't do that and Cypress is easier to learn!

Goals

  • Test early and often
  • Cypress is King
  • Developers must write tests with each iteration
  • Embedded QA Team members who program are awesome
  • Embedded QA Team Members who run manual tests fill the gap of automation lag. They're awesome too because the tend to specialize in applications. Many of them know the application better than the developer does!

John Peters Software Engineering: Testing

Top comments (0)