Automatic service discovery and selection is the key aspect for composing Web services dynamically in service-oriented computing (SOC). Current approaches to automating discovery and selection make use of only structural and functional aspects of the Web services. We believe that behavioral selection of Web services should be used to provide more precise results. Service behavior is difficult to specify prior to service execution and instead is better described based on experience with the service execution. In this paper, we propose a novel approach to service selection and maintenance-inspired by agile software development techniques-that is based on behavioral queries specified as test cases. Behavior is evaluated through the analysis of execution values of functional and non-functional parameters.