Carla Test Helper v0.1.14 CarlaTestHelper View Source
Carla test helper
Link to this section Summary
Functions
Macro to help easily define a set a list of assertions to test against the bot.
carlatest
will accept a name and a list of assertion functions and return a new function
with the given name that accepts 2 parameters
Get the adapter based on the bot version
Get the adapter specified in the config file
Link to this section Functions
Macro to help easily define a set a list of assertions to test against the bot.
carlatest
will accept a name and a list of assertion functions and return a new function
with the given name that accepts 2 parameters.
The resulting function’s parameters:
- uuid - The uuid of the user to use when testing the list of assertions.
- state (defaults to
%{}
) - The state to setup for the user before running tests.
The macro’s assertions
argument is a expected to be a list of assertion functions.
This macro will take the list of functions and iterate through each one and call them.
This allows the user of the macro to define a conversation test case like so:
carlatest "request details optima", do: [
message("optima", "request.details.optima"),
quick_reply("Build & Price", "build:_optima"),
]
Get the adapter based on the bot version
Get the adapter specified in the config file
Returns a Response object.