Category Selected:

testbox

Blog

Mock It Baby Slides and Code

Curt Gratz |  May 21, 2012

Thanks to all who came out to my presentation at this years CF.Objective().  It was my first year speaking and it was an honor to have you and I would like to say thank you to the conference orginazators for the opportunity and for putting together such a great conference.  

The slides and code for my Mock It Baby! presentation our available on github

Mock It Baby<...

Read More

CFObjective 2011 Presentations and Code

Luis Majano |  May 16, 2011
Here are the links to all the presentations we did at CFObjective 2011 and some sample code of everything we showed off in this year's conference.  You can see our upcoming ColdBox 3.1 in action with all of its entity and html generation goodness, our new ColdBox Platform Utilities that was released and of course WireBox Dependen...
Read More

Mocking a Super Class with MockBox

Luis Majano |  March 09, 2011

A few folks have asked how you can leverage MXUnit and MockBox to mock a super class class.  Here is a simple example to showcase this:

Class Parent A

<cfcomponent name="A"> 
<!--- send ---> 
<cffunction access="public" hint="" name="send" output="false" returntype="any"> 
<cfreturn parent="">
</cffunction> 
</cfcomponent> 

Class Parent B

							
							
								
Read More

MockBox 1.3 Released

Luis Majano |  December 12, 2010
After much inspiration during long baby duty nights, we bring you today MockBox version 1.3.  This release sports a revamp of the entire documentation structure both on the wiki and internally in the API.  This was a huge ticket for me, as I wanted to make the introduction into mocking and unit testing a litt...
Read More

MockBox: Just Mock It! Presentation Recordings

Luis Majano |  June 25, 2010

Last night we did a presentation on MockBox, the ColdFusion Mocking/Stubbing framework.  It was a good crowd and we got really involved in TDD, testing and mocking discussions.  If you have never done any kind of mocking and testing, we encourage you to first see our blog post:

And then continue d...

Read More

Unit Testing with Mock Objects via MockBox

Luis Majano |  May 17, 2010

Once you get an appreciation for the importance of unit testing and integration testing is when we reach a new level in our development careers.  Testing is critical to mission critical applications, and even for our own little projects, where we test that our code should work as expected.  There’s that word again, expected.  Expectations in unit testing is like a nasty hamburger at a soccer match in El Salvador.  They go hand in hand :)

Read More

Join me at the Pecha Kucha BOF at cf.Objective()

Curt Gratz |  April 16, 2010

  Pecha Kucha BOF

I am very excited for this years cf.Objective().  This will be my third year and each year it has gotten better and I always leave inspired and ready to improve all aspects of my craft.  It is great to be surrounded by like minded individuals with the same goal to make themselves better at what they do. 

This year I have the unique honor to present at the Pecha Kucha BOF that Bob Silverberg organized.  I will be presenting on Mocking, it's not just for picking on people.  So, you should come join the crowd at the BOF and mock me, or at least learn new ways to mock. 

If you haven't registered for cf.Objective().  I believe you still can today.  You should also be sure to register for the ColdBox  1 day training workshop.  So, stop what your doing right now and head on over to the registration page and go for it.

Hope to see you at the BOF.  And thanks Bob for organizing it.

Read More

MockBox 1.2 Released!

Luis Majano |  March 19, 2010
I am happy to announce today a new release for MockBox: version 1.2. This can be downloaded standalone or via ColdBox 3.0.0 Nightly. This release brings in some more stability, faster code generation and some new functionality for you mock enthusiasts!

Read More


MockBox - It's not just for unit testing

Curt Gratz |  March 19, 2010

MockBox can have many amazing uses.  One well documented use is in assistance in creating complicated unit tests insuring you are only testing one small unit of work, it can be used for many other interesting use cases.

One of the ways we find MockBox useful during our development cycle at Computer Know How is to Mock objects we haven't had the time to complete yet, but we do know what we expect as response.  This allows us to continue development without waiting for the piece of something we haven't done yet slow us down, but keep the method calls exactly as they will be in when the object is complete.

So, how do you use MockBox outside of the context of a unit test?  Well, its easy.  

Inside a ColdBox application.

//get an instance of mockbox to use for mocking things not 100% built yet inside a ColdBox app mockBox = createObject("component","coldbox.system.testing.MockBox").init();

Outside a ColdBox application.

//get an instance of mockbox to use for mocking things not 100% built yet outside a ColdBox app. mockBox = createObject("component","mockbox.system.testing.MockBox").init();

Now that MockBox is initialized, we can start mocking objects. Lets say we have a User Object that we haven't had time to build yet. Right now it looks really advanced with lots of cool properties and functions that we spent a ton of time on. Something like this.

cfcomponent hint="I am the User ORM cfc" /cfcomponent

Read More

Very interesting MockBox Post!

Luis Majano |  March 16, 2010
Brian Car over at this blog has written an excellent entry on the benefits of Mocking with MockBox.  If you are a newbie to mocking, or an expert mocker :) then head over to his blog and check it out: http://cfcommons.org/index.cfm/blog/2010/3/13/unit-testing-done-right-with-mock-objects