Using TestBox In The Real World

We’ve all seen demos of TestBox. We know the basic syntax of an expect() statement. And those are cute and easy to follow in a “hello world” test suite when not much is going on. But what about a real app?


We’ve all seen demos of TestBox. We know the basic syntax of an expect() statement. And those are cute and easy to follow in a “hello world” test suite when not much is going on. But what about a real app? When you don’t want to use mock data? When you want to actually talk to an API, write to the database, delete from the database, throw exceptions and so on? Can TestBox handle those things too? It can! Whether we’re following best practices or not is up for debate, and we can discuss that later. In this talk we’ll go over some TestBox basics, but we’ll expand from there and show how TestBox is currently being used by a real dev team on a real application will real chunks of complex code that doesn’t fit nicely into a “hello world” demo!

Target Audience: Developers new or new-ish to TestBox that want to see it used in a real application, not some “hello world” demo that doesn’t test chunks of hacked code or API calls or other items not typically found in small demos.

Main takeaways:

  • A quick TestBox Primer
  • Why mocks are annoying
  • Testing API calls
  • How to test when your code throws an exception
  • Tests that write to the database
  • How we can do all of this without negative side effects