Learn how to integrate custom Node.js scripts into your TestDriver workflows for dynamic testing.
exec
command. This feature, introduced in version 5.1.0
, enables you to integrate custom logic, such as generating one-time passwords (OTPs), hitting APIs, or performing other dynamic operations, directly into your tests.
totp-generator
NPM package and use it in a test.
testdriver/testdriver.yaml
exec
command now takes a lang
argument and supports different operating systems (linux
, mac
, and windows
).lang
values are js
or shell
:
js
code is executed in a Node.js VM on the host machine (your computer).shell
code is executed in the shell on the runner.linux
, mac
, and windows
is executed based on the platform of the runner machine.result
variable.prerun
script when using GitHub Actions.