Organize Appium 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.
If you are using BrowserStack SDK, you can set the following capabilities in the browserstack.yml
file:
Capability | Description | Values |
---|---|---|
buildName |
A unique identifer for your test session | String Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. |
buildIdentifier |
A unique identifier to logically group multiple test sessions together | String Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. Default: Untitled Build |
projectName |
A unique identifier to logically group multiple builds together | String Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. Default: Untitled Project |
buildTag |
A custom tag for your builds | String Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. |
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.
BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.
Capability | Description | Values |
---|---|---|
name |
A unique identifer for your test session | String Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. |
build |
A unique identifier to logically group multiple test sessions together | String Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. Default: Untitled Build |
project |
A unique identifier to logically group multiple builds together | String Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. Default: Untitled Project |
buildTag |
A custom tag for your builds | String Only letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_) are allowed. Any other characters are ignored. |
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'
}
}
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'
}
}
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
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!