I have some problem running Robot Framework test suite with appium and pabot.
I'm running some tests suite on multiple android devices like this:
pabot --pabotlib --argumentfile1 phone1.dat --argumentfile2 phone2.dat -v LANG:fr --outputdir output --output basics.xml JustBasics_tests.robot
pabot --pabotlib --argumentfile1 phone1.dat --argumentfile2 phone2.dat -v LANG:fr --outputdir output --output another.xml LetsRunAnother_test.robot
I don't execute all suites in a single pabot instruction because I got some appium errors if I do like this ... errors like: WebDriverException: Message: A session is either terminated or not started pabot or WebDriverException: Message: A new session could not be created. Details: Problem getting session data for driver type AndroidDriver; does it implement 'get driverData'?
I want to make a report from another.xml and basics.xml to something like log.html and report.html (to work with Jenkins after).
My first problem is that basics.xml and another.xml files contain only one test execution from one of the two devices. If I want data from both devices of a test case execution I need to take the output.xml file which contains both test case execution... Of course output.xml is overwritten after each pabot command.
So I thought to just copy each output.xml and rename to outputX.xml and finally make a
rebot output1.xml output2.xml output3.xml ....
But rebot doesn't work like I expected : rebot just copying X times the first mobile test on the report so I have something like on my log.html:
JustBasics
Test_Results_for_phone1
Test_Results_for_phone1LetsRunAnother
Test_Results_for_phone1
Test_Results_for_phone1
What am I doing wrong?
My second problem is that there are no screenshots in my log files, when something fails in test execution (error or crash of app for exemple). They all point to root directory from the log.html but images are in a path like pabots_results/X/TestSuiteName/appium-screenshoot-x.png Here again what is wrong? Do I have to do something about images, or pabot should do it alone (in pabot.py nearly then end of file, there is a function named _copy_screenshots ....)
The disturbing thing about this story is that there are not plenty of documentation about pabot. And I don't know if I'm doing something wrong or if pabot has some bugs!
So thanks for reading me, and see you ;)!
UPDATE : To avoid all these problems, I wrote this little tool : https://github.com/bastienjalbert/aptr