public class TestsService
extends java.lang.Object
Provides basic functionality for the test planning unit.
The test planning Web service is part of many other Web services in SilkCentral Test Manager. To use the test planning Web service, you may also need some of the other services.String url = "http://localhost:19120/services/"; testsService = new TestsServiceService(new URL(url + "jaxws/tests")).getTestsServicePort();You must log in on SilkCentral Test Manager. Without valid authentication you can not use any service methods. The following code snippet logs in a user and retrieves the sessionId that can be used for all further webservice calls:
String sessionId = testsService.logonUser("admin", "admin");
// Create property values. For test definitions, at least 'Name' and 'testdef_type' are required.
// Use web service demo client to retrieve available property Id tokens.
PropertyValue nameProperty = new PropertyValue(null, -1, "Name", "-1", "_node_properties_Name", "_node_properties_", 1, "My new Silktest");
PropertyValue typeProperty = new PropertyValue(null, -1, "testdef_type", "-1", "node_properties_testdef_type", "_testdef_node_", 1, "_st_");
// Note, Keyword driven tests can only be updated, but not added.
// To add new keyword-driven tests, import them as manual tests first and then convert them with the "Automate with...Keyword-Driven Test" feature.
// Create a planning tree node
PlanningNode silkTestDefinition = new PlanningNode();
silkTestDefinition.setKind(3);
// Assign properties to the planning tree node
silkTestDefinition.setPropertyValues(new PropertyValue[] {nameProperty, typeProperty});
// Webservice call to add the node
testsService.addNode(sessionId, PROJECTID, PARENT_NODE_Id, silkTestDefinition);
Use Test Planning Web Service Demo Client to find out what properties to assign for specific test planning nodes.
// Add manual test definition with 2 steps
int nodeId = testsService.addManualTest(sessionId, mTcId, "ManualTest", "inserted by Unittest",
new ManualTestStep[] {new ManualTestStep(1, "s1", "d1", "r1", new CustomStepProperty[0]),
new ManualTestStep(2, "s2", "d2", "r2", new CustomStepProperty[] {new CustomStepProperty(1, 0, // sequence is not in use
"cprop", "avalue"),}),},
new NodeParameter[0]);
// Add test step at 1st position
ManualTestStep newStep = new ManualTestStep(1, "s3", "d3", "r3", new CustomStepProperty[] {new CustomStepProperty(1, 0, "cprop", "avalue-2"),});
testsService.addManualTestStep(sessionId, nodeId, newStep);
// Append test step
newStep = new ManualTestStep(4, "s4", "d4", "r4", new CustomStepProperty[] {new CustomStepProperty(1, 0, "cprop", "avalue-3"),});
testsService.addManualTestStep(sessionId, nodeId, newStep);
// Insert test step between s1 and s2
nodeId = testsService.addManualTest(sessionId, mTcId, "ManualTest1", "inserted by Unittest",
new ManualTestStep[] {new ManualTestStep(1, "s1", "d1", "r1", new CustomStepProperty[0]),
new ManualTestStep(2, "s2", "d2", "r2", new CustomStepProperty[] {new CustomStepProperty(1, 0, "cprop", "avalue"),}),},
new NodeParameter[0]);
newStep = new ManualTestStep(2, "s3", "d3", "r3", new CustomStepProperty[] {new CustomStepProperty(1, 0, "cprop", "avalue-2"),});
testsService.addManualTestStep(sessionId, nodeId, newStep);
// Set current Test Container
NamedEntity[] testContainers = testsService.getTestContainers(sessionId, PROJECTID_DEMO);
// Create JUnit Test Definition:
// (1) Compose test properties - use web service demo client to retrieve available property Id tokens
// (1.1) Test type
PropertyValue testType = new PropertyValue();
testType.setPropertyTypeId("_testdef_node_");
testType.setPropertyId("_node_properties_testdef_type");
testType.setValue("_junit_");
// (1.2) Test name
PropertyValue testName = new PropertyValue();
testName.setPropertyTypeId("_node_properties_");
testName.setPropertyId("_node_properties_Name");
testName.setValue("my junit test-1");
// (1.3) Description
PropertyValue testDescription = new PropertyValue();
testDescription.setPropertyTypeId("_node_properties_");
testDescription.setPropertyId("_node_properties_Description");
testDescription.setValue("my test description");
// (1.4) Test class
PropertyValue testClass = new PropertyValue();
testClass.setPropertyTypeId("_junit_");
testClass.setPropertyId("_junit_ClassFile");
testClass.setValue("com.mycomp.MyTest");
// (2) Create test node in test planning tree
PlanningNode aNode = new PlanningNode();
aNode.setKind(3); // see PlanningNode.kind in javadoc
aNode.setPropertyValues(new PropertyValue[] {testType, testName, testDescription, testClass});
testsService.addNode(sessionId, PROJECTID_DEMO, testContainers.get(0).getId(), aNode);
// (1) Compose test properties - use web service demo client to retrieve
// available property Id tokens
// (1.1) Test type
PropertyValue testType = new PropertyValue();
testType.setPropertyTypeId("_testdef_node_");
testType.setPropertyId("_node_properties_testdef_type");
testType.setValue("_mt_");
// (1.2) Test name
PropertyValue testName = new PropertyValue();
testName.setPropertyTypeId("_node_properties_");
testName.setPropertyId("_node_properties_Name");
testName.setValue("New Test");
// (1.3) Description
PropertyValue testDescription = new PropertyValue();
testDescription.setPropertyTypeId("_node_properties_");
testDescription.setPropertyId("_node_properties_Description");
testDescription.setValue("New test description.");
// (1.4) Release attribute
PropertyValue release = new PropertyValue();
release.setPropertyTypeId("_attribute_");
release.setPropertyId("_attribute_Release");
release.setValue("Release 2009");
release.setType(11); // type normal
// (1.5) Sprint attribute
PropertyValue sprint = new PropertyValue();
sprint.setPropertyTypeId("_attribute_");
sprint.setPropertyId("_attribute_Sprint");
sprint.setValue("Sprint 8");
sprint.setType(11);
// (2) Create test node in test planning tree
PlanningNode node = new PlanningNode();
node.setKind(3); // see PlanningNode.kind in javadoc
node.setPropertyValues(new PropertyValue[] {testType, testName, testDescription, release, sprint});
int testFolderId = testsService.getIntegrationDefaultFolderId(sessionId, currentProjectId);
System.out.println("nodeId=" + testsService.addNode(sessionId, currentProjectId, testFolderId, node));
// Create Manual Test Definition
PlanningNode testNode = new PlanningNode();
testNode.setKind(3);
testNode.setName("Step Referencing Other Test Definition");
// (1) Compose test properties
PropertyValue[] properties = new PropertyValue[2];
testNode.setPropertyValues(properties);
// (1.1) Test type
PropertyValue typeProperty = new PropertyValue();
typeProperty.setPropertyId("_node_properties_testdef_type");
typeProperty.setPropertyTypeId("_node_properties_");
typeProperty.setName("testdef_type");
typeProperty.setValue("_mt_"); // Steps can also be added to other test definition types
properties[0] = typeProperty;
// (1.2) Step list property: contains multiple steps as children
PropertyValue stepList = new PropertyValue();
stepList.setPropertyId("_mt_ManualTestStep[]");
stepList.setPropertyTypeId("_mt_");
stepList.setName("ManualTestStep[]");
properties[1] = stepList;
// (1.2.1) Normal Step property: Denotes the name of a step and contains predefined and custom step properties as children
PropertyValue normalStep = new PropertyValue();
normalStep.setPropertyId("_mt_ManualTestStep_Container");
normalStep.setPropertyTypeId("_mt_ManualTestStep_");
normalStep.setValue("My normal step");
// (1.2.1.1) Order property: Denotes the position of the step
PropertyValue order = new PropertyValue();
order.setPropertyId("_mt_ManualTestStep_Order");
order.setPropertyTypeId("_mt_ManualTestStep_");
order.setValue("0");
// (1.2.1.2) Expected results property: Denotes the value (text) of the Expected Results field
PropertyValue expectedResults = new PropertyValue();
expectedResults.setPropertyId("_mt_ManualTestStep_ExpectedResults");
expectedResults.setPropertyTypeId("_mt_ManualTestStep_");
expectedResults.setValue("Expected Result Text");
// (1.2.1.3) Description property: Denotes the value (text) of the Description field
PropertyValue description = new PropertyValue();
description.setPropertyId("_mt_ManualTestStep_Description");
description.setPropertyTypeId("_mt_ManualTestStep_");
description.setValue("Description Text");
normalStep.setChildren(new PropertyValue[] {expectedResults, description, order});
// (1.2.2) Step calling a shared steps collection in a library
PropertyValue callStep = new PropertyValue();
callStep.setPropertyId("_mt_ManualTestStep_Container");
callStep.setPropertyTypeId("_mt_ManualTestStep_");
callStep.setValue("#1111");
// (1.2.2.1) Called shared steps node Id property: the value is the Id of the called shared steps node (1111 here)
PropertyValue calledSharedStepsNodeIdProperty = new PropertyValue();
calledSharedStepsNodeIdProperty.setPropertyId("_mt_ManualTestStep_CalledSharedStepsNodeId");
calledSharedStepsNodeIdProperty.setPropertyTypeId("_mt_ManualTestStep_");
calledSharedStepsNodeIdProperty.setValue("1111");
callStep.setChildren(new PropertyValue[] {calledSharedStepsNodeIdProperty});
stepList.setChildren(new PropertyValue[] {normalStep, callStep});
testsService.addNode(sessionId, currentProjectId, 1, testNode);
| Constructor and Description |
|---|
TestsService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeOptions(java.lang.String sessionId,
int projectId,
java.lang.String attributeName,
AttributeOption[] options)
Adds attribute options to the given attribute identified by attributeName.
|
ProjectAttribute[] |
addAttributes(java.lang.String sessionId,
int projectId,
ProjectAttribute[] attributes)
Adds attributes to the given project identified by projectId (this allows specifying min/max/precision values when adding numeric attributes)
|
int |
addCustomStepProperty(java.lang.String sessionId,
int projectId,
int sequence,
java.lang.String propertyname)
Returns the Id of the step being added.
|
int |
addManualTest(java.lang.String sessionId,
int testContainerId,
java.lang.String name,
java.lang.String description,
ManualTestStep[] steps,
NodeParameter[] params)
Adds a manual test definition with optional parameters as child to a test container.
|
void |
addManualTestStep(java.lang.String sessionId,
int testId,
ManualTestStep step)
Adds a new manual test step.
|
int |
addNode(java.lang.String sessionId,
int projectId,
int parentNodeId,
PlanningNode node)
Adds a new child node to the given parent node.
|
void |
automateTest(java.lang.String sessionId,
int testId,
java.lang.String testType)
Convert an existing manual test to an automated test.
|
void |
convertToManualTest(java.lang.String sessionId,
int testId)
Convert an existing automated test to a manual test.
|
int |
createTestPackage(java.lang.String sessionId,
int packageParentNodeId,
java.lang.String xmlPackage)
Creates a test package structure from the given xmlPackage as a child node of packageParentNodeId.
|
void |
deleteAttributeOptions(java.lang.String sessionId,
int projectId,
java.lang.String attributeName,
AttributeOption[] options)
Deletes attribute options of the given attribute identified by attributeName.
|
void |
deleteAttributes(java.lang.String sessionId,
int projectId,
ProjectAttribute[] attributes)
Delete given attributes identified by their Ids for the given project identified by projectId.
|
int |
deleteCustomStepProperty(java.lang.String sessionId,
int projectId,
int propertyId)
Deletes a custom step property.
|
void |
deleteManualTestStep(java.lang.String sessionId,
int testId,
int stepPos)
Deletes a manual test step.
|
boolean |
deleteNode(java.lang.String sessionId,
int nodeId)
Deletes a node and its complete subtree.
|
boolean |
deleteProperty(java.lang.String sessionId,
PropertyValue property)
Deletes a given property from its associated node.
|
ProjectAttribute[] |
getAttributes(java.lang.String sessionId,
int projectId)
Returns all attributes for the given project identified by projectId.
|
PlanningNode[] |
getChildNodes(java.lang.String sessionId,
int projectId,
int parentNodeId,
NodeFilter filter)
Returns an array of child nodes of a defined node in the test planning tree.
|
CustomStepProperty[] |
getCustomStepPropertyNames(java.lang.String sessionId,
int projectId)
Returns an array of custom step properties.
|
DataSet[] |
getDataSetForDataSource(java.lang.String sessionId,
int dataSourceId)
Returns all available
DataSets for a given DataSource. |
DataSource[] |
getDataSourcesForProject(java.lang.String sessionId,
int projectId)
Returns all available
DataSources for a given project. |
int |
getIntegrationDefaultFolderId(java.lang.String sessionId,
int projectId)
Retrieves the default integration folder for a project.
|
java.lang.Integer[] |
getLibraryIdsForProject(java.lang.String sessionId,
int projectId)
Retrieves the Ids of the library root nodes visible for a project
|
java.lang.String[] |
getLibraryNamesForProject(java.lang.String sessionId,
int projectId)
Retrieves the names of the library root nodes visible for a project
|
ManualTestStep[] |
getManualTestSteps(java.lang.String sessionId,
int testId)
Retrieves the steps of a manual test.
|
PlanningNode |
getNode(java.lang.String sessionId,
int nodeId)
Retrieves a
PlanningNode from Test Manager with its PropertyValue child array fully populated. |
int[] |
getNodeIds(java.lang.String sessionId,
PropertyValue property)
Returns an array of Ids of nodes with the specified parameter value.
|
java.lang.String[] |
getNodeTypeIds(java.lang.String sessionId)
Returns the Ids of all test types.
|
Project |
getProject(java.lang.String sessionId,
int projectId)
Returns a project, specified by the project Id.
|
Project[] |
getProjects(java.lang.String sessionId)
Returns all projects that are accessible by the current user.
|
PropertyValue |
getProperty(java.lang.String sessionId,
int nodeId,
java.lang.String propertyId)
Returns the
PropertyValue associated with a given propertyId and nodeId. |
java.lang.String[] |
getPropertyIds(java.lang.String sessionId)
Returns a list of properties that can be accessed with the property functions.
|
java.lang.String[] |
getPropertyIdsByNodeType(java.lang.String sessionId,
int projectId,
java.lang.String nodeTypeId,
java.lang.String propertyTypeId)
Returns the property values available for Web service read/write access for the given types of node and property within the given project.
|
PropertyMetaInfo |
getPropertyInfo(java.lang.String sessionId,
int projectId,
java.lang.String nodeTypeId,
java.lang.String propertyId)
Returns the meta information of a property value for a given type of node within the given project.
|
java.lang.String[] |
getPropertyTypeIds(java.lang.String sessionId,
int projectId,
java.lang.String nodeTypeId)
Returns all basic property type Ids for a given project, plus those which are pertinent to a given
node type Id.
|
NamedEntity[] |
getTestContainers(java.lang.String sessionId,
int projectId)
Returns an array of test container nodes for the specified project.
|
java.lang.String |
logonUser(java.lang.String username,
java.lang.String plainPwd)
Logs on with a given username and password.
|
void |
setIntegrationDefaultFolder(java.lang.String sessionId,
int projectId,
int folderId)
Sets the default integration folder for a project.
|
ProjectAttribute[] |
updateAttributes(java.lang.String sessionId,
int projectId,
ProjectAttribute[] attributes)
Updates given attributes identified by their Ids for the given project identified by projectId.
|
void |
updateManualTestStep(java.lang.String sessionId,
int testId,
ManualTestStep step)
Updates a manual test step and its custom properties.
|
boolean |
updateNode(java.lang.String sessionId,
PlanningNode node)
This call updates a specific node in the test planning tree.
|
boolean |
updateProperties(java.lang.String sessionId,
PropertyValue[] properties)
Updates all property values in an array.
|
boolean |
updateProperty(java.lang.String sessionId,
PropertyValue property)
Updates a node's property.
|
void |
updateTestPackage(java.lang.String sessionId,
int packageNodeId,
java.lang.String xmlPackage)
Updates an existing test package defined by packageNodeId from the given xmlPackage structure.
|
void |
uploadTestPackageResult(java.lang.String sessionId,
int packageNodeId,
java.lang.String xmlPackage)
Uploads the results of an existing test package defined by packageNodeId from the given xmlPackage structure.
|
public java.lang.String logonUser(java.lang.String username,
java.lang.String plainPwd)
throws WSFaultException
username - the login usernameplainPwd - the password of the specified usernameWSFaultException - if logon failspublic Project[] getProjects(java.lang.String sessionId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)Project objects. If no active project is accessible by the user, an empty array is returned.WSFaultExceptionpublic Project getProject(java.lang.String sessionId, int projectId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the project Id as a String.null.WSFaultException - if an error occurredpublic int getIntegrationDefaultFolderId(java.lang.String sessionId,
int projectId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the projectWSFaultException - if an error occurredpublic void setIntegrationDefaultFolder(java.lang.String sessionId,
int projectId,
int folderId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the projectfolderId - the Id of the folder which will be set as default integration folderWSFaultException - if an error occurredpublic NamedEntity[] getTestContainers(java.lang.String sessionId, int projectId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which you request the test containersNamedEntity array with Id, name, and description of all test containers of the project with the given projectId. If no test
containers are available, an empty array is returned.WSFaultException - if an error occurredpublic int addManualTest(java.lang.String sessionId,
int testContainerId,
java.lang.String name,
java.lang.String description,
ManualTestStep[] steps,
NodeParameter[] params)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)testContainerId - the Id of the test container or test folder which is the parent of the new manual test definitionname - the name for the new manual test definitiondescription - a description for the new manual test definitionsteps - an array of ManualTestStep objects or an empty arrayparams - an array of NodeParameter objects or an empty array if there are no additional parametersWSFaultException - if an error occurredpublic ManualTestStep[] getManualTestSteps(java.lang.String sessionId, int testId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)testId - The manual test definition Id.WSFaultException - if an error occurredpublic void deleteManualTestStep(java.lang.String sessionId,
int testId,
int stepPos)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)testId - The manual test definition Id.stepPos - The position of the step to delete, 1 = first step...WSFaultException - Will also be thrown if step does not exist (invalid step position).public void addManualTestStep(java.lang.String sessionId,
int testId,
ManualTestStep step)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)testId - The test definition Id.step - The new step, it is inserted at position of 'step.stepPos': 1 = 1st position..., >max = append step, <1 like 1.WSFaultExceptionpublic void updateManualTestStep(java.lang.String sessionId,
int testId,
ManualTestStep step)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)testId - The manual test definition Id.step - The manual test step to be updated, step.stepPos is used to identify the step.WSFaultException - Will also be thrown if step does not exist (invalid step position).public CustomStepProperty[] getCustomStepPropertyNames(java.lang.String sessionId, int projectId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which you request custom step propertiesCustomStepProperty objectsWSFaultException - if an error occurredpublic int addCustomStepProperty(java.lang.String sessionId,
int projectId,
int sequence,
java.lang.String propertyname)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which a custom step property is enteredsequence - the sibling order of the step propertypropertyname - the name of the step property being addedWSFaultExceptionpublic int deleteCustomStepProperty(java.lang.String sessionId,
int projectId,
int propertyId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which a custom step property is being deletedpropertyId - the Id of the step property being deletedWSFaultExceptionpublic PlanningNode[] getChildNodes(java.lang.String sessionId, int projectId, int parentNodeId, NodeFilter filter) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which you request the child nodesparentNodeId - the Id of the parent node for which you request the child nodesfilter - is currently not in use and can be nullPlanningNode) to the given parent node of of a project with the given Id, or an empty array if no child
node is availableWSFaultExceptionpublic int addNode(java.lang.String sessionId,
int projectId,
int parentNodeId,
PlanningNode node)
throws WSFaultException
Use getNodeTypeIds(String) to get a list of all valid test types which can be used when setting property.
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project where to add the NodeparentNodeId - the Id of the parent nodenode - the PlanningNode to be added as child to the given parent nodeWSFaultExceptionpublic boolean deleteNode(java.lang.String sessionId,
int nodeId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)nodeId - the Id of the node to be deleted, including its subtreetrue if delete was successful, false otherwiseWSFaultException - if an error occurredpublic boolean deleteProperty(java.lang.String sessionId,
PropertyValue property)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)property - PropertyValue object with its nodeId and propertyId settrue if delete was successful, false otherwiseWSFaultExceptionpublic boolean updateNode(java.lang.String sessionId,
PlanningNode node)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)node - the new values for the nodetrue is returned, false if nothing was updatedWSFaultExceptionpublic java.lang.String[] getPropertyIds(java.lang.String sessionId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)WSFaultExceptionpublic PropertyValue getProperty(java.lang.String sessionId, int nodeId, java.lang.String propertyId) throws WSFaultException
PropertyValue associated with a given propertyId and nodeId. The service interface is designed to enable generic access
to properties. Following example illustrates a usual invocation flow in C# when properties are retrieved:
...
PlanningServiceService tmPl = new PlanningServiceService();
// retrieve basic <b>property type Ids</b>
String[] typeIds = tmPl.getPropertyTypeIds(sessionId, "");
// retrieve <b>property Ids</b> for a given property type Id
tmPl.getPropertyIds(sessionId, "", "_node_properties_");
// retrieve details for a property Id
tmPl.getPropertyInfo(sessionId, "", "_node_properties_Name");
// retrieve a <b>property</b> of a planning node (SCTM demo data)
PropertyValue name = tmPl.getProperty(sessionId, "3", "_node_properties_Name");
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)nodeId - the node Id of which the property value should be retrieved frompropertyId - the Id of the propertyWSFaultExceptionpublic PlanningNode getNode(java.lang.String sessionId, int nodeId) throws WSFaultException
PlanningNode from Test Manager with its PropertyValue child array fully populated.sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)nodeId - the internal Test Planning node IdWSFaultExceptionpublic boolean updateProperty(java.lang.String sessionId,
PropertyValue property)
throws WSFaultException
PropertyValue must have its nodeId member variable assigned, as well as propertyTypeId, propertyId,
value, and type.sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)property - the PropertyValue data is used to update the nodetrue if update successful, false otherwiseWSFaultExceptionpublic boolean updateProperties(java.lang.String sessionId,
PropertyValue[] properties)
throws WSFaultException
PropertyValue object must be associated with a test planning node through its nodeId member
variable. However, the array members can be associated with different nodes.sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)properties - the array of PropertyValue objects to updatetrue if successful, false otherwiseWSFaultExceptionpublic java.lang.String[] getPropertyIdsByNodeType(java.lang.String sessionId,
int projectId,
java.lang.String nodeTypeId,
java.lang.String propertyTypeId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project from where to load the propertiesnodeTypeId - the Id of the node type for which the property appliespropertyTypeId - the Id of the property type to which the property belongs (see getNodeTypeIds(String))WSFaultExceptionpublic PropertyMetaInfo getPropertyInfo(java.lang.String sessionId, int projectId, java.lang.String nodeTypeId, java.lang.String propertyId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the projectnodeTypeId - the Id of the node type for which the property appliespropertyId - the Id of the propertyWSFaultException - if an error occurredpublic java.lang.String[] getNodeTypeIds(java.lang.String sessionId)
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)public int[] getNodeIds(java.lang.String sessionId,
PropertyValue property)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)property - property value to search forWSFaultExceptionpublic java.lang.String[] getPropertyTypeIds(java.lang.String sessionId,
int projectId,
java.lang.String nodeTypeId)
throws WSFaultException
Retrieve valid values for node type Id parameters using getNodeTypeIds(String).
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the projectnodeTypeId - the Id of the node type for which applicable property types should be retrieved. If no valid nodeTypeId is provided, only the basic
property type Ids are returned.WSFaultExceptionpublic ProjectAttribute[] getAttributes(java.lang.String sessionId, int projectId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which the attributes should be retrieved.WSFaultExceptionpublic ProjectAttribute[] addAttributes(java.lang.String sessionId, int projectId, ProjectAttribute[] attributes) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which the attributes should be added.attributes - an array of Attribute objects that should be addedWSFaultExceptionpublic ProjectAttribute[] updateAttributes(java.lang.String sessionId, int projectId, ProjectAttribute[] attributes) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which the attributes should be updated.attributes - an array of Attribute objects that need to be updatedWSFaultExceptionpublic void deleteAttributes(java.lang.String sessionId,
int projectId,
ProjectAttribute[] attributes)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which the attributes should be deleted.attributes - an array of Attribute objects which should be deletedWSFaultExceptionpublic void addAttributeOptions(java.lang.String sessionId,
int projectId,
java.lang.String attributeName,
AttributeOption[] options)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which the attribute options should be added.attributeName - the name of the attribute for which the attribute option should be added.options - an array of AttributeOptions which should be added to the attributeWSFaultExceptionpublic void deleteAttributeOptions(java.lang.String sessionId,
int projectId,
java.lang.String attributeName,
AttributeOption[] options)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which the attribute options should be deleted.attributeName - the name of the attribute for which the attribute option should be deleted.options - an array of AttributeOptions which should be deleted from the attributeWSFaultExceptionpublic DataSource[] getDataSourcesForProject(java.lang.String sessionId, int projectId) throws WSFaultException
DataSources for a given project.sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the project IdDataSource objects, otherwise an empty arrayWSFaultExceptionpublic DataSet[] getDataSetForDataSource(java.lang.String sessionId, int dataSourceId) throws WSFaultException
DataSets for a given DataSource.sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)dataSourceId - use getDataSourcesForProject(String, int) to find a DataSourceDataSets, otherwise an empty arrayWSFaultExceptionpublic int createTestPackage(java.lang.String sessionId,
int packageParentNodeId,
java.lang.String xmlPackage)
throws WSFaultException
<?xml version="1.0" encoding="UTF-8"?>
<TestSuite ExtId="1" TestItem="My Unit Tests" TestType="JUnitTestType" Version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="output.xsd">
<property name="_junit_ClassFile">sample.package.junit.suites.MyUnitTests</property>
<property name="_junit_ClassPath">./abj.jar; junit3.1.8.jar; allTestSuite.jar</property>
<Description>Making sure we have 90 percent code coverage.</Description>
<TestSuite ExtId="1.1" TestItem="TestSuite1">
<property name="_junit_ClassFile">sample.package.junit.suites.MyUnitTests.TestSuite1</property>
<Test ExtId="1.1.1" TestItem="test01">
<property name="_junit_TestMethod">test01</property>
</Test>
[...]
</TestSuite>
[...]
</TestSuite>
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)packageParentNodeId - the Id of the parent nodexmlPackage - an XML representation of a test packageWSFaultExceptionpublic void updateTestPackage(java.lang.String sessionId,
int packageNodeId,
java.lang.String xmlPackage)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)packageNodeId - the Id of the package nodexmlPackage - the updated XML representation of an existing test packageWSFaultExceptionpublic void uploadTestPackageResult(java.lang.String sessionId,
int packageNodeId,
java.lang.String xmlPackage)
throws WSFaultException
<?xml version="1.0" encoding="UTF-8"?>
<TestSuite ExtId="1" TestItem="My Unit Tests" TestType="JUnitTestType" Version="1.0">
<RunInfo Build="121" Timestamp="1219060627007" ExecutionServer="ExecServer" Version="121"/>
<ErrorCount>3</ErrorCount>
<FailureCount>2</FailureCount>
<WarningCount>0</WarningCount>
<Timer>787534.0</Timer>
<WasSuccess>false</WasSuccess>
<TestSuite ExtId="1.1" TestItem="TestSuite1">
<ErrorCount>1</ErrorCount>
<FailureCount>1</FailureCount>
<WarningCount>0</WarningCount>
<Timer>887.0</Timer>
<WasSuccess>false</WasSuccess>
<Test ExtId="1.1.1" TestItem="test01">
<ErrorCount>3</ErrorCount>
<FailureCount>2</FailureCount>
<WarningCount>0</WarningCount>
<Timer>787534.0</Timer>
<WasSuccess>false</WasSuccess>
</Test>
[...]
</TestSuite>
[...]
</TestSuite>
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)packageNodeId - the Id of the package nodexmlPackage - the XML presentation of an existing test package including the resultsWSFaultExceptionpublic java.lang.Integer[] getLibraryIdsForProject(java.lang.String sessionId,
int projectId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which the library Ids nodes are retrieved.WSFaultExceptionpublic java.lang.String[] getLibraryNamesForProject(java.lang.String sessionId,
int projectId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - the Id of the project for which the library names are retrieved.WSFaultExceptionpublic void automateTest(java.lang.String sessionId,
int testId,
java.lang.String testType)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)testId - Id of test to be automatedtestType - Automated type of test to convert to. Must be the type Id of an automated test type. The available types are retrievable from
getNodeTypeIds(String). Automating as 'KeywordDrivenTestType' is not supported.WSFaultExceptionpublic void convertToManualTest(java.lang.String sessionId,
int testId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)testId - Id of test to be converted to manualWSFaultExceptionCopyright © Micro Focus 2004-2019. All rights reserved.