Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How do I retrieve the property names that should be used when creating a Third Party test-type Test Definition?

How do I retrieve the property names that should be used when creating a Third Party test-type Test Definition?

When creating a Test Definition via the SilkCentral Web Services we must know the properties that we must successfully set in order to allow successful creation of the Test Definition. Firstly what we must determine is the "id" of the Third Party test-type itself, this is quite easily achieved:

  1. Browser to your SilkCentral Test Manager "Plugins" directory, generally located here:
    "C:\Program Files\Borland\SC Test Manager \Plugins"
  2. Open the third party test-type plugin jar/zip with an archive tool of your choice
  3. Open the XML file that is shipped with the plugin, and look for the "id" attribute and make a note of its value

We can proceed with determining how we can retrieve the property names for a third party test-type. This article will assume that you as the developer were able to successfully create the code which logs you in as a user and obtain a session id. What we must now do is obtain an instance of our planning service:

try{

TmplanningSoapBindingStub plnBind = (TmplanningSoapBindingStub) new PlanningServiceServiceLocator().gettmplanning();

.....

}

catch(Exception e) {

e.printStackTrace();

}

Now that we have obtained an instance of our planning service we can now expand the above code and retrieve the required property names using the "getPropertyIds" method.

try{

TmplanningSoapBindingStub plnBind = (TmplanningSoapBindingStub) new PlanningServiceServiceLocator().gettmplanning();

//replace idValue with the value of the id attribute that was noted previsouly

String [] propertyNames = plnBind.getPropertyIds(sessionID, "ThirdParty", "_idValue_");

}

catch(Exception e) {

e.printStackTrace();

}

In the above code excerpt the property names required for creating a third party test-type Test Definition are now stored in the String array propertyNames with the format, "_idValue_PropertyName". Let us look at a worked example using the Telnet third party test-type, in which our code would look like the following:

try{

TmplanningSoapBindingStub plnBind = (TmplanningSoapBindingStub) new PlanningServiceServiceLocator().gettmplanning();

String [] propertyNames = plnBind.getPropertyIds(sessionID, "ThirdParty", "_telnetTest_");

for(int i=0;i<>

System.out.println(propertyNames) ;

}

}

catch(Exception e) {

e.printStackTrace();

}

If the above code was executed the following property names would be printed to the console:

_telnetTest_Break
_telnetTest_Username
_telnetTest_Password
_telnetTest_Port
_telnetTest_Prompt
_telnetTest_Hostname
_telnetTest_Command


Old KB# 25086

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:52
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.