Skip to main content

BatchInfo class

Set the [Configuration batch] property or [Eyes batch] property with an object of this class to configure the batch for one or more tests.

See How to group tests into batches using the SDK for details and an example.

Import statement

@import EyesXCUI

initWithName method

Syntax

Call syntax

BatchInfo* batchInfo = [[BatchInfo alloc] initWithName  : name   ];

BatchInfo* batchInfo = [[BatchInfo alloc] initWithName : name startedAt: startedAt ];

Declaration

(instancetype)initWithName:(NSString *)name startedAt:(NSDate *)startedAt

Parameters

name

Type: NSString*

The name of the batch. If a nil 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.

startedAt

Type: NSDate*

The date and time that will be displayed in the Test Manager as the batch start time.

Return value

Type: BatchInfo*

name property

Syntax

Call syntax

NSString* value = batchInfo.name

Declaration

 (readonly, copy, nonatomic) NSString *name

Type: NSString*

startedAtString property

Syntax

Call syntax

NSString* value = batchInfo.startedAtString

Declaration

 (readonly, copy, nonatomic) NSString *startedAtString

Type: NSString*

batchId property

Syntax

Call syntax

NSString* value; // give relevant initial value
batchInfo.batchId = value
value = batchInfo.batchId

Declaration

 (copy, nonatomic) NSString *batchId

Type: NSString*

The unique id of the batch. If not passed, or passed as None, 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. Since this value is unique for each test run, if you do not set the id explicitly you can only batch tests that run in the current test run.

sequenceName property

Syntax

Call syntax

NSString* value; // give relevant initial value
batchInfo.sequenceName = value
value = batchInfo.sequenceName

Declaration

 (copy, nonatomic) NSString *sequenceName

Type: NSString*

The name to be assigned to the batch sequence

Remarks

If you do not set this attribute and the environment variable APPLITOOLS_BATCH_SEQUENCE is defined, then the value of the environment variable will be used as the sequence name. If the environment variable is not defined, then the batch will not be associated with any sequence name.

notifyOnCompletion property

Syntax

Call syntax

BOOL value; // give relevant initial value
batchInfo.notifyOnCompletion = value

Declaration

 (assign, nonatomic, getter = isNotifyOnCompletion) BOOL notifyOnCompletion

Type: BOOL

If this value is true then a notification will be sent.

isNotifyOnCompletion property

Syntax

Call syntax

BOOL value = batchInfo.notifyOnCompletion

Declaration

 (assign, nonatomic, getter = isNotifyOnCompletion) BOOL notifyOnCompletion

Type: BOOL