Forum Discussion
Thanks Justin,
The only problem with this is that MyTestName is hard coded.
Is there any way of making MyTestName a variable?
Otherwise it requires something like this....
switch ( Test_Caption )
{
case 'KeywordTests - Check_Pass':
KeywordTests.Check_Pass.Run;
break;
case 'KeywordTests - Check_Fail':
KeywordTests.Check_Fail.Run;
break;
case 'KeywordTests - Login Normal User':
KeywordTests.Login_and_verify_operator.Run();
break;
default:
Log.Warning("No test was found corresponding to :''" + Test_Caption + "''");
I think this may have to be a feature request then
I'm trying to understand where this would be helpful. To be able to invoke keyword tests as a part of your script routines, but only run certain keyword tests based on the variable we pass (which being the name of the specific keyword tests themselves)
I feel like there may already be ways around this in terms of grouping keyword tests for execution or for invoking other test items based on certain conditions.
whether that be tag based executions of your tests from CICD, or from just simply creating a script routine that runs only a certain collection of keyword tests in a certain sequence... (just throwing ideas out here now)
Maybe if you elaborate on the use case (of what you're trying to achieve, end goal etc.) then some of the other members of the community can share their workarounds.
in the meanwhile ill play around with testcomplete a bit too, to see if this is feasible