| kishore.konka wrote: |
|---|
| I need to add more than 500 property names for each test case ,but is tedious process to add that many property’s for each test case by clicking. Please let me know is there any option in tool to import the properties names from external source like Excel. |
There isn't a way to do it using the tool itself, but you can do it with a Groovy TestStep a bit like this:
Assume you have a dataSource for your property names, called something like 'propertyNames', that exports each row as a property on itself called 'name'.
def dataSource = testRunner.testCase.testSteps['propertyNames'];
getNewProperty = {
if (!dataSource.next(testRunner, context)) {
dataSource.run(testRunner, context);
}
return dataSource.properties['name'].value;
}
getNewValue = {
// Put whatever you want in here!
// You could even have your Excel datasource export the name/value pairs, and fold this in.
}
for (int i = 0; i < 500; i++) {
testRunner.testCase.setPropertyValue(getNewProperty(), getNewValue());
}
NOTE that this is cribbed from my own projects but I haven't run the code precisely as written - should be fine though.