Before & after hooks

Execute an action before and after each step or test.

There are times when it’s necessary to run a specific action before or after each step or test. This can easily be done in Testim using the before & after hooks.

The before & after hooks allow users to define a hook (custom action) to be executed in the following cases:

  • Before a test
  • Before each step
  • After each step
  • After a test

Hooks are defined as part of the test configuration and can be set up using the same configuration screens.

Via the property panel


Via the configuration screen


Via the editor


Once defined, the hook actions will be applied to each test that uses the configuration.