Search code examples
pythonrobotframework

how to run robot case with -t testcase_in_suite_A and -s another_suite_B at the same time?


I have folder mytestcase with three sub folders are d1,d2,d3 respectively.

d1 has f1.robot, with case name 'case10','case11'

d2 has f2.robot, with case name 'case20','case21',...,'case2xxxxx'

d3 has f3.rebot, with case name 'case30','case31',...,'case3xxxxx'

Now, I want to run 'case10' in f1.robot and all case in f2.robot. How should I do?

I had try it as follows.

robot -s d2 -t case10 -s d1 mytestcase

result: it will only run case10, none of the f2.robot executed。

excepted result: I hope all case in d2 suite and 'case10' will be executed at the same time.

BTW; I don't want to implement it by the way "include tags". Any other way can do it ? Thanks


Solution

  • I believe that using tags would be more intuitive, but if you don't want it's still possible, because full test case name contains parent suites, so in you case command would look something like this:

    robot -t case10 -t *d2.f2* mytestcase
    

    Note: I am not selecting suites using -s.