Name | Type | Required | Default | Hint |
handler | string | true | Name of the handler to test | |
actions | string | false | A comma-delimited list of actions to generate | |
appMapping | string | false | / | The root location of the application in the web root: ex: /MyApp or / if in the root |
bdd | boolean | false | true | Defaults to BDD style |
xunit | boolean | false | false | You can alternatively use xUnit style |
open | boolean | false | false | Open the file once it is created |
script | boolean | false | true | Generate content in script markup or tag markup |
directory | string | false | tests/specs/integration | The base directory to create your test spec in and creates the directory if it does not exist. Defaults to 'tests/specs/integration' |
Create a new integration spec in an existing ColdBox-enabled application. Run this command in the root
of your app for it to find the correct folder. By default, your new test spec will be created in /tests/specs/integration but you can
override that with the directory param as well. You can also choose your testing style: BDD or xUnit.
#Generate a handler integration spec using BDD
coldbox create integration-test contacts
#Generate a handler integration spec using BDD and open the file
coldbox create integration-test contacts --open
#Generate a handler integration spec using BDD with several actions
coldbox create integration-test contacts index,save,delete
#Generate a handler integration spec using xUnit
coldbox create integration-test contacts --xunit