This is a migrated thread and some comments may be shown as answers.

How can you test session variables

2 Answers 132 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jason Pritchard
Top achievements
Rank 1
Jason Pritchard asked on 04 Dec 2009, 02:18 AM
I have a few licensees with you for telerik and we are just starting to evaluate WebUI, 

I have scene some of the videos on how to test by recording your steps but If you want to test conditions within your website like session variables or current page name..etc... These are available through the request object but I cannot seem to access it when in the Code behind. Also... When at a breakpoint nothing works in the watch windows....

I'm sure it is something small but need some guidance. 

Also How long is the trial good for?

Besides the Videos on Telerik TV, is there any good information on coding in the test code behind. 
Need references to see what we can really do. Is there a Set of test that you guys have against a public site that we can have so that we have real examples on how to use the application. 

Let me know

Jason

2 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 04 Dec 2009, 09:04 AM
Hello Jason,

Thank you for your interest in WebUI Test Studio. I hope you enjoy your evaluation.

You can take a look at the WebAii framework documentation here. It will show you the current options you have working with the WebUI Test Studio code-behind tests. You might also be interested in the HTTP Proxy module now available in the framework.

We ship a set of test samples (Quick Start projects) along with all the test studio components:
- ArtOfTest WebAii Code Framework
- ArtOfTest Design Canvas
- Telerik RadControls Translators (ASP.NET AJAX and soon Silverlight recorded test samples).

All of them are available via the start menu shortcuts. You can easily load the WebAii & DC projects via the ArtOfTest shortcuts.

As to the trial period, it is currently limited to 20 days but we may extend it in certain cases.

We will follow-up in regards to the session variables question (the Http Proxy I mentioned is close to your request) and the watch windows issue on debugging. In the meantime we appreciate your feedback on the product during your the evaluation. Please note WebUI Test Studio v2.0 will be officially released next week so any final comments are more then welcome! We do upload internal builds since the Q3 release as well.

Sincerely yours,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Missing User
answered on 04 Dec 2009, 05:19 PM
Hello Jason,

Just to add a bit to Konstatin's reply, the proxy might indeed be what you would need to access the request object. The proxy is accessible in the WebUI 2.0 beta, but somewhat indirectly with the current beta release.

In a test project with WebUI 2.0, please open the .testrunconfig file with Visual Studio's XML Editor, then change the UseHttpProxy setting to true under the WebAiiTestRunConfig tag as in:

<UseHttpProxy>true</UseHttpProxy>
 

You can then try accessing the request objects via code similar to the following, which is a navigate to step converted to code:

[CodedStep(@"Navigate to : 'http%3A%2F%2Fwww%2Egoogle%2Ecom/'")]
public void WebAiiTest2_CodedStep()
{
    // Add our HTTP response event handler
    ResponseListenerInfo li = new ResponseListenerInfo(GetReqObj);
    Manager.Http.AddBeforeResponseListener(li);
    // Navigate to : 'http%3A%2F%2Fwww%2Egoogle%2Ecom/'
    ActiveBrowser.NavigateTo("http%3A%2F%2Fwww%2Egoogle%2Ecom/");
    // We don't need the event handler any longer
    Manager.Http.RemoveBeforeResponseListener(li);
}
private void GetReqObj(object sender, HttpResponseEventArgs e)
{
    HttpRequest req = e.Response.Request;
}

I've added a feature request to expose the UseHttpProxy setting so editing the actual XML won't be necessary.

And about the debugging problems you are seeing, was that for all VS debugging windows or just when you add a watch on a variable? Please let us know if you continue to see this in WebUI 2.0 beta.

All the best,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Jason Pritchard
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Missing User
Share this question
or