Skip to main content
Start running your tests on the latest iOS minor versions on BrowserStack App Automate. Check out our documentation!

Organize tests

You can organize your automated test sessions by using name, build, project, and buildTag capabilities on BrowserStack. These capabilities define how your test sessions are grouped together and accessed on the App Automate dashboard and REST API. All these capabilities are optional.

Capability Description Values
name A unique identifer for your test session String
Note that only letters (A-Z, a-z), digits (0-9), periods (.), colons (:) and underscores (_) are allowed. Any other characters are ignored.
build A unique identifier to logically group multiple test sessions together String
Note that only letters (A-Z, a-z), digits (0-9), periods (.), colons (:) and underscores (_) are allowed. Any other characters are ignored.
Default: Untitled Build
project A unique identifier to logically group multiple builds together String
Note that only letters (A-Z, a-z), digits (0-9), periods (.), colons (:) and underscores (_) are allowed. Any other characters are ignored.
Default: Untitled Project
buildTag A custom tag for your builds String
Note that only letters (A-Z, a-z), digits (0-9), periods (.), colons (:) and underscores (_) are allowed. Any other characters are ignored.

Example :

DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("project", "MySampleProject");
browserstackOptions.put("build", "MySampleBuild");
browserstackOptions.put("name", "MySampleTest");
browserstackOptions.put("buildTag", "reg");
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
'bstack:options' : {
	'project': 'MySampleProject',
    'build': 'MySampleBuild',
    'name': 'MySampleTest',
    'buildTag': 'reg'
}
}
SafariOptions capabilities = new SafariOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("project", "MySampleProject");
browserstackOptions.Add("build", "MySampleBuild");
browserstackOptions.Add("name", "MySampleTest");
browserstackOptions.Add("buildTag", "reg");
capabilities.AddAdditionalOption("bstack:options", browserstackOptions);
$caps = array(
'bstack:options' => array(
"project" => "MySampleProject";
"build" => "MySampleBuild";
"name" => "MySampleTest";
"buildTag" => "reg";
),
)
desired_cap = {
'bstack:options' : {
	'project': 'MySampleProject',
    'build': 'MySampleBuild',
    'name': 'MySampleTest',
    'buildTag': 'reg'
}
}
capabilities = {
'bstack:options' => {
    'project' => 'MySampleProject',
    'build' => 'MySampleBuild',
    'name' => 'MySampleTest'
    'buildTag' => 'reg'
}
}
Note: It’s best practice to group all test sessions executed from a single CI/CD build job under a unique build name.

Adding build tags

You can add a custom build tag to your builds using the buildTag capability or using REST API. You can filter your builds according to the assigned tag on the App Automate dashboard.

Use the following code example to add a build tag to your test:

DesiredCapabilities caps = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("build", "alpha_0.1.7");
browserstackOptions.put("name", "Home page must have a title");
browserstackOptions.put("buildTag", "reg");
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
'bstack:options' : {
 'build' : 'alpha_0.1.7',
 'name' : 'Home page must have a title',
 'buildTag' : 'reg'
    }
}  
SafariOptions capabilities = new SafariOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("build", "alpha_0.1.7", true);
browserstackOptions.Add("name", "Home page must have a title", true);
browserstackOptions.Add("buildTag", "reg");
capabilities.AddAdditionalOption("bstack:options", browserstackOptions);
$caps = array(
'bstack:options' => array(
   "build" => "alpha_0.1.7",
   "name" => "Home page must have a title",
   "buildTag" => "reg"
),
)
desired_cap = {
'bstack:options' : {
 "build" : "alpha_0.1.7",
 "name" : "Home page must have a title",
 "buildTag" : "reg"
}
}
capabilities = {
'bstack:options' => {
"build" => 'alpha_0.1.7',
"name" => 'Home page must have a title',
"buildTag" => "reg",
},
}
my $extraCaps = {
'bstack:options' => {
  'build' => 'alpha_0.1.7',
  'name' => 'Home page must have a title',
  'buildTag' => 'reg'
  }
}
Note: Ensure that you set up build name before you add a tag, otherwise the build tag will be ignored.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Talk to an Expert