• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

TeraTech

The ColdFusion Experts: Develop | Secure | Optimize

  • Services
    • Consulting
    • Crash
    • Development
    • Maintenance
    • Modernization
    • Security
  • About Us
  • Testimonials
  • Free Assessment
  • Get in touch!

  • Services
    • Consulting
    • Crash
    • Development
    • Maintenance
    • Modernization
    • Security
  • About Us
  • Testimonials
  • Free Assessment
  • Get in touch!

077 Fundamentals of Unit Testing, BDD and Mocking (using TestBox and MockBox) with Uma Ghotikar

June 4, 2018 By Michaela Light 4 Comments

Uma Ghotikar talks about “Fundamentals of Unit Testing, BDD and Mocking (using TestBox and MockBox)” in this episode of ColdFusion Alive podcast with host Michaela Light.

Contents

  • Show notes
  • What is unit testing?
  • Why do you like xUnit and BDD styles of testing?
  • What is TestBox?
  • What is mocking?
  • What is BDD and why do you like it
  • How do TestBox and MockBox work together for BDD
  • Why are you proud to use CF?
  • WWIT to make CF more alive this year?
  • What are you looking forward to at Into The Box?
  • Mentioned in this episode
  • Session Description:
  • Listen to the Audio
  • Bio
  • Links
  • Interview transcript
    • Read more

Show notes

What is unit testing?

    • Test small piece of functionality
    • Low level, small scope, a method, a function, a clause
    • Why do unit testing
      • To validate every part of the app whether the UI is ready or not
      • Easier to know where the bug is located
      • Faster to run than general user tests, more thorough test coverage of all use cases,  easy to automate
      • Can write tests before you code
        • So know where your code needs to raise an error
    • Guidelines to write unit tests
      • Fast for immediate feedback (milliseconds) during refactoring and coding
        • Avoid database, file system, http and API calls – mock them instead
        • Modular – so can reuse the test
        • Independent of other unit tests
        • Robust – work the same independent of time of day etc
        • Keep them up to date
        • Clear defined purpose – one piece of functionality
        • Clear pre-conditions, actions and expected outcomes
        • When you code make sure you can get the test to fail first before you write code to make it pass
        • Reactive programming
      • Most tests are of code in the Model part of MC

Why do you like xUnit and BDD styles of testing?

    • TDD focuses on testing your low level functions and methods
      • Tedious to write all these tests
    • BDD checks you satisfy your customer requirements at high level
    • User story and scenario

What is TestBox?

    • Open Source
    • The Given – When – Then syntax
    • BDD syntax and xUnit
    • The general structure for writing unit tests.
    • Set up, Tear down phrases

What is mocking?

    • Why do you like MockBox
    • Open source

What is BDD and why do you like it

    • High level
    • CI

How do TestBox and MockBox work together for BDD

Why are you proud to use CF?

WWIT to make CF more alive this year?

What are you looking forward to at Into The Box?

 

Mentioned in this episode

  • TDD = Test Driven Development
  • BDD = Behavior Driven Development
  • xUnit
  • TestBox
  • CFML slack test channel
  • MockBox

 

Session Description:

Topic:

Intro to Unit Testing, BDD and Mocking using TestBox & MockBox

This session will cover the basics such as what is unit testing, why to do unit testing and guidelines to write the unit tests. It will then cover xUnit and BDD styles of testing in TestBox, Given – When – Then syntax and the general structure for writing unit tests. We will then look into the mocking and demo examples of unit testing using TestBox & MockBox.

Listen to the Audio

https://traffic.libsyn.com/coldfusionalive/Fundamentals_of_Unit_Testing_BDD_and_Mocking_using_TestBox_and_MockBox_with_Uma_Ghotikar.mp3

Podcast: Play in new window | Download | Embed

Subscribe: RSS

Bio

Uma Ghotikar

Uma Ghotikar has more than 6 years of experience in web application development, database design and development. She has a technical educational background. She did Master of Science in Information Systems from George Mason University, USA and Bachelor of Engineering in Information Technology from University of Mumbai, India. She enjoys coding especially the back-end development and learning new technical skills.

Links

  • LinkedIn

Interview transcript

Michaela 0:00
Welcome back to the show. And today we're looking at the fundamentals of unit testing, be DD, which is behavior driven development and mocking and using test box and Dropbox, do that, and I'm here with Alma Gattaca. And if you don't know her, she is a cold fusion developer been doing it CFL on cold fusion for six years now. And she is giving a talk on this topic at into the box. So we will cover what is unit testing and why everyone listening should be doing it. And guidelines for writing great unit tests. And then also we'll look in detail at test box. And what it lets you do and how to structure unit tests using it will look at what marketing is and how to do that using mock box and why you want to do that. And we'll also look at behavior driven development or BDD and why you should be doing that and how to do it using test box and mock box together. So welcome oma.

Uma Ghotikar 1:00
Thank you. Thank you for having me. I'm glad to be here. Yeah.

Michaela 1:03
So what is unit testing? For those few people listening? who may not know? Yeah,

Uma Ghotikar 1:10
so yeah, so you're testing is a level of software testing, where, you know, individual units are components of a software testing. And what that means is, the unit is the smallest piece of functionality that can be tested in isolation. So having said that, they are definitely low level they are, they are of small scope. And in procedural language, it could be a function, it could be a method and an object oriented language, it could be a class, our method belongs to a class. So basically, it's the smallest piece of functionality, that's what unit is. And the entire purpose of unit testing is to validate that the each unit of software is performing as design. So that's why we should do unit

Read more

 

