Forum Discussion

API-Tester's avatar
API-Tester
Occasional Contributor
7 years ago
Solved

Run 2+ SecurityTests from SecurityTest Runner command line?

I don't see a board for Secure, so I am posting this in the SoapUI board.

 

I am attempting to create a .bat file to execute my security tests. Using the UI in Secure Pro, I can select either 'All' security tests, or a single, specified security test. But what if I want to run more than one, but not all? Is that possible? I tried writing my .bat file like this:

 

 

cd C:\Program Files\SmartBear\ReadyAPI-1.9.0\bin

securitytestrunner.bat -nSecurityTest1 -fC:\Users\myUser\Desktop\SecureReports -R"Security Issues Report" -E"Default environment" -I C:\Users\myUser\Documents\SoapUI

securitytestrunner.bat -nSecurityTest2 -fC:\Users\myUser\Desktop\SecureReports -R"Security Issues Report" -E"Default environment" -I C:\Users\myUser\Documents\SoapUI

 

However, after the the first test completes, it saves the report and then the command prompt exits without ever running the second test. Is there a way to stop this from happening, so that it continues on to the next test?

  • The solution is to put the word 'call' in front of each testrunner line:

     

    cd C:\Program Files\SmartBear\ReadyAPI-1.9.0\bin
    
    call securitytestrunner.bat -nSecurityTest1 -fC:\Users\myUser\Desktop\SecureReports -R"Security Issues Report" -E"Default environment" -I C:\Users\myUser\Documents\SoapUI
    
    call securitytestrunner.bat -nSecurityTest2 -fC:\Users\myUser\Desktop\SecureReports -R"Security Issues Report" -E"Default environment" -I C:\Users\myUser\Documents\SoapUI

5 Replies

    • API-Tester's avatar
      API-Tester
      Occasional Contributor

      Thanks. Looks like the Secure board is the same as the SoapUI board.

      • groovyguy's avatar
        groovyguy
        Champion Level 1

        You're right, I just double checked that it was the same link for both boards on the main page. I copied and pasted without looking. I should've paid more attention. 

  • API-Tester's avatar
    API-Tester
    Occasional Contributor

    The solution is to put the word 'call' in front of each testrunner line:

     

    cd C:\Program Files\SmartBear\ReadyAPI-1.9.0\bin
    
    call securitytestrunner.bat -nSecurityTest1 -fC:\Users\myUser\Desktop\SecureReports -R"Security Issues Report" -E"Default environment" -I C:\Users\myUser\Documents\SoapUI
    
    call securitytestrunner.bat -nSecurityTest2 -fC:\Users\myUser\Desktop\SecureReports -R"Security Issues Report" -E"Default environment" -I C:\Users\myUser\Documents\SoapUI