Vitaly Rubinchuk

Hello,

My question is next: I'm trying to modify my webtest (to add verifications and other staff) using it's generated code.

After I click on the Generate Code button I'm getting the C# code which I would like to change. The problem is that I don't know how exactly to update my changes in the webtest - I cannot run just C# class.

If you did it, please help me by some simple example.

Thank you in advance,

Vitaly




Re: Visual Studio Team System - Web and Load Testing Link or reference between generated code and webtest itself.

Bill Barnett - MSFT

I'm not 100% sure I understand your question, but once you've generated a Coded web test from a declarative Web test, if you change the coded Web test, you cannot regenerate the code from the declarative Web test without losing the modifications you made to your code Web test. You could regenerate the code to a different .cs source file and then manually merge the diffs into your original coded Web test. Does this help, or am I not understanding your question





Re: Visual Studio Team System - Web and Load Testing Link or reference between generated code and webtest itself.

Vitaly Rubinchuk

Thank you first of all. I will explain my question in number of steps:

1. I recorded my script with VS or Fiddler so I have some x.webtest file.

2. I had pressed on Generate button and I got x.cs file, which contained the C# code of this webtest.

3. I changed something (or added) in this script and saved it as y.cs file.

4. Now I want to run it if it's possible or to link it back to the same webtest to run it.

The general question is how can I run my own .cs file I don't think that I'm restricted to use just recorded scripts...






Re: Visual Studio Team System - Web and Load Testing Link or reference between generated code and webtest itself.

Bill Barnett - MSFT

Sure, you can run a coded Web test from the Test View window. On the Visual Studio menu, choose "Test", "Windows", "Test View". Find the name of your coded Web test in the list in the Test View window. Right-click on your coded Web test, and choose "Run Selection". The Test Results window should come up with a row for your test. Double click on the row in the Test Results window to view the detailed result of your coded Web test.

For more info on running tests, see the online docs at http://msdn2.microsoft.com/en-us/library/ms182470(VS.80).aspx.





Re: Visual Studio Team System - Web and Load Testing Link or reference between generated code and webtest itself.

Vitaly Rubinchuk

Thank you a lot




Re: Visual Studio Team System - Web and Load Testing Link or reference between generated code and webtest itself.

Vitaly Rubinchuk

Sorry, I have one more question (I am really new to this testing tool - I worked mostly with RFT before): how can I call from one script to another and to pass params (if I have some built in function like CallScript(..) I mean if I create one top level script, which will call another script that do log in for example, but the username and password will be sent from the top level script to this one.

Thank you in advance,

Vitaly