I have around 50 "robot" files and I want to run 4 robot files in parallel (using multithreading). If one file gets over, it should pick next. I am using the following code here.
from robot import run
myarray= [file1, file2, file3....file50]
for f in myarry:
SOME LOGIC WHICH HOLDS THE LOOP TILL FILE COUNT IS 4
func1(f)
def func1(file)
outputlogFile = open(fname , 'w')
run(file, outputdir=reportdir, stdout=outputlogFile)
The problems I am facing are:
- All outout is written in only one file
- It is not generating log and result
- And output.xml is not properly generated.
Looks like this is happening as run command is internally creating only one reference. Is there a way to create multiple instances.
something like
instance= robot.run()