FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...
ITB2021-Using Testbox to refactor old codev0.0.4 Public
As much as the need for full code coverage and writing your code a certain way to make it testable is discussed, if you have thousands of lines of code in dozens or hundreds of files, the idea of having any code coverage at all might seem daunting and beyond feasibility. In this session, we will start with a page of code that needs to be refactored how we can use Testbox to simply run functions in isolation. This has the immediate benefit of being able to test whether a function is working as expected without having to navigate through the front end of your app to get to a particular state. After running the function in isolation, we will write a few tests on the code "as is" and then start to refactor it using Testbox to slowly build up our code coverage. Along the way, we will look at some refactoring techniques and also concept of mocking.
box install itb2021_using_testbox_to_refactor_old_code