I understand the runner isn’t necessarily under the domian of this group, but I’m hoping someone might shed a little light.
I got textbox up and running locally in a project, and when I go to the tests/runner.cfm page in my browser, it runs great.
I also set up a grunt task to run the same file via testbox-runner, and while I’m fairly certain the tests are running (it takes a bit to run ~250ms), I’m getting a ‘No results found’ message. Anyone run in to anything similar?
bdw429s
November 15, 2015, 8:48pm
2
Are you using this project?
https://github.com/seancoyne/testbox-runner
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
Sorry for the late reply. Yes! I’m using the runner. Here’s my gruntfile:
module.exports = function(grunt) {
grunt.loadNpmTasks(‘grunt-shell’);
grunt.initConfig({
watch: {
cfml: {
files: [
"model/services/.cfc",
'testbox/tests/specs/ .cfc’
],
tasks: [ “testbox” ]
}
},
shell: {
testbox: {
command: ‘./node_modules/testbox-runner/index.js --colors --runner http://localhost:8500/XMD/testbox/system/runners/HTMLRunner.cfm --directory /tests/specs --recurse true’
}
},
js: {
files: [
‘js/.js’,
'specs/ .js’,
‘model/services/*.cfc’ ],
tasks: [‘jasmine:all’]
}
});
grunt.registerTask(“testbox”, [ “shell:testbox” ]);
grunt.loadNpmTasks(‘grunt-contrib-jasmine’);
grunt.loadNpmTasks(‘grunt-contrib-watch’);
}
bdw429s
November 17, 2015, 8:36pm
4
I’ve not used that yet so I’m not sure. Gavin did just set this up the other day for his CF Summit preso so he may have some insight.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
gpickin
November 17, 2015, 9:22pm
5
So a couple of tests
If you run the following, what happens?
http://localhost:8500/XMD/testbox/system/runners/HTMLRunner.cfm?directory=/tests/specs
What about the JSON version
http://localhost:8500/XMD/testbox/system/runners/HTMLRunner.cfm?directory=/tests/specs&reporter=json
The runner uses the JSON before it spits out, so I wonder if there is an issue generating the json, or maybe parsing it.
Try this and see.
Your runner looks like it should work though… my gist, which has jasmine too looks pretty consistent with yours.
Gruntfile.js
// Original Source: http://www.meanstack.co/setting-up-jasmine-and-grunt/
// Combined with https://gist.github.com/seancoyne/9b1b24dca08ed9282fc6
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-shell');
grunt.initConfig({
pkg: grunt.file.readJSON('node_modules/grunt/package.json'),
jasmine: {
This file has been truncated. show original
Let me know what those links produce.
Okay, so it looks like there’s still config error somewhere. Running both of those gives me an error page complaining that :
Could not find the ColdFusion component or interface testbox.system.TestBox
Which is definitely in that directory.
Just to be clear, I’ve got the testbox directory inside my main application dir:
APP
APP/testbox
APP/testbox/system/TestBox.cfc
That was a little misleading. Directory structure is this:
XMD
XMD/testbox
XMD/testbox/system/TestBox.cfc
bdw429s
November 17, 2015, 11:56pm
8
If / is your web root, you need a /testbox mapping that points to /XMD/testbox.
Right now, the full component path is XMD.testbox.system.TestBox
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
Apparently, there was already a testbox mapping according the the CF admin page. I’m guessing the install process did that? Regardless, I just moved the entire testbox directory up into the webroot, and now it’s working!
Thanks for the help, and Gavin, I really enjoyed your talk at the CF summit.
Thanks!