Testing on services-based systems faces the challenges of dynamic collaboration. Services are distributed software that can be bound to establish collaborations on-demand. To verify and validate the services, testing needs to react automatically in a coordinated approach. Software agents, which are characterized by persistence, autonomy, social ability and reactivity, are thus introduced to facilitate test deployment, execution, collaboration, and run-time decision making. This paper proposes a design of test agent model, including agents' knowledge, events, actions and interpreter. The knowledge represents the detected environment status, such as test results and changes in services under test. The action models testing behavior such as test configuration, test deployment and test schedule. The Interpreter defines the rules to select actions or parameters on certain events and conditions. In this way, given a set of knowledge at a certain time, a test agent dynamically adjusts its behavior according to its pre-defined rules and strategies. Case studies and experiments are exercised to apply the generic agent design to specific testing tasks such as performance testing and coverage-based testing.