Absent Member.
Absent Member.
1327 views

Getting argument values in dropdown of keyword parameter in Silkcentral

Can I get the values of argument in the dropdown of Keyword parameter in Silkcentral.

When automating test case with keyword test in SilkCentral, we have to add keywords developed in silk4j. It has parameters column where dropdown appears. How to get values in that drop down??

7 Replies
Absent Member.
Absent Member.

Hi Pritam,

I can see you have also opened a support incident so I have replied to you from the incident.

As a reference, the dropdowns on the keywords parameters will be populated from the parameters associated with the test case.

Thanks,
Matt
0 Likes
Absent Member.
Absent Member.

Hi Matthew,

i think so, the question was (and this is my problem/question too):
In the Silk Central
There is an Execution Plan with a Test.
There are some Keywords in this test.
For example a Keyword with the name "Set Gender" with one parameter.
This parameter can be "male" or "female".
You can define a List in Java with this 2 elements Male and Female.
Is it possible in SilkCentral to use a drop down list to set this parameter ?
(If I click on the "New Keyword" than there are a drop down menü with the keywords. I would like to use a same drop down menü to select the list elements. In this case male/female. I don't like to type the text, I would like to select the gender.)

What is the solution?
0 Likes
Absent Member.
Absent Member.

Hi demuthpal,

You would define the parameter values in Silk Central and not in the script to make them available in the Silk Central UI.

For example, if you had a test

@Test

public static void gender(String gender) {

}

In Silk Central on the test case, you would define a parameter for the test which will be gender. In the KDT editor now you can select the parameter defined on the test in the dropdown which will look like:

 

 

When the test is run, the value which is defined in the parameter will be passed to the test method.

Thanks,

Matthew

0 Likes
Absent Member.
Absent Member.

Hello Matthew,

thank you for your answer but I would like to see a drop down list in the Silk Cetral with my defined parameters.
/Sorry I can not attach any screenshot./
Like this: www.flukkytom.com/.../dropdown.jpg

For Gender you can set 2 parameters male or female
The Silk Central user would like to select this value. They wouldn't like to type that.

=======================|=======================
Keyword | Parameters |
-------------------------------------|------------------------------------
Set Gender | Gender (with grey text) |
-------------------------------------|-----------------------------------
| Male |
--------------------
| Female |
--------------------

<--- male and female are selectable variables in a drop down list.


You say ( if i understand well )

I need define parameters in the Properties / Parameters
---> Add Custom Parameter

one parameter to the value "male"

Name: Male
Type: String
Value: male

and an other parameter to the value "female"

Name: Female
Type: String
Value: female

If I have 500 Keywords and every Keywords have 5 drop down lists with 3-20 selectable values .
What should I do?
0 Likes
Absent Member.
Absent Member.

Hi demthpal,

For the parameter you would only define this one, then you would create your dataset which populates this and associate to the test case.

I would create this through either excel or CSV which has the values male/female and then associate this to test case.

This would now create two versions of the test case with the unique values. You would also do this for any other values or parameters required.

I have included the link below for the data-driven test section, documentation.microfocus.com/.../SCTM-B94BD775-DATADRIVENTESTS-CON.html.

If you need assistance on configuring this please log a support incident.

Thanks,
Matt
0 Likes
Absent Member.
Absent Member.

Hi Pal,

The way that you would are trying to accomplish this such as to see the values in the dropdown which are defined in your script, this would not be possible.

As mentioned though the way to do this would be using a parameter associated to the test Silk Central and for all possible values use a configuration suite or dataset for the test/execution plan.

Your last update would not have been correct, so as mentioned if you would like some assistance in showing how this works then I would a support incident and we can demo this feature.

Thanks,
Matthew
0 Likes
Absent Member.
Absent Member.

Hello,

OK, yes i deleted my last message. I undertand you. I thank you for your superfast answers.
I think, that this solution is not bad. (with the data tables)
This drop down would be an other function.

Our software is working with different csv files (here are some datas which are coming in our software ). if we can download this files with the silk central, than we can do permutations perhaps.
Our problem is that the system is very complex, therefor we need to define the values, and we can not start every permutated variations.

Thank you for your help.
0 Likes
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.