Test Watcher
This is an extension of the testbox run command but will watch the files in a directory and run the default TestBox suite on any file change.
1
testbox watch
Copied!
In order for this command to work, you need to have started your server and configured the URL to the test runner in your box.json.
1
package set testbox.runner=http://localhost:8080/tests/runner.cfm
2
server start
3
testbox watch
Copied!
You can also control what files to watch.
1
testbox watch **.cfc
Copied!
If you need more control over what tests run and their output, you can set additional options in your box.json which will be picked up automatically by testbox run when it fires.
1
package set testbox.verbose=false
2
package set testbox.labels=foo
3
package set testbox.testSuites=bar
4
package set testbox.watchDelay=1000
5
package set testbox.watchPaths=/models/**.cfc
Copied!
This command will run in the foreground until you stop it. When you are ready to shut down the watcher, press Ctrl+C.
Copy link
Edit on GitHub