Abstract:In order to test Web Services,a testing technology based on Design-by-Contract is proposed in this paper.Usually,there are two problems when the users are using Web Services.Firstly,they cannot locate the occurring errors during testing precisely. Secondly,it is difficult to test whether Web Services meet their requirements.Design-by-Contract is an effective method to improve software reliability.This paper proposes a testing technology for Web Services based on preconditions and postconditions,then extends the syntax of WSDL and implements a prototype on the Microsoft.NET platform,which can solve the above problems better.