TestBox sample test directory?

Just starting on a new side project and thought I’d checkout TestBox.

Are there any sample tests available? I’ve downloaded and was hoping to see a /sample-tests directory or something I could point my install at and verify things are setup and working correctly before I go to far. I’ve also setup an /mxunit mapping and have pointed things at my MXUnit tests but all I get is a vanilla screen with Global Stats/Debug Stream but nothing is being parsed.

[ Bundles/Suites/Specs: 0/0/0 ] [ Pass: 0 ] [ Failures: 0 ] [ Errors: 0 ] [ Skipped: 0 ] [ Reset ]

No failures though so maybe it’s a good thing :slight_smile:

Thanks!
Jim

Jim,

I will update the download with our core samples. Great advice!

How are you executing the test?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Super! Think that will be very helpful for people to get up and running.

Was trying to use the Directory Runner:

**<cfset** r = new coldbox.system.testing.TestBox( directory="coldbox.testing.cases.testing.specs" ) >
**<cfoutput>**#r.run()#**</cfoutput>**

**<cfset** r = new coldbox.system.testing.TestBox( directory={ mapping="coldbox.testing.cases.testing.specs", recurse=false } ) >
**<cfoutput>**#r.run()#**</cfoutput>**

The first example failed - it complained about a missing struct - but the second one (with the struct) ‘worked’ but none of my tests were run. I’m sure it’s a path, or dot.notation path issue. I usually ran into this with MXUnit as well.

Jim

Jim, you can also see live examples of TestBox’s BDD specs in the repo for our Couchbase SDK which is currently under development:

https://github.com/Ortus-Solutions/cfcouchbase-sdk/tree/master/test/specs

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Jim

I have updated the build and you can download it from here: http://www.coldbox.org/download

The new build contains a samples directory, sample runners and also our new global runner.

Screen Shot 2013-12-09 at 5.15.20 PM 2.png

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Screen Shot 2013-12-09 at 5-1.15.20 PM.png

I’m trying to get my TestBox on after cf.Objective but I find the docs are (still) a bit confusing…

Docs say:

The standalone download structure includes:

  • apidocs : The API docs for TestBox

  • samples : Several sample tests and runners which actually are used to build TestBox

  • testbox : The core library. This is the folder you should either place in the web root or create a CF and web server mapping to.

Note, the testbox folder is the only one necessary to use the library. The other folders are just there for you to put in your web root and experiment with and build on.

So I’d expect when I unzip the file to get

  • testbox/testbox
  • testbox/samples
  • testbox/apidocs
  • etc

And then /testbox is the ‘core’ directory which I place in my webroot, mapping, etc.

Instead I unzip and I get:

  • testbox_1.1.0/apidocs
  • testbox_1.1.0/testbox
  • testbox_1.1.0/testbox/samples
  • testbox_1.1.0/testbox/system
  • etc

So now I drop /testbox in my root but now have stuff I don’t need (samples?) which is included by default under /testbox

So right now I have a mapping and IIS virtual directory both set to: /testbox = C:\inetpub\wwwroot\testbox (which contains /samples, /runner, /system, etc)

Is that correct?

Should the docs now say something like "Samples directory is under /testbox for convenience … you can delete if you don’t need sample test files… "

Hope this makes sense.

Jim

Answers Below:

I’m trying to get my TestBox on after cf.Objective but I find the docs are (still) a bit confusing…

Docs say:

The standalone download structure includes:

  • apidocs : The API docs for TestBox

  • samples : Several sample tests and runners which actually are used to build TestBox

  • testbox : The core library. This is the folder you should either place in the web root or create a CF and web server mapping to.

Note, the testbox folder is the only one necessary to use the library. The other folders are just there for you to put in your web root and experiment with and build on.

So I’d expect when I unzip the file to get

  • testbox/testbox
  • testbox/samples
  • testbox/apidocs
  • etc

And then /testbox is the ‘core’ directory which I place in my webroot, mapping, etc.

Instead I unzip and I get:

  • testbox_1.1.0/apidocs
  • testbox_1.1.0/testbox
  • testbox_1.1.0/testbox/samples
  • testbox_1.1.0/testbox/system
  • etc

So now I drop /testbox in my root but now have stuff I don’t need (samples?) which is included by default under /testbox

Jim,

The build I showed at cf.objective is the 2.0 version which has a different setup than the 1.0, I will release this next week, so will update docs for that as well.

So right now I have a mapping and IIS virtual directory both set to: /testbox = C:\inetpub\wwwroot\testbox (which contains /samples, /runner, /system, etc)

Is that correct?

You don’t really need any virtual directories to it, just CF mappings.

Should the docs now say something like "Samples directory is under /testbox for convenience … you can delete if you don’t need sample test files… "

Hope this makes sense.

Definitely, will update all docs next week.