Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web service unit testing

I'm using JAX-WS web services (client and exposed services), is there any API to test these web services?

like image 778
Isabel Jinson Avatar asked Apr 03 '10 10:04

Isabel Jinson


People also ask

What is web unit testing?

PHPUnit is a unit testing framework for the PHP programming language. It is an instance of the xUnit design for unit testing systems that began with SUnit and became popular with JUnit. Even a small software development project usually takes hours of hard work.

Is it possible to unit test web API?

You can either create a unit test project when creating your application or add a unit test project to an existing application. This tutorial shows both methods for creating a unit test project. To follow this tutorial, you can use either approach.

What is unit testing in web development?

Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. This testing methodology is done during the development process by the software developers and sometimes QA staff.


2 Answers

JAX-WS web services are annotated POJOs so you can unit test them (in isolation) using a regular unit testing framework (JUnit, TestNG) and Mocks.

like image 193
Pascal Thivent Avatar answered Nov 15 '22 13:11

Pascal Thivent


  • test the services out of their "web-service" context.
  • Use WSUnit to test consumers.
  • take a look at this article

Unit tests are meant to test units of code. They should test business logic, and not infrastructure. So this is not exactly "unit-testing" if you want to test the services within the web-service context.

like image 41
Bozho Avatar answered Nov 15 '22 15:11

Bozho