Blog

Luis Majano

May 18, 2017

Spread the word


Share your thoughts


We are excited to announce the release of TestBox version 2.5.0. To install just do:

box install testbox --savedev

To upgrade your current testbox installation just run the following:

box uninstall testbox && install testbox --savedev

TestBox 2.5.0 is a minor release with some great new functionality and tons of fixes. You can find the release notes here and the major updates for this release. One of the biggest features for TestBox that was not part of TestBox, was the addition of TestBox Watchers to CommandBox.

TestBox Watchers

CommandBox CLI has added watching capabilities to the testbox namespace. Which means you can now run the following command in the root of your project: testbox watch and it will monitor all your CFCs for changes. If a change is detected, then it will fire the new testbox run command with our CLI reporter.

Life-Cycle Data Binding

We had introduced spec data binding in TestBox for creating dynamic specs and passing dynamic data into them. We have extended this feature into life-cycle methods:

  • beforeEach()
  • afterEach()
  • aroundEach()

You can now pass in an argument called data which is a struct of dynamic data to pass into the life-cycle method. You can then pickup this data in the closure for the life-cycle. Here is a typical example:

describe( "Ability to bind data to life-cycle methods", function(){
	var data = [
		"spec1",
		"spec2"
	];

	for( var thisData in data ){
		describe( "Trying #thisData#", function(){
			beforeEach( data={ myData = thisData }, body=function( currentSpec, data ){
				targetData = arguments.data.myData;
			});
			it( title="should account for life-cycle data binding",
				data={ myData = thisData},
				body=function( data ){
				expect(	targetData ).toBe( data.mydata );
			}
	);

	afterEach( data={ myData = thisData }, body=function( currentSpec, data ){
		targetData = arguments.data.myData;
		});
	});
	}

	for( var thisData in data ){

		describe( "Trying around life-cycles with #thisData#", function(){
			aroundEach( data={ myData = thisData }, body = function( spec, suite, data ){
				targetData = arguments.data.myData;
				arguments.spec.body( data=arguments.spec.data );
			});

			it( title="should account for life-cycle data binding",
				data={ myData = thisData },
				body=function( data ){
				expect(	targetData ).toBe( data.mydata );
			}
			);
		});

	}
});

Release Notes

Bugs

  • [TESTBOX-177] - Simple reporter broken on Adobe servers
  • [TESTBOX-180] - HTML Runner links should include directory param
  • [TESTBOX-181] - AsyncAll Errroring on xUnit runner
  • [TESTBOX-183] - the 'type' argument was being ignored if the 'regex' argument was provided and matched the exception data

Improvements

  • [TESTBOX-178] - Remove thread scope from debug stream
  • [TESTBOX-184] - Passing Data to Dynamic Tests via life-cycle methods: around, after, before
  • [TESTBOX-185] - Preserve whitespace in HTML (simple) Reporter
  • [TESTBOX-186] - Include TestBox version in TestResult memento
  • [TESTBOX-187] - Let travis handle upload of api docs and snapshot binaries
  • [TESTBOX-188] - Aggregate suite stats from nested suties

Add Your Comment

Recent Entries

BoxLang 1.0.0 Beta 7 Launched

BoxLang 1.0.0 Beta 7 Launched

We are pleased to announce the release of BoxLang 1.0.0-Beta 7! This latest beta version includes improvements and essential bug fixes, but more importantly it certifies the execution of ColdBox HMVC and TestBox.

What is BoxLang?

BoxLang is a modern dynamic JVM language that can be deployed on multiple runtimes: operating system (Windows/Mac/*nix/Embedded), web server, lambda, iOS, android, web assembly, and more. BoxLang combines many features from different progr

Luis Majano
Luis Majano
July 26, 2024
New BoxLang Feature: Java Method References and Higher-Order Functions

New BoxLang Feature: Java Method References and Higher-Order Functions

We’ve added more goodies to our BoxLang Java interop: method references and higher-order functions. CFML has never let you do these things, making Java Interop feel like a second-class citizen. But with BoxLang, we’re elevating Java integration to a new level.

Maria Jose Herrera
Maria Jose Herrera
July 26, 2024
Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Are you a CFML developer looking to take your skills to the next level? Look no further than the ColdBox from Zero to Hero Virtual Live Training! This intensive two-day course will equip you with the knowledge and expertise to build robust and scalable applications using ColdBox 7, the latest version of the most popular CFML MVC framework.

What You'll Learn:

  • Master the Fun...

Cristobal Escobar
Cristobal Escobar
July 24, 2024