vendredi 4 septembre 2015

Microsoft Visual Studio 2012 Ultimate : Load testing and unit testing

I have written unit tests which basically calls a web API. I wanted to use these unit tests in a load test project. My load test is configurable for multiple virtual users. Now I wanted to generate a unique data for each virtual user and pass to the web API through unit test.

I am not able to find where I should be doing this? Currently my unit test has pre-defined static data which I need to replace for each virtual user.

As an example:- Let's say my WebAPI takes in userid and creates the unique userid in database. So in my unit test, I created a test and used a string variable to create the userid(e.g. JoeMartin). Now I want to load test this API and pass data for each virtual user, for example I want to load test my API with 100 virtual users with userId as JoeMartin1, JoeMartin2....JoeMartin100.

Now where can I generate this load data and pass to the unit test.

Aucun commentaire:

Enregistrer un commentaire