Forum Discussion

tristaanogre's avatar
tristaanogre
Esteemed Contributor
14 years ago

Using HISUtils.StopWatch in keyword tests

I want to open this out to others to see if there's anyone else who has a better way of doing this.



Essentially, the goal is to minimize, as much as possible, the amount of script code that needs to be written to do certain tasks.  In many environments, testers have a varying skill set as to whether or not they can write code.  While it's possible to train them to do so,it would be nice to minimize that necessity.  The best example is the use of the HISUtils.StopWatch object that installs with TC 8.



As per the screenshot attached, the only way it seems to be able to do this is to use a series of code snippets to actually execute the methods on the stop watch object.  To log the time elapsed, then, the Message parameter on the log operation needs to be a code expression.  This seems to be because, unlike script code, when assigning a variable to an object, you can't, within the editor, access the methods and properties of that object.  This would be a nice feature to include in Keyword Tests, but until then, does anyone have any other ideas as to ways to do this same kind of thing without having to use code expressions or code snippets?



Thanks!