Forum Discussion
baxatob thanks, but how can I implement this in keyword test framework?
I don't really "speak" Pyton....
For example you can create some helper-script (on your preferred language), which will assign required test parameters. Then you can call it from the keyword test in the loop.
- mgroen28 years agoSuper Contributor
Thanks,
I will create a simple example and post it here soon. To illustrate my idea, and see what it will bring us...
Later more!
- mgroen28 years agoSuper Contributor
Attached is an example:
The Project which will open Notepad, en type 5 values read from parameters.
So, back to the "challenge": what would be the best and most efficent approach to change this project so that the keyword test which types the values, is iterated, each time setting a different paramvalue to empty.
Any good suggestions. Thanks!!
- baxatob8 years agoCommunity Hero
Hi,
Please check, whether I understood your idea?
I have created a helper-script inside Unit1.
Now it contains a lot of hard-code, but if this approach is working for you, you can upgrade it and make more flexible.
Also note, that I don't use parameters, which you defined in Write_text module.
Instead of this I assign an array of parameters in Unit1.The purpose of this helper-script is to assign required test parameters to variables and pass them to the Write_text module from the loop:
dim params params = Array("p1", "p2", "p3", "p4", "p5") '<--- here the parameters for your test Function setup_test_parameters (index) dim test_set test_set = params test_set(index) = "NULL" KeywordTests.ALL.Variables.Var1 = test_set(0) '<--- Each parameter is assigned to the separate KeywordTest variable KeywordTests.ALL.Variables.Var2 = test_set(1) KeywordTests.ALL.Variables.Var3 = test_set(2) KeywordTests.ALL.Variables.Var4 = test_set(3) KeywordTests.ALL.Variables.Var5 = test_set(4) End Function.
Related Content
- 3 years ago
Recent Discussions
- 22 minutes ago
- 6 hours ago