Hi all,
Is it possible to pass multiple tests to ArtofTest.Runner for execution.
I know with testlist, we can accomplish this. But our testing environment is rather dynamic , where tests needs to be selected dynamically. So I have a set of tests, from which some needs to be selected randomly for execution.
You can say like dynamic workflow.
So there are two ways we can accomplish this.
1) Passing multiple tests as arguments to ArtofTest.Runner.
2) Editing a list during runtime by adding needed tests.. ( If list is in xml format, then easy.)
Thanks,
VVP
9 Answers, 1 is accepted
I am sorry but the command line runner only accepts one test or one test list as a command line parameter. It will ignore any extras.
However have you researching into using a Dynamic Test List? This might solve the problem.
Regards,
Cody
Telerik
Hi Cody,
In dynamic test list, we need to add all the possible tests first. Then during runtime if condition matches ,it will get executed right.
I am looking at something like
I will get list of tests from some source, say xml . I am planning to iterate each of them or create a list and execute them.
Is it possible to create a blank dynamic list and add tests during runtime.?
Thanks,
VVP
In dynamic test list, we need to add all the possible tests first.
Actually not true. The purpose of a dynamic test list is that when you go to execute the test list Test Studio will run a query to find all tests contained in the project and only execute those that match the specified criteria. The criteria you can specify is very flexible:
- Run all tests set to priority 1 and set to Enabled
- Run all tests set to Feature A and set to Enabled
- And so on
Is it possible to create a blank dynamic list and add tests during runtime.?
Again, you cannot add specific tests to a "dynamic" test list. This can only be done to a static test list.Regards,
Cody
Telerik
Hi Cody,
The ability to select tests based on properties during runtime is awesome.
1) Can we set properties for a test like priority during runtime?
2) The thought i am having if point 1 is not going to work is, I will append testnames with "AutoExec" and dynamic test will look for test with "AutoExec". WIll it get picked up for execution?
Tests like
Test1.tstest
Test2.tstest
Test3.tstest​
will be changed to
Test1_AutoExec.tstest
Test2_AutoExec.tstest
Test3_AutoExec.tstest
So although this looks a dirty way, in absence of setting test property dynamically, this will work right.
Thanks,
VVP
Can we set properties for a test like priority during runtime?
No I'm sorry. The query parameters and properties of a dynamic test list are stored in the .aiilist file and can only be changed using our IDE (unless you hack the .aiilist file which I cannot recommend).
Yes if you change the filename outside of Test Studio just prior to executing the dynamic test list, the test runner will iterate the files (the .tstest files specifically) that exist on disk and use those. One way I can think of to make it easy would be to move tests between folders. Create a dynamic test list, or lists, that execute all tests from a specific folder. This way you simply move tests around instead of rename the filename.
Regards,
Cody
Telerik
Hi Cody,
You mean to say set the path rule while creating dynamic list.? So we have to specify some path and make sure tests are available at that location right?
Actually i like the option. Makes more easier and less chaotic than renaming files.
Thanks,
VVP
You mean to say set the path rule while creating dynamic list.?
Yep, that's exactly what I meant!!
Regards,
Cody
Telerik
Thanks a lot Cody.
Thanks,
VVP
Glad I could help.
Regards,
Cody
Telerik