Ask a Question

Running multiple loadui tests from the command line.

AndyHughes
Regular Contributor

Running multiple loadui tests from the command line.

A have a number of projects and test cases within projects that I need to run one after the other. I decided to do this via the command line for minimum maintenance or 'hand holding'.

I've got this working to an extent in that I can make the first test run. What I can't seem to do is make it continue to the next test. How do I need to structure my command at the c: prompt so that test cases can run one after another.

What I have is Program Files\eviware\loadUI-1.5.0\loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest
loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest2
loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest3
15 REPLIES 15
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

I think the easiest way is to put these three commands as one line each in a .bat file and execute that. If you want to type it all into a command prompt you need to use the proper command separator between the commands. Unfortunately this depends on what command shell you are using. If it's the standard Windows Command Prompt, you need to use && between the commands, but if you're using Windows Power Shell you need to use ; instead.


Windows Command Prompt:

loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest && loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest2 && loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest3

Windows Power Shell:
loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest ; loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest2 ; loadui-cmd.bat -l -p C:\Users\user.name\.loadui\LoadUIproject.xml -t loaduitest3


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
AndyHughes
Regular Contributor

Brilliant thanks. I'll try that. And do each of these test cases finish before the next one starts? Because that's what I need to happen. I need to isolate the tests on the hardware.
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

Yes, this should cause them to run as separate processes, one after another.

Regards,
Dain
SmartBear Software

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
AndyHughes
Regular Contributor

Hi this doesn't seem to have worked: Although the result is different. After the first test has run, all I get is




It doesn't actually progress to the next line.
(It doesn't matter that each request is a failure at this time. I'm just testing the theory.)
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

I'm not entirely sure what I'm looking at here, is this the output from the first command, or has the second one started? If it's the first one, it seems that the test isn't ending properly and thus continues to run even after it should have stopped. Perhaps you can confirm this by running just one of the three commands and seeing if it ends? The test should stop once it runs into one of the set limits (based on time, requests, or failures), and you should be returned to the prompt. No more output should be outputted by the process. Can you confirm whether or not this happens as it should?

Regards,
Dain
SmartBear Software

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
AndyHughes
Regular Contributor

The second one hasn't started. I can tell this because there is no output file saved in the directory specified.
If I run just one of the tests does it finish correctly?
If I run it so that it runs out of requests, I get the above. If it hits the time limit I get the below



but I just get a flashing cursor, not >_ Whenever I try to navigate to c:\Program Files\eviware....... I get a message saying incorrect number of arguments. Maybe I just don't understand command prompt?
AndyHughes
Regular Contributor

This is what I'm now running from the batch script

set dir="C:\Program Files\eviware\loadUI-1.5.0\"

call %dir%loadui-cmd.bat -l -p C:\Users\user.name\.loadui\Service.xml -t Test1
call %dir%loadui-cmd.bat -l -p C:\Users\user.name\.loadui\Service.xml -t Test2
call %dir%loadui-cmd.bat -l -p C:\Users\user.name\.loadui\Service.xml -t Test3
call %dir%loadui-cmd.bat -l -p C:\Users\user.name\.loadui\Service.xml -t Test4

But the same thing is happening, the test doesn't appear to end.
If I press 'ctrl c' there is a message saying ShellTUI: No standard input....exiting
Terminate batch job (Y/N)?
If I select 'N' then the next test, Test2, starts.
AndyHughes
Regular Contributor

Hi, Is there any chance of someone looking into this for me? It's really important that I'm able to run one load test after another without watching it every minute of the day? I have over 400 load tests to run on a monthly basis.
SmartBear_Suppo
SmartBear Alumni (Retired)

I'm on it Andy... been looking at this since yesterday. I expect it to be resolved quite soon

Henrik
SmartBear Software

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: