Web Development

Unit/Automated Testing

June 20, 2017

Software testing is the process of discerning whether a product is acceptable to its end users, its target audience, its purchasers, and the stakeholders to whom it belongs.

At its core, software testing examines code and its execution: does the code do what it is supposed to do, when it is supposed to do it, and how it is supposed to do it?

We recommend that tests like Unit Testing (or Automated Testing), are conducted for more advanced applications. This testing type can be broken down into three types:

Level 1

The smallest testable parts of an application (units) are individually and independently analyzed for proper operation. Each unit is isolated from the primary program or interface. Automated tests run quickly, are cost effective, and allow for more collaboration given the visibility of test results for the entire team. These tools do have limitations – they are robotic and don’t behave the same as a real user, though they detect most bugs in a system.

Level 2

A reactive unit test is conducted when a bug is found. The unit test is used to validate if/when the bug is fixed.


Level 3

Complete Unit Tests ensure that all subcomponents of the software are integrated successfully to provide expected results. Sections of the code are isolated to verify correctness and are tested comprehensively. Complete Unit Tests are also more likely to find real user issues and are flexible, given that ideas can be tested quickly and easily. However, certain tasks are difficult to conduct manually. Additionally, manual tests cannot be reused in the same way automated tests can be, which makes the process much more time intensive.

When Unit/Automated Testing Should be Done

Whether or not Unit Testing should be done depends on factors previously discussed with the client. Unit Tests are typically conducted when there are several heavy components that can be easily verified/tested with basic commands.

Things like routes/paths, code formatting, or simple classes that perform specific functions (like calculators). Complete Unit Tests are conducted if full code coverage is necessary for testing workflow or process flow for things like payment processing, encryption and storage of sensitive data, and security rules.

Tools: Bitbucket pipelines, phpUnit, Jenkins, Travis

Interested in other methods of development testing? Read our white paper, Your Guide to Development Testing.

Ben Spencer

UX Researcher & Writer

Professional UX Researcher & Writer. Amateur Crossfitter, video gamer, and Planeswalker. I make sense of the world through storytelling and by observing the infinite wisdom of my two beloved Boxer dogs.

You might also like...



9 Steps for Moving Sites Between Servers

Technical needs change over time. To have a better optimized website, this may mean migrating your website to a different server. Perhaps you’ve found a server more conducive to efficiency and performance, and you need guidance about how to switch. While it may seem like more hassle than it’s worth, moving your site isn’t as … Continued



Dev Terminology 101: Common Programming Languages (and their key frameworks)

Language enables human communication – spoken or written – with words and phrases structured in a conventional way. Just like we need different languages to communicate with one another, we also need different languages to communicate with computers. In an article on Stack Overflow, Matt Sherman writes that at a foundational level, all programming languages … Continued



Announcing Fresh Consulting’s WCAG 2.0 PHPCS Linter

Today, Fresh Consulting is announcing the release of our WCAG 2.0 PHPCS Linter. The linter is a set of rules (or sniffs) for PHP Code Sniffer which can automatically detect and alert when certain WCAG 2.0 violations are detected in code. WCAG 2.0 supports designers and developers in meeting the guidelines and success criteria of accessibility. The … Continued

Pacific Science Center

application maintenance and development

Pacific Science Center


mobile development



web design, microsite development


Seattle Public Library

ui/ux design, microsite development

Seattle Public Library