test.run

From RPTools Wiki
Jump to navigation Jump to search

Languages:  English


 This article describes a feature or macro function that is experimental and may be subject to change.

test.run() Function

 Note: This function can only be used in a Trusted Macro

Runs all test: prefixed macros on selected test: tokens. If no tokens selected, runs all test: macros on all test: tokens on the current map. Displays and stores results.

Usage

test.run()

Example

[r: test.run()]

Results of tests are stored on a token property with the name of the test macro as a json object.

[r: getProperty("test: myUDFs")]
output: {"status":"failure","messages":[" Failed, expected 1 got 0"]}

Function changes macro button colour to indicate success or failure.

Success and Failure coloured macros

See Also

Languages:  English