Use SoapUI to test the WebService interface.

Source: Internet
Author: User
Tags soapui

Use SoapUI to test the WebService interface.

1. Download tomcat and axis2 and configure the runtime location of the Server and WebService.

 

2. Create a Java project named WebServiceTest and create a class NumberAndZero.

3. Enter the source code in the class to determine whether the input number is greater than 0, equal to 0, or less than 0.

Package test. webservice; public class NumberAndZero {// determine the size relationship between the parameter and 0 public String numberOverZero (double d) {if (d> 0) return d + "> 0 "; if (d = 0) return d + "= 0"; else return d + "<0 ";}}

4. Select the WebServiceTest project and create a WebService,

 

 

5. click Next.

 

6. Start Server

 

7. Click the "finish" button after the startup to see that the startup is successful.

8. In this case, Eclipse automatically enters Web Services Explorer and copies the wsdl path.

9. Open SoapUI and create a Soap project.

10. After this is done, change the D value to replace the question mark and send

 

11. As you can see, the response is received: 88.0> 0

12. Create TestSuite and TestCase and add this request to TestStep of TestCase.

13. Add assertions

 

 

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.