Referenced from: http://www.cnblogs.com/liulinghua90/p/4954045.html
If there is no code ability of the small white, to use the tool for interface testing, often encounter interface address or interface parameter change problem, and then have to change the interface, then manually to change all the request link address and interface parameters! 1-5 requests, we manually change to cope with! If 10 more than 20, I feel that the heart is very rush! So today we deliberately teach you a trick to prevent the first! It is also a point to be tested: start with the details.
STEP1: Import a project and click on this item, under the Public properties module, set a common parameter as shown in:
Of course, here is just a parameter, you can take whatever name you want! But after this value, be sure to remember that it is the IP address and port number of your interface request!
STEP2: Then click on the content of your project, which is the green funnel-shaped item, double-click it:
Then it pops up a dialog box, check the Service Endpoints tab, and look at the third step below.
STEP3: Edit your reference as follows:
Here you have to tip 2 points "
1) Some students are often in the first step of the parameters, set the URL to write is this: http://192.168.1.14:19020, since the time of the reference, and then here, and repeat the http://, so it will be an error! Because the stitched up address becomes:
Http://http://192.168.1.14:19020 ... this must have been a failed visit!
2) There are students in the reference to this URL, will often forget the previous #, and then it is this:, also alive or alive visit unsuccessful! That's because you didn't reference the correct IP address at all!
So we must be careful and careful, there should be no less, should be removed!
STEP4: Let's look at the effect
You can see your corresponding request inside, the address is quoted form, whether it is to change the IP address or interface or change parameters, no longer need to change a one! You just need to move your finger, the first place to set the parameters, that is, one step there, change the corresponding IP address of the parameter is OK!
Just a shortcut to the application, hope to help everyone!
Before have tried jmeter jdbc request, very convenient, this afternoon idle to nothing, see soapui inside also has a JDBC request, also come to try.
First, add a JDBC request, and then directly copy some of the link parameters of JMeter in the past, always error, unable to access the database. Then Baidu looked at the next, and finally to the official online to find the answer, recorded for sharing, after you encounter similar needs to use, you can not hit the head!
1. Add a JDBC Request
2. When you are finished adding, see the JDBC content page:
We need to add the driver and the connection string ourselves.
Note: The driver needs us to download, Mysql-connector-java-5.1.7-bin.jar, download, and put it directly under the Soapui Lib folder.
See the above connection method, I just said here is the connection mode of MySQL.
Driver:mysql/com.mysql.jdbc.driver ----> here is how Mysql drives the reference.
Connection string:jdbc:mysql://120.44.25.15:3306/test?user=root&password=123456 ----> here is how to concatenate the database strings. The following are special instructions:
The connection string is made up of the following methods:
jdbc:mysql://ip[database server IP Address]:p ort[port number]/database[database name]?user=[fill in the login database user name]&password=[password]
3. Click the Green: Test Connection button to see if the connection is successful, and if successful, you will see the following prompt box:
4. You can then enter the corresponding SQL statement in the input box below to see that the query was successful!
This is even if the connection and the use of success, if it is a complex SQL statement, you may need to study the stored procedures themselves, there is an option to check the stored procedures.
Hope can help everyone!
SoapUI parameterization & Database connections