Discussion:
Using Property Loader with Renamed Steps
(too old to reply)
CIM1
2008-06-02 11:10:10 UTC
Permalink
If I have a test step in a loop where the step is renamed using RenamePreviousStep after each iteration, is there a simple way to use Property Loader to load test limits corresponding to the dynamically changing test name? The only way I have found to do this so far causes errors at runtime on the non-existent step names in the file which have to be ignored. Also it is not very slick to call PropertyLoader every time the loop iterates.Is there a more elegant way to load limits for steps which "don't yet exist"?
Ray Farmer
2008-06-02 11:40:10 UTC
Permalink
Hi,
 
Does each iteration have different limits?
 
regards
Ray Farmer
CIM1
2008-06-02 12:10:12 UTC
Permalink
Does each iteration have different limits?Yes they may well do.
Ray Farmer
2008-06-03 07:10:17 UTC
Permalink
Hi,
How do you organise your limit file.
Do you have a different Start/End Marker for each of your iterations so that you have the correctly named step(s) between the markers?
You could try loading an array of limits into a local array(s) from your Limit File then index through the array as the datasource for your limits. Remember its a PropertyLoader, so its not limited to just limits. That way you only read it once and you are not tied to the Step name.
Regards
Ray Farmer
CIM1
2008-06-03 10:40:18 UTC
Permalink
How do you organise your limit file.
Do you have a different Start/End Marker for each of your iterations
so that you have the correctly named step(s) between the markers?
You could try loading an array of limits into a local array(s) from
your Limit File then index through the array as the datasource for your
limits. Remember its a PropertyLoader, so its not limited to just
limits. That way you only read it once and you are not tied to the Step
name.I originally had all limits within a single Start-End marker pair. Having now given each limit set an individual Start-End marker and setting PropertiesListSource dynamically in the Loader Step in the loop, that works OK.  Perhaps not so elegant still as each iteration of the loop requires a Property Loader step instead of loading everything in one hit (I'm guessing there has to be some performance overhead in multiple property loader calls vs. a single load of all limits) but at least there are no errors on the loader step now I am only loading that test which exists after the loop rename.The alternative of loading data into arrays had ocurred to me and I may experiment with this if performance becomes an issue with the first approach.Thanks for your reply Ray, its much appreiated.
Ray Farmer
2008-06-03 11:40:13 UTC
Permalink
Hi,
 
Unfortunately, you cannot load all steps because all steps are not phyically available.
 
You could create a Custom Step Type which has an array of limits, you would probably have to modify the PropertyLoader to handle your array of limits.
 
Or Maybe you could use the MultipleLimit Step Type and do the looping inside code module and return an array of results.
 
Another alternative is to dynamical create you sequences with all the steps, then you would be able to set all the limits with one load.
 
Regards
Ray Farmer
OmarGator
2008-08-15 15:10:14 UTC
Permalink
This post might be inappropriate. Click to display it.
Continue reading on narkive:
Loading...