BatchInfo method

Class: BatchInfoPlatform: PlaywrightLanguage: JavaScript SDK:

The constructor for the BatchInfo class.

Create the object, set it up and assign it to the batch before the test starts using the Configuration.setBatch method or Eyes.setBatch method. See How to group tests into batches using the SDK for more details and an example.


//overloaded methods
let batchinfo = new BatchInfo();
let batchinfo = new BatchInfo(batch);
let batchinfo = new BatchInfo(name);
let batchinfo = new BatchInfo(name, startedat);
let batchinfo = new BatchInfo(name, startedat, id);


Type:BatchInfoPlain [Optional ]
An object that describes te batch attributes.
Type:string [Optional ]

The name of the batch. If a is passed then the name will be taken from the environment variable APPLITOOLS_BATCH_NAME. If the environment variable is not defined then the name of the first test is used as the batch name.

[Optional ]
The date and time that will be displayed in the Test Manager as the batch start time.
Type:string [Optional ]
The unique id of the batch. If not passed, or passed as null, and the environment variable APPLITOOLS_BATCH_ID is defined, then the value of the environment variable will be used as the id. If the environment variable is not defined then a unique internal id will be generated and used.

Return value

Type: BatchInfo