Hey all,
I got a problem and it seems to me like a bug. Maybe I am wrong and you can tell me how to fix my problem.
First of all I have got xFile installed to store all my macros/testsuites etc on my local-machine and manage them through my folders (also manage them with GIT).
In my testcase I have got following folders and files:
- testsuites
– Component_Print.json - autorun
– Component_Print.html - macros
– login.json
– Component_Print.json
– logout.json
My goal is to start one testsuite after another with my batch-file to automate all my tests. Therefore I use the Autorun.html and open them with the command line. All Autoruns will be stored in the autorun folder.
I have got the testsuite Component_Print which contains the macros login, Component_Print and logout in this order. To start the testsuite Component_Print with the commandline I create the autorun Component_Print.html and store that in the autorun-folder.
Then I start the Autorun with the command
“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” “file:///C:/kantu/autorun/Component_Print.html?direct=1&closeBrowser=1&closeKantu=0&savelog=log.txt&testsuite=Component_Print”
Chrome opens and the test starts but it only executes the first macro login in the whole testsuite. Kantu just closes after the first macro login is finished. But their are 2 macros Component_Print and logout left in the testsuite.
I get the following log:
But if I delete the testsuite Component_Print.json in my testsuite-folder the autorun runs through all 3 macros. - I am really confused why do I need to delete the testsuite that I can run through my whole autorun.html which contains this testsuite itself?
Thats my first problem.
On the other hand if I delete my testsuite __ Untitled __.json first and then start the autorun
__ Untitled __.html then Kantu throws the Error:
no macro found with the name ‘__ Untitled __’
I got a fix how I can achieve my automated testing from the commandline but it seems to be a roundabout way.
I have to create my Autorun.html let it start from the commandline and because of the existing testsuite only the first macro will be executed. After that I delete the testsuite from the testsuite folder and start the Autorun.html again from the commandline. Then the testsuite will be found and it will be successfully executed with all the macros.
For me it seems really fishy. - But maybe I just get it wrong.
I hope you can help me out.
Kind Regards,
Marco