Organize Tests

Name your tests and group your builds by build names and project for better reporting.

You can organize your automated tests by projects and builds by using the project, build, and name capabilities.

Capability Description Expected values
name Name for your session / test case A string.
Note that only letters (A-Z, a-z), digits (0-9), periods (.), colons (:) and underscores (_) are allowed. Any other characters are ignored.
build Build version / number A string.
Note that only letters (A-Z, a-z), digits (0-9), periods (.), colons (:) and underscores (_) are allowed. Any other characters are ignored.
project Name of your project A string.
Note that only letters (A-Z, a-z), digits (0-9), periods (.), colons (:) and underscores (_) are allowed. Any other characters are ignored.

For example, if you are working on your new marketing website, and want to run your test suite for the Alpha 0.1.7 build, you can pass the following capabilities:

// Testing the home page

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("project", "Marketing Website v2");
caps.setCapability("build", "alpha_0.1.7");
caps.setCapability("name", "Home page must have a title");
// Testing the home page

var capabilities = {
 "project" : "Marketing Website v2",
 "build" : "alpha_0.1.7",
 "name" : "Home page must have a title"
}
// Testing the home page

DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("project", "Marketing Website v2");
caps.SetCapability("build", "alpha_0.1.7");
caps.SetCapability("name", "Home page must have a title");
# Testing the home page

$caps = array(
 "project" => "Marketing Website v2",
 "build" => "alpha_0.1.7",
 "name" => "Home page must have a title"
);
# Testing the home page

capabilities = {
 "project" : "Marketing Website v2",
 "build" : "alpha_0.1.7",
 "name" : "Home page must have a title"
}
# Testing the home page

caps = Selenium::WebDriver::Remote::Capabilities.new
caps["project"] = "Marketing Website v2"
caps["build"] = "alpha_0.1.7"
caps["name"] = "Home page must have a title"
# Testing the home page

my $capabilities = {
 "project" => "Marketing Website v2",
 "build" => "alpha_0.1.7",
 "name" => "Home page must have a title"
}

When you run the next test, just update the name and it is grouped automatically into the same build and project.

// Testing the admin page

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("project", "Marketing Website v2");
caps.setCapability("build", "alpha_0.1.7");
caps.setCapability("name", "Admin page access must be denied");
// Testing the admin page

var capabilities = {
 "project" : "Marketing Website v2",
 "build" : "alpha_0.1.7",
 "name" : "Admin page access must be denied"
}
// Testing the admin page

DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("project", "Marketing Website v2");
caps.SetCapability("build", "alpha_0.1.7");
caps.SetCapability("name", "Admin page access must be denied");
# Testing the admin page

$caps = array(
 "project" => "Marketing Website v2",
 "build" => "alpha_0.1.7",
 "name" => "Admin page access must be denied"
);
# Testing the admin page

capabilities = {
 "project" : "Marketing Website v2",
 "build" : "alpha_0.1.7",
 "name" : "Admin page access must be denied"
}
# Testing the admin page

caps = Selenium::WebDriver::Remote::Capabilities.new
caps["project"] = "Marketing Website v2"
caps["build"] = "alpha_0.1.7"
caps["name"] = "Admin page access must be denied"
# Testing the admin page

my $capabilities = {
 "project" => "Marketing Website v2",
 "build" => "alpha_0.1.7",
 "name" => "Admin page access must be denied"
}
Protip: You can use the name capability to give your session a name (usually describing the test case) and build capability (usually the same as the build ID that’s on your CI/CD platform) so that it is easy for you to debug later.

Remember to update the build version / number the next time you run the test again. If you are running your tests on a different project, remember to update the project name too.

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