Why Bubble Devs Should Use Test-Driven Development | Bubble

Bubble has changed the way developers build applications, especially for those without a traditional coding background. But working with no-code tools still requires following engineering best practices. As more no-code apps start using AI, following these practices has become more important than ever. One such practice is Test-Driven Development (TDD), a methodology that ensures software quality by writing tests before implementing functionalities.


This is a companion discussion topic for the original entry at https://bubble.io/blog/test-driven-development
2 Likes

very interesting article with practical tips! thanks for sharing

A ā€œtest firstā€ approach is a very good idea, but let’s not confuse ā€œtest driven developmentā€ with ā€œTest Driven Development (TDD)ā€ from Extreme Programming. There are some good points in the article but ATDD (acceptance test driven development), BDD (Behaviour Driven Development) and Exploratory Testing is more like what is being written about.

It matters. TDD is used for unit testing individual functions. ATDD and BDD are more applicable for functional testing (the article conflates a ā€˜function’ as in a code function that adds numbers and a ā€˜user function’ like a use case) on no and low-code platforms because they test end to end functionality and the stuff mentioned in the article.

Check out Brian Marick’s Testing Quadrants and any of the work by Lisa Crispen, Janet Gregory, Adam Goucher or Llwellyn Falco (I know I butchered the spelling of his name)… and you’ll find a ton of relevant stuff for the type of testing no-coders can do.

I use Selenium for my functional tests for testing permissions and generally start with ā€œBDD-likeā€ statements like:

Given a new login, when the user’s role is trainer and the user’s active trainer status is active, the user can view .

That test has a bunch of steps in it:

  • go to a logout page
  • go to a login page, login as an active trainer
  • go to the trainers toolkit page
  • verify is present

So I have about 12 or 13 tests that test all the combinations because it’s good enough to make me confident I haven’t broken any security. In the future, I’d have a data table with all the combinations and one test that loops through it.

Either way, yes, test-first is good, so I’m glad to see an article on it. TDD using the AI builder is impossible, you’re left with having to use exploratory testing (read: manual testing) because the AI builder would have built so much stuff you physically need to look at.

Awesome content. Practical guide on building AI apps.