Runner.CallMethod works pretty well with regards to running Keyword tests. You can do a syntax like:
Runner.CallMethod('KeywordTests.TestName.Run', 'parametervalue');
However, this is a bit ...
Run A KeywordTest by name
tristaanogre
8 years agoEsteemed Contributor
Sure enough, calling the keyword test via name works AMAZINGLY... Thanks, HKosova.
However, I still cannot assign parameters via the Test.Parameters object... I can access the parameters via the same bracket syntax but I cannot assign values to them outside of sending them to the call.
So... for those of you who want to know, here's what I'm doing right now...
function foo() { var TestName = 'TC101'; var parameterlist = '\'value1\', \'value2\''; var testObject = KeywordTests[TestName]; eval('testObject.Run(' + parameterlist + ')'); }
It's closer to what I want... but what I would REALLY love is to be able to completely get rid of the need for eval... See my feature request here.
Related Content
- 14 years ago