TeraTech

The ColdFusion Experts: Develop | Secure | Optimize

  • Services
  • About
  • CF Alive
  • Blog
  • Podcast
  • Contact

  • Services
  • About
  • CF Alive
  • Blog
  • Podcast
  • Contact

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
  • Mentioned in this episode
  • Session Description:
  • Bio
  • Links
  • Interview Transcript:

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

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.

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.

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: Apple Podcasts | RSS

Bio

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

Related Posts

  • 070 CommandBox 4 Deep Dive (new version revealed) with Brad Wood070 CommandBox 4 Deep Dive (new version revealed) with Brad Wood
  • Only 3 Weeks and 15 Tickets Left for Into The Box 2018 ConferenceOnly 3 Weeks and 15 Tickets Left for Into The Box 2018 Conference
  • State of the ColdFusion Union 2017 Survey Amazing ResultsState of the ColdFusion Union 2017 Survey Amazing Results
  • State of the ColdFusion Union 2017 Survey Amazing ResultsState of the ColdFusion Union 2017 Survey Amazing Results
  • 019 A Whirlwind Tour of Preside Application Framework in the Wild, with Alex Skinner
  • 010 All things ContentBox (new API, ContentStore, Themes and more) with Gavin Pickin010 All things ContentBox (new API, ContentStore, Themes and more) with Gavin Pickin
  • Facebook
  • Twitter
  • LinkedIn

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

← Previous Post 076 Slatwall ColdFusion eCommerce Unleashed (Beyond Shopping Carts) with Sumit Verma
Next Post → 11 Best Practices for a new Adobe ColdFusion Project

Subscribe on iTunes

CF Alive Best Practices Checklist

 

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

Recent Posts

  • 4 Reasons Why Your ColdFusion Web Apps Are Suffering (And How To Avoid It)
  • Google Down – An Unprecedented Event (Save Your Data Fast!)
  • 107 ColdFusion 2021 Revealing Details on How it was Created with Rakshith Naresh
  • Into The Box LatAm 2020 Virtual Conference – Free to Register!
  • Slow ColdFusion Applications May Ruin Your Business (3 Steps to Prevent It)

Categories

  • ActionScript
  • Adobe CF Summit
  • Adobe CF Summit East
  • Adobe CF Summit East 2018
  • Adobe ColdFusion 11
  • Adobe ColdFusion 2020 Beta
  • Adobe ColdFusion 2021
  • Adobe ColdFusion Project Stratus
  • Adobe ColdFusion Security
  • AIR
  • Ajax
  • AngularJS
  • Announcement
  • API
  • Apollo
  • Auto Security Lockdown
  • AWS
  • C#
  • Certification
  • CF Alive
  • CF Alive Book
  • CF Alive Podcast
  • CF Camp
  • CF Developer week
  • CF Maintenance
  • CF Summit India
  • CF Tags
  • CF Training
  • CF Vs. Other Languages
  • CFEclipse
  • CFML
  • CFML Open- Source
  • CFObjective
  • cfquery
  • CFSummit
  • CFUnited
  • China Chopper
  • CIO
  • Classes
  • Client Highlights
  • ColdBox
  • ColdFusion
  • ColdFusion 2018
  • ColdFusion 2020
  • ColdFusion 2021
  • ColdFusion 9
  • ColdFusion community
  • ColdFusion Conference
  • ColdFusion Consulting
  • ColdFusion Developer
  • ColdFusion Development
  • ColdFusion Hosting
  • ColdFusion Security
  • ColdFusion Webinar
  • CommandBox
  • Conference
  • Cool Stuff
  • Culture
  • Cybercrime
  • Database
  • Development Approach
  • DevOps
  • Docker
  • Fixinator
  • Flex
  • Frameworks
  • Fusebox
  • FusionReactor
  • Futurology
  • Garbage Collector
  • Google Down
  • Into The Box Latam
  • IntoTheBox Conference
  • Java
  • JavaScript
  • JVM
  • Learn ColdFusion
  • Legacy Code
  • Load Testing
  • Lucee
  • Management
  • MAX
  • MDCFUG Lunch
  • Microsoft Azure
  • Mindmapping
  • MockBox
  • Modernize ColdFusion
  • Monitoring
  • Muracon
  • NCDevCon
  • New Intern
  • News
  • Node.js
  • Open- Source
  • ORM
  • Ortus Developer Week
  • Ortus Roadshow
  • Performance
  • Performance Tuning
  • PHP
  • Productivity
  • Programming Languages
  • Project planning
  • Query of Queries
  • Roadmap
  • Scalability
  • Security
  • Server Software
  • Server Tuning
  • Social Media
  • Spiral Web
  • SQL
  • Success Story
  • Survey
  • Technology
  • TestBox
  • Tips
  • Transcript
  • Trapeze Development
  • Uncategorized
  • Web 2.0
  • Web Application
  • Web Server
  • Webinar
  • Webmail
  • What is ColdFusion?
  • Whole Brain Development
  • Women in Tech
  • Work From Home

Recent Comments

  • Michaela Light on A Comprehensive Guide to Running a Successful CFML Project
  • Michaela Light on Is Lucee CFML now better than Adobe ColdFusion?
  • Michaela Light on Introducing Swansea Jack (Lucee CFML 6 announced)
  • Michaela Light on 082 ColdFusion and the Blockchain Revolution with Mike Brunt
  • Michaela Light on 082 ColdFusion and the Blockchain Revolution with Mike Brunt
  • Home
  • Services
  • About Us
  • CF Alive
    • CF Alive Book
    • CF Alive Inner Circle
    • CF Alive full resources cheatsheet
  • Blog
  • Podcast
    • Podcast Guest schedule
  • Contact
  • Sitemap

The ColdFusion Experts:
Develop, Secure, Optimize

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–2021 TeraTech Inc. All rights Reserved.