GutHookScript
Inherits: RefCounted
This script is the base for custom scripts to be used in pre and post run hooks.
Description
GUT Wiki: https://gut.readthedocs.io
Creating a hook script requires that you:
Inherit
GutHookScriptImplement a
run()methodConfigure the path in GUT (gutconfig and/or editor) as the approparite hook (pre or post).
See Hooks
Properties
|
||
|
Methods
void |
abort() |
void |
run() |
void |
set_exit_code(code: int) |
Property Descriptions
Variant JunitXmlExport = load(...) 🔗
Class responsible for generating xml. You could use this to generate XML yourself instead of using the built in GUT xml generation options. See addons/gut/junit_xml_export.gd
This is the instance of GutMain that is running the tests. You can get information about the run from this object. This is set by GUT when the script is instantiated.
Method Descriptions
void run() 🔗
Virtual method that will be called by GUT after instantiating this script. This is where you put all of your logic.
void set_exit_code(code: int) 🔗
Set the exit code when running from the command line. If not set then the default exit code will be returned (0 when no tests fail, 1 when any tests fail).
Returns the exit code set with set_exit_code
void abort() 🔗
Usable by pre-run script to cause the run to end AFTER the run() method finishes. GUT will quit and post-run script will not be ran.
Returns if abort was called.