Skip to main content

Scripts

TesmonLang features a powerful runtime based on Python that allows for dynamic behavior in your tests. With this functionality, you can create tests that include dynamic parameters, data passing between tasks, and more.

A script is a test execution element that uses Python's runtime to provide custom dynamic behavior to a test. You can add a script to the following phases of a task:

  • beforeScript: Executes before the task action.
  • validate: Executes after the task action. Use this phase to validate the task result.
  • afterScript: Executes after the task action. Use this phase to set the context for the rest of the test.
info

Supported Language: Python

Current Version: 3.11

Syntax of a Script

import uuid
print("Generated UUID: " + str(uuid.uuid4()))

Examples