And to continue learning how to make your ColdFusion apps more modern and alive, I encourage you to download our free ColdFusion Alive Best Practices Checklist.

Because… perhaps you are responsible for a mission-critical or revenue-generating CF application that you don’t trust 100%, where implementing new features is a painful ad-hoc process with slow turnaround even for simple requests.

What if you have no contingency plan for a sudden developer departure or a server outage? Perhaps every time a new freelancer works on your site, something breaks. Or your application availability, security, and reliability are poor.

And if you are depending on ColdFusion for your job, then you can’t afford to let your CF development methods die on the vine.

You’re making a high-stakes bet that everything is going to be OK using the same old app creation ways in that one language — forever.

All it would take is for your fellow CF developer to quit or for your CIO to decide to leave the (falsely) perceived sinking ship of CFML and you could lose everything—your project, your hard-won CF skills, and possibly even your job.

Luckily, there are a number of simple, logical steps you can take now to protect yourself from these obvious risks.

No Brainer ColdFusion Best Practices to Ensure You Thrive No Matter What Happens Next

ColdFusion Alive Best Practices Checklist

ColdFusion Alive Best Practices Checklist

Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.

√ Easily create a consistent server architecture across development, testing, and production

√ A modern test environment to prevent bugs from spreading

√ Automated continuous integration tools that work well with CF

√ A portable development environment baked into your codebase… for free!

 

Learn about these and many more strategies in our free ColdFusion Alive Best Practices Checklist.

  • Facebook
  • Twitter
  • LinkedIn

Filed Under: CF Alive Podcast Tagged With: CF developer, CFML, ColdFusion, ColdFusion code, ColdFusion developer

← Previous Post 076 Breaking out of your ColdFusion comfort zone (How to make CF mainstream) with Igor Ilyinsky
Next Post → 11 Best Practices for a new Adobe ColdFusion Project

Primary Sidebar

Subscribe on iTunes

Popular podcast episodes

  • Revealing ColdFusion 2021 – Rakshith Naresh
  • CF and Angular – Nolan Erck
  • Migrating legacy CFML – Nolan Erck
  • Adobe API manager – Brian Sappey
  • Improve your CFML code – Kai Koenig

CF Alive Best Practices Checklist

Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.

Get your checklist

Top articles

  • CF Hosting (independent guide)
  • What is Adobe ColdFusion
  • Is Lucee CFML now better than ACF?
  • Is CF dead?
  • Learn CF (comprehensive list of resources)

Recent Posts

  • 141 Into The Box 2025 ColdFusion conference (all the details) with Daniel Garcia – Transcript
  • 141 Into The Box 2025 ColdFusion conference (all the details) with Daniel Garcia
  • 107 ColdFusion 2021 Revealing Details on How it was Created with Rakshith Naresh
  • The Legacy Continues: ColdFusion Summit East Conference Edition
  • 140 BoxLang modern JVM language that runs CFML code (new CFML engine and much more) with Luis Majano and Brad Wood – Transcript

Categories

  • Adobe ColdFusion 11 and older
  • Adobe ColdFusion 2018
  • Adobe ColdFusion 2020 Beta
  • Adobe ColdFusion 2021
  • Adobe ColdFusion 2023
  • Adobe ColdFusion 2024
  • Adobe ColdFusion 2025
  • Adobe ColdFusion Developer week
  • Adobe ColdFusion Project Stratus
  • Adobe ColdFusion Summit
  • AWS
  • BoxLang
  • CF Alive
  • CF Alive Podcast
  • CF Camp
  • CF Tags
  • CF Vs. Other Languages
  • CFEclipse
  • CFML
  • CFML Open- Source
  • CFUnited
  • ColdBox
  • ColdFusion and other news
  • ColdFusion Community
  • ColdFusion Conference
  • ColdFusion Consulting
  • ColdFusion Developer
  • ColdFusion Development
  • ColdFusion Hosting
  • ColdFusion Maintenance
  • ColdFusion Performance Tuning
  • ColdFusion Projects
  • ColdFusion Roadmap
  • ColdFusion Security
  • ColdFusion Training
  • ColdFusion's AI
  • CommandBox
  • Docker
  • Fixinator
  • Frameworks
  • Fusebox
  • FusionReactor
  • IntoTheBox Conference
  • Java
  • JavaScript
  • JVM
  • Learn CFML
  • Learn ColdFusion
  • Legacy Code
  • Load Testing
  • Lucee
  • Mindmapping
  • MockBox
  • Modernize ColdFusion
  • Ortus Developer Week
  • Ortus Roadshow
  • Server Crash
  • Server Software
  • Server Tuning
  • SQL
  • Survey
  • Survey results
  • TestBox
  • Transcript
  • Webinar
  • Women in Tech

TeraTech

  • About Us
  • Contact

Services

  • Free assessment
  • Consulting
  • Crash
  • Development
  • Maintenance
  • Modernization
  • Security
  • Case Studies

Resources

  • CF Alive Book
  • CF Alive Podcast
    • Podcast Guest Schedule
  • TeraTech Blog
  • CF Alive resources
  • CF e-course
  • CF best practice checklist

Community

  • CF Alive
  • CF Inner Circle
  • CF Facebook Group

TeraTech Inc
451 Hungerford Drive Suite 119
Rockville, MD 20850

Tel : +1 (301) 424 3903
Fax: +1 (301) 762 8185

Follow us on Facebook Follow us on LinkedIn Follow us on Twitter Follow us on Pinterest Follow us on YouTube



Copyright © 1998–2025 TeraTech Inc. All rights Reserved. Privacy Policy.