Urgent.News

What's breaking now, across thousands of outlets.

Tech

Your Automated Tests Passed. Can You Prove They Tested the Right Thing?

There's something I've always found strange about automated testing. Teams spend enormous amounts of time trying to make their tests pass. But they spend considerably less time questioning what a passing test actually proves. A test can pass while an important feature is broken. It can fail because an analytics provider is having problems. It can report a successful execution without preserving…

Automated testing has become increasingly popular amongst development teams, with the aim of quickly generating tests to improve efficiency. However, the focus on speed has led to a lack of emphasis on the accuracy and reliability of the results obtained from these tests. This article explores five key areas where this issue is particularly pertinent.

Firstly, it is crucial to differentiate between critical and non-critical integrations when testing an application's dependence on external services. For example, in an e-commerce application, Google Analytics can fail without affecting the checkout process. It is important to test these scenarios separately to ensure that the application continues to function correctly even when external services encounter issues.

Secondly, keyboard shortcuts in web applications can be both easy to implement and prone to breaking. Developers often overlook the potential conflicts between global keyboard shortcuts and those utilized by other components, such as text editors or modals. To avoid flaky tests and ensure proper functionality, it is essential to test various scenarios, including conflicting shortcuts, different operating systems, and browser-specific key combinations.

In summary, while automated testing has become an integral part of modern development workflows, it is essential to recognize that merely passing tests does not guarantee the correct functionality of an application. By focusing on the accuracy of tests and considering the potential impact of external dependencies and keyboard shortcuts, teams can ensure that their applications maintain robust performance even in the face of unexpected challenges.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How to Prevent Duplicate POS Sales from Skewing Inventory with Python and SQLite

A point-of-sale register sells two pairs of boots. The inventory worker deducts two units and commits the change. Then the worker crashes before it acknowledges the message.

  • Create Python program using SQLite to handle sales and check for processed sales
  • Run program, perform sale, then try running again with same event ID to ignore duplicate
  • Handle errors for sales referencing non-existent SKUs or making inventory negative

Pricing Flag Rollbacks — Choosing Real-Time Metrics Dashboard Tools Safely

The least complex tool that can answer “should I roll this pricing rule back?” is usually the right starting point: a metrics store with a query API, a dashboard, and alerts tied to the decision.

  • Focus on price-rule exposure, checkout starts, payments, failures, and cancellations.
  • Use multiple evaluation windows for meaningful comparisons and analysis.
  • Separate event streams from metrics to retain detailed payment failure information.

More from Tuesday 3 November →