Introduction

TestBox is a next-generation testing framework based on BDD (Behavior Driven Development) and TDD (Test Driven Development), providing a clean, obvious syntax for writing tests.

TestBox BDD v5.x

TestBox is a next-generation testing framework for the BoxLang JVM language and ColdFusion (CFML) based on BDD (Behavior Driven Development) for providing a clean, obvious syntax for writing tests. It contains not only a testing framework, console/web runner, assertions, and expectations library but also ships with MockBox, A mocking and stubbing companion.

class{

  function run(){
  	describe( "My calculator features", () => {
	
		beforeEach( () => {
			variables.calc = new Calculator()
		} )
			
		// Using expectations library
		it( "can add", () => {
			expect( calc.add(1,1) ).toBe( 2 )
		} )
		
		// Using assert library
		test( "it can multiply", () => {
			assertIsEqual( calc.multiply(2,2), 4 )
		} )
	} )
  }

}

Features At A Glance

Here is a simple listing of features TestBox brings to the table:

  • BDD style or xUnit style testing

  • Testing life-cycle methods

  • MockBox integration for mocking and stubbing

  • Mocking data library for mocking JSON/complex data and relationships

  • Ability to extend and create custom test runners and reporters

  • Extensible reporters, bundled with tons of them:

  • Asynchronous testing

  • Multi-suite capabilities

  • Test skipping

  • Test labels and tagging

  • Testing debug output stream

  • Code Coverage via FusionReactor

  • Much more!

Versioning

TestBox is maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered in the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • bumpBreaking backward compatibility bumps the major (and resets the minor and patch)

  • New additions without breaking backward compatibility bump the minor (and resets the patch)

  • Bug fixes and misc changes bump the patch

License

TestBox is open source and licensed under the Apache 2 License. If you use it, please try to mention it in your code or website.

  • Copyright by Ortus Solutions, Corp

  • TestBox is a registered trademark by Ortus Solutions, Corp

The ColdBox Websites, Documentation, logo, and content have a separate license, and they are separate entities.

Discussion & Help

Reporting a Bug

We all make mistakes from time to time :) So why not let us know about it and help us out? We also love pull requests, so please star us and fork us: https://github.com/Ortus-Solutions/TestBox

Professional Open Source

TestBox is a professional open source software backed by Ortus Solutions, Corp offering services like:

  • Custom Development

  • Professional Support & Mentoring

  • Training

  • Server Tuning

  • Security Hardening

  • Code Reviews

Resources

HONOR GOES TO GOD ABOVE ALL

Because of His grace, this project exists. If you don't like this, don't read it, it's not for you.

Therefore being justified by faith, we have peace with God through our Lord Jesus Christ: By whom also we have access by faith into this grace wherein we stand, and rejoice in hope of the glory of God. - Romans 5:5

Last updated

Copyright & Register Trademark by Ortus Solutions, Corp & Ortus Software, LLC