exit form
sign UP TO BROWSE TALENT
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
By providing a telephone number and submitting this form you are consenting to be contacted by SMS text message. Message & data rates may apply. You can reply STOP to opt-out of further messaging.
Case Studies
Services
GrowthTechnical
Resources
Apply to WorkClient ReferralsWhy US OnlyFAQ
Pricing
IndividualTeams
See Talent

Profit 101 Video #20: Testing for the Highest ROI

Unit testing vs testing at the API layer

November 17, 2023

Testing is kind of like taxes. Nobody loves paying taxes, but there's a sort of minimum amount that's necessary in order to keep society functioning, or keep the government functioning, whatever they may be. The same with testing. Well, what kind of testing, if we've got to do some of it, should we focus on? And what kind of testing is highest ROI? What I've seen in my experience, okay, so if we cut up a system real quick here, and let's pretend that up here is the UI of the system, whatever that's built on, and then maybe that's calling or speaking with an API/logic layer, and then finally, we've got the underlying implementations of that logic down in here, that this stuff calls, and then under there, maybe somewhere further down, we've got a data store. So, I'll throw my crappy database diagram down there.

API logic and different types of testing can be brought against different facets. One that I'm not a huge fan of, and don't really recommend, is down at this layer in the individual units of a system. There's something called unit testing. The problem I find with unit testing is that most bugs don't actually occur in the individual subunits of a larger program. They actually occur at the integration points, at points where code written by different developers has to work together, and where greater complexity comes to the fore. So, in terms of testing this, I actually recommend testing here at the API layer.

The beauty of API layer testing is that it's easy to automate, and it checks everything that's going on in your back end as a holistic system. And if you identify an issue, then of course the developers have got to go down, drill in, and fix that. But API layer testing is very high ROI, and some of the easiest testing to roll out. It forces your developers to actually look at their APIs, and what those APIs are returning contract-wise, and so I have found that you get very good bang for your buck there.

Then, of course, up here at the UI, you have UI layer testing. This is what we call end-to-end tests. This is full automation of your system by having automated tests pretend that they are users, and they're hitting the UI and going all the way through and all the way back. The problem with these is that they tend to be harder to maintain; they break more easily. So, there's the ability to cover a lot of different functions underneath by working on end-to-end tests. The ROI is lower, though, than the API layer testing.

So, out of these three, if you could only do one, this is actually what I would pick. I would start there and then move up to end-to-end, and frankly, I think that if you're forcing your developers to do tons and tons of unit tests, in most business cases, in most industries, you're wasting their time.

More Posts from the Profit 101 Series

Business Principles

  • Profit 101 Intro
  • How to Start
  • Year 1 - Quit or go All In
  • Minimum Viable Revenue
  • Fail Fast
  • Total Addressable Market (TAM)
  • Pricing & Unit Economics
  • Not all Cofounders Are Created Equal
  • Not all Revenue is Created Equal
  • Tech Debt

Startup Costs Video Series

  • Software
  • Marketing
  • Hosting

Pursuit of Profits

  • How to get 50% Profit Margins, Part 1 Video
  • How to get 50% Profit Margins, Part 2 Video
  • Pursuit of Profit Margins Video - Fractional Hiring
  • Pursuit of Profit Margins Video - Cost Savings
  • Pursuit of Profit Margins Video - De-risking
  • Pursuit of Profit Margins Video - Talent Pool
Back to Profit 101
Login
Book a Demo
Book a Demo
Individual Pricing
Team Pricing
About
Contact
Contact
Services
Senior Developers
UI/UX Design
Project Managers
Product Managers
Growth Marketer
Dev Teams
Low Code
CMOs
CTOs
Learn
Blog
Press
Profit 101
Podcasts
Case Studies
Resources
Apply to Work
Client Referrals
Why US Only
FAQ
Industries
FinTech
HealthTech
Fractional Hiring
Outsourcing

Copyright ©2025 GXHR Inc.

Built with 🤍 by the fractional developers and designers at Fraction.work

Sales@hirefraction.com

404.343.7747

Privacy