-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced
Damyon Wiese edited this page Jun 2, 2017
·
1 revision
There are some advanced options you can use with scrats.
First is custom scripts. If you want to create a library of shared scripts that are available to tests (e.g. a library of common navigation functions for your application) you can pre-load those scripts before executing each test. Just specify the "-p <scriptfile.js>" option up to 10 times and each script will be pre-loaded in the same order.
Second is datasets. Sometimes you want to run the same test multiple times with different values. You can do this by passing a json array of values to the "-d" argument. The test will be repeated once for each item in the array and the global variable "state" will contain the current value of the item for this test instance.