问题来源:
Summary: Data Driven Testing is a good practice that allows you to have a broad range of test values, which are repeatable
Article demonstrating DDT with an Excel sheet: http://msdn.microsoft.com/msdnmag/issues/06/11/TestRun/default.aspx
VSTS has built-in DDT hooks. Find more info here: TFS Data Driven Testing
DDT API
An alternative to using VSTS for DDT is creating a simple DDT API with some methods that generate values (these values can be different each time depending on desired behavior) for you. If you want it to do more than one value than you simply put it in a loop. We used this approach heavily in the Geo Segmentation project. Our test would ask for an IP address within Japan and the API would hand us one randomly. This was a lot faster than if we would’ve put the data into an Excel sheet and used the VSTS hooks. Also, in our case it provided an even broader range of values without having to run every single value every time.
Welcome to the patterns & practices Performance Testing Guidance project Community site. The purpose of this project is to build some insightful and practical guidance around doing performance testing and using Visual Studio 2005. It’s a collaborative effort between industry experts, Microsoft ACE, patterns & practices, Premier, and VSTS team members. – J.D. Meier, Carlos Farre, Prashant Bansode, Scott Barber, Dennis Rea