This extension provides support for the TestBox BDD/TDD framework in Visual Studio Code by Ortus Solutions.
- TestBox 6.x+
- TestBox 5.x+
- TestBox 4.x+
Tests are discovered automatically and a test explorer view is available from the Activity Bar. You can run tests from the explorer view by clicking on the play icon as well as being able to run the tests right from the editor.
A "Jump to specific TestBox spec" is available in the command pallete. This lets you quickly search for and jump to a specific spec in the currently open file.
You can add a custom keyboard shortcut for this yourself in your Keyboard Shortcuts menu or use the default of shift+cmd+t
We have also added a few commands to the command pallete to help you with your testing:
You can :
- Run the entire test harness
- Run the bundle you have currently open
- Run the spec you have your cursor on
- Run the previous tests
We have now added a configuration panel so you can configure the runners and commands. You can access it via the command pallete or the settings panel.
bdd ➝
: Creates a TestBox BDD Bundleunit ➝
: Creates a TestBox TDD xUnit Bundle
assert
: Anassert()
methodafterAll ➝
: AnafterAll()
BDD life-cycle methodaftereach ➝
: AnafterEach()
BDD closureafterTests ➝
: AnafterTests()
xUnit life-cycle methodaroundEach ➝
: AnaroundEach()
BDD closurebdd ➝
: Creates a new BDD Test Bundle CFCbeforeAll ➝
: AnbeforeAll()
BDD life-cycle methodbeforeeach ➝
: AbeforeEach()
BDD closurebeforeTests ➝
: AnbeforeTests()
xUnit life-cycle methodconsole ➝
: TestBox send some output to the consoledebug ➝
: Writes up a non-duplicatedebug()
calldebugduplicate ➝
: Writes up adebug()
call with duplicatedescribe ➝
: Adescribe
suitedescribeFull ➝
: Adescribe
suite with all argumentsexpect ➝
: Starts an expectation DSL with atoBe()
additionexpectAll ➝
: Starts a collection expectation DSL with atoBe()
additionexpectFalse ➝
: Does a false expectation expressionexpectTrue ➝
: Does a true expectation expressionexpectToThrow ➝
: Starts an expectation that throws an exceptionfeature, featureFull ➝
: Starts afeature()
blockgiven, givenFull ➝
: Starts agiven()
blockit ➝
: A test specitFull ➝
: A test spec with all argumentssetup ➝
: Ansetup()
xUnit life-cycle methodstory, storyFull ➝
: Starts astory()
blockteardown ➝
: Anteardown()
xUnit life-cycle methodthen, thenFull ➝
: Starts athen()
blockunit ➝
: Creates a new xUnit Test Bundle CFCwhen, whenFull ➝
: Starts awhen()
block
handlerTest ➝
: Creates a ColdBox Event Handler test caseintegrationTest ➝
: Creates a top down integration BDD test caseinterceptorTest ➝
: Creates an Interceptor test casemodelTest ➝
: Creates a model test casetestaction ➝
: Creates an integration spec case for an event action
Install the latest vscode-testbox package from https://marketplace.visualstudio.com/.
You can get official support in the following channels: