Writing Test Cases using TestBox for ColdFusion Application

There are multiple testing techniques we use for software code testing, most common are Unit Testing, Model Testing, Functional Testing, Handler Testing, System Testing, Regression Testing etc. Usually full testing to follow by writing specific test cases as depend on testing technique and tools that you use.

Testing for Coldfusion software application can be done through “TestBox” – A testing framework for ColdFusion (CFML) that provide a clean syntax to write test cases for ColdFusion based software. TestBox is an ideal testing tool for ColdBox Framework for Lucee CFML. Complete help on TestBox is available on ColdBox site.

So in this blog you will find simple test cases for unit testing and handler testing help to initiate testing with complex example.

Let us start with setup and configuration

Get TESTBOX from official website, Once downloaded extract testbox zip on root of project folder and rename with “testbox”.

Moving on further for unit / model testing.

There is a model as companyservice.cfc, now to create a model testing there is a code file for testcase called companyservicetest.cfc.

 

Real all lines written below to get an idea about how TestBox code and function used here.


 

how can we help you?

Contact us at the Consulting WP office nearest to you or submit a business inquiry online.