Testrunner. BAT in soapui for automated testing

Source: Internet
Author: User
Tags soapui smartbear continuous integration tools

Testrunner. BAT in soapui for automated testing
Subtitle: Survey posture of soapui based on continuous integration tool Automation

Dear colleagues, how are you?
We have been working on continuous integration tools in recent projects. Our test cases are based on the soapui tool (WebService restful ).
Continuous integration tools we use Jenkins.
We need to use tools to automatically update project code-> automatic building-> automatic release-> automatic run test cases-> automatic mail and other functions.

Jenkins allows you to add and run BAT files to execute various requirements that the user wants to execute.
(In fact, other continuous integration tools are similar)
Therefore, we use the BAT file to call the testrunner. BAT file of soapui to meet this requirement !!!

Perform the following steps: Just follow my steps one by one plz...

 

 

0. First download soupui-Pro of the latest version. Remember not to crack the version. soupui-pro can generate detailed test report documents,
The common soupui version does not have this function, and it is more interesting that soupui officially allows users to call testrunner. bat through commands.
If you have not purchased the license. (Sorry, I wrote too much English .)
The official address is http://www.soapui.org.

 

 

1. After the download is complete, install soupui-pro, and then you do not even need to run soapui-pro.
Assume that your installation directory is in: C: \ Program Files \ smartbear \ soapUI-Pro-4.5.1 \ bin

 

 

2. Compile a BAT file with the following content:
@ Echo off
CD \
C:
Cd c: \ Program Files \ smartbear \ soapUI-Pro-4.5.1 \ bin
Testrunner. Bat-r-j d: \ 251test-soapui-project.xml-f c: \ temp \ reports-fpdf
Then run the bat command.

 

 

3. The following is a detailed description of the BAT file.
First, I need to go to the installation directory of soapui-pro to run the testrunner. BAT file as a command.
(What? You don't know what this file is? Okay. He is a tool used to run test cases)
Then call testrunner. BAT and add several parameters.

About testrunner. BAT:
Soapui provides the command line tool testrunner. BAT to run testsuit in a project. You can find it in <soap_ui_home>/bin,
It is very easy to use. You only need to set the following common parameters:
-S: Specify the testsuite to run
-F specifies the output directory of the running result
-J: generate a JUnit report
-Print a simple summary After r runs.
 
The following command runs pushpoitestsuite in the soapui project 251test-soapui-project.xml,
Output the result to c: \ temp \ reports.
Testrunner. Bat-s pushpoitestsuite-r-j d: \ 251test-soapui-project.xml-f c: \ temp \ reports
What if I want to run all the test cases in XML? Delete-s pushpoitestsuite.
Testrunner. Bat-r-j d: \ 251test-soapui-project.xml-f c: \ temp \ reports-fpdf
Why should I add a-fpdf? This is one of the features of pro. You can generate HTML from the test results. Imagine how terrible it is to not display HTML!
After the automatic operation is completed, the c: \ temp \ reportsdirectory will have a running result and an index.html file to open it!

 

 

The following are other parameters (please forgive me for not translating them into Chinese)
E: the endpoint to use when invoking test-requests, overrides the endpoint set in the project file
H: The Host: port to use when invoking test-requests, overrides only the host part of the endpoint set in the project file
S: The testsuite to run, used to narrow down the tests to run
C: The testcase to run, used to narrow down the tests to run
U: the username to use in any authentications, overrides any username set for any testrequests
P: the password to use in any authentications, overrides any password set for any testrequests
W: sets the WSS password type, either 'text' or 'digest'
D: The domain to use in any authentications, overrides any domain set for any testrequests
R: turns on printing of a small summary report (see below)
F: Specifies the root folder to which test results shocould be exported (see below)
J: turns on exporting of JUnit-compatible reports, see below
A: turns on exporting of all test results, not only errors
O: opens the generated report in a browser (soapui pro only)
I: enables soapui UI-related components, required if you use the uisupport class for prompting or displaying information
T: sets the soapui-settings.xml file to use, required if you have custom proxy, SSL, HTTP, etc setting
X: sets Project password for decryption if project is encrypted
V: sets password for the soapui-settings.xml File
D: sets system property with name = Value
G: sets global property with name = Value
P: sets project property with name = value, e.g.-pendpoint = value1-psomeotherproperty = value2
S: sets to save the project file after tests have been run
I: Do not stop if error occurs, ignore them
R: selects which report to generate for the test objects executed, for example if running the entire project, this cocould specify the name of a test-suite-level report that wocould be generated for each testsuite. the report is saved as specified with the-F
Option to the folder specified with the-F option. (soapui pro only)
F: sets the format of the report specified with the-r option, for printable reports this is one of PDF, xls, HTML, RTF, CSV, txt, and XML. for data export this is either XML or CSV (soapui pro only)
G: sets the output to include coverage HTML reports (soapui pro only)
E: sets which environment to use (soapui pro only)

 

 

Official Instructions shipping: http://www.soapui.org/Test-Automation/functional-tests.html
Cya ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.