Skip to main content

addTag

Available from testplane v8.37.0

Overview

Use the addTag command to add a tag (or multiple tags) to a test during execution.

Usage

await browser.addTag("one");
await browser.addTag(["first", "second"]);

Also, the test object now has methods to add a tag, get a list of tags, and check if a tag exists. You can use it in your plugin where you have access to test objects.

type TestTag = {
title: string;
dynamic?: boolean;
};

function addTag(tag: string | string[]): void;
function hasTag(tag: string): boolean;
function getTag(): TestTag[];

getTag returns an array of the tag objects mentioned above. Each object has a title and a dynamic field, which indicates that the tag was added during the test.

Command Parameters

NameTypeDescription
tagstring | string[]Required parameter. Name of tag or tags.