Copyright © 2012- Klarna AB, AUTHORS
Klarna API Testing Tool
Use for shooting http requests in a sequential order and verifying the response.callbacks() = [{atom(), function()}]
details() = any()
http_header() = {string(), string()}
katt_blueprint() = #katt_blueprint{filename = file:filename() | null, name = utf8_string() | null, description = utf8_string() | null, transactions = [#katt_transaction{description = utf8_string() | null, params = katt_transaction_params(), request = #katt_request{method = string(), url = string(), headers = [http_header()], body = binary() | null}, response = #katt_response{status = integer(), headers = [http_header()], body = binary() | null, parsed_body = any()}}], footer = utf8_string() | null}
katt_transaction_param_name() = string()
katt_transaction_param_value() = atom() | integer() | float() | string() | binary()
katt_transaction_params() = [{katt_transaction_param_name(), katt_transaction_param_value()}]
param_name() = string() | atom()
param_value() = atom() | integer() | float() | string() | binary()
params() = [{param_name(), param_value()}]
reason() = atom()
run_error() = {error, reason(), details()}
run_result() = run_error() | scenario_result()
scenario() = file:filename() | katt_blueprint()
scenario_result() = {pass | fail, file:filename(), params(), params(), [transaction_result()]}
transaction_result() = {string(), params(), #katt_request{method = string(), url = string(), headers = [http_header()], body = binary() | null}, #katt_response{status = integer(), headers = [http_header()], body = binary() | null, parsed_body = any()}, validation_result()}
utf8_string() = unicode:unicode_binary()
validation_failure() = {reason(), details()}
validation_result() = pass | {fail, [validation_failure()]}
main/1 | Run from CLI with arguments. |
run/1 | Run test scenario. |
run/2 | Run test scenario. |
run/3 | Run test scenario. |
main(Args::[string()]) -> ok | {error, katt_bare_mode}
Run from CLI with arguments.
run(Scenario::scenario()) -> run_result()
Run test scenario. Argument is the full path to the scenario file, a KATT Blueprint file, or the KATT Blueprint itself.
run(Scenario::scenario(), Params::params()) -> run_result()
Run test scenario. Argument is the full path to the scenario file, a KATT Blueprint file, or the KATT Blueprint itself.
run(Scenario::scenario(), ScenarioParams::params(), ScenarioCallbacks::callbacks()) -> run_result()
Run test scenario. First argument is the full path to the scenario file, a KATT Blueprint file, or the KATT Blueprint itself. Second argument is a key-value list of parameters, such as hostname, port. You can also pass custom variable names (atoms) and values (strings). Third argument is a key-value list of custom callbacks such as a custom parser to use instead of the built-in default parser (maybe_parse_body).
Generated by EDoc