Hook Scripts

The provengo Tool can run shell commands as part of the test execution process. These commands are typically used for setup, teardown, or cleanup. Of course, they can be used for other purposes as well, such as posting messages to Slack channels or automatically boasting about a bug-free version on your social network of choice.

To run a shell command, add the one of the following parameters to the run command, along with the command to execute.

For example: on Windows, the following command will start a Selenium Server before running the tests:

provengo run --setup "selenium-server standalone" project_path

List of Hook Scripts

Script parameter name Role

setup

Run before the tests start. Typically, used for bringing the test system up.

before-test

Run before each test. Can be used to reset system data or ensure no intermediate artifacts that can fail the following test are present.

after-success

Run after a successful test. Can be used to clean the test results up.

after-failure

Run after a test failed test. Typically, used for cleanup and reset of the test system after the failure.

teardown

Run after all the tests were executed. Typically, used to clean up, free resources, or shut down the tested system.