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

WebTest export - ReportingName

4 Answers 167 Views
Extensions and Customization
This is a migrated thread and some comments may be shown as answers.
48
Top achievements
Rank 1
48 asked on 16 Mar 2015, 11:49 AM
I am attempting to create a plugin to allow the WebTest export to enable me to achieve the following:

1. Add the ReportingName to each WebTest request from using a combination of form element values.
2. Replace a value with a WebTest parameter: {{exampleParameter}}

Current issue:
1. I can't seem to retrieve the ReportingName setter from the IFiddlerWebTestPlugin interface?
2. I believe I can do this with current functionality as it's a simple transform from one value to another prior to saving the request.

Any help gratefully received.

I have attached a simple WebTest file with a snippet below (you'll need to convert the .jpeg to a .webtest (or .txt).

WebTest snippet:

  <Items>
    <Request Method="GET" Guid="c2bdeaaa-352c-4835-ad7b-ea7d723cdfa8" Version="1.1" Url="http://www.google.co.uk/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="https://www.google.co.uk/?gws_rd=ssl" ReportingName="Navigate to Google" IgnoreHttpStatusCode="False">

4 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 17 Mar 2015, 03:36 PM
Unfortunately, I don't think the WebTest Export extensibility enables the level of customization you seek. The extensibility model enables plugins to skip writing certain steps to the test, and add extraction/validation rules, but it doesn't provide any mechanism to change the XML of the step as it's written to the file.

Fiddler does promote the Session's ui-comments flag to a CommentText element in the XML, but I assume that Visual Studio isn't smart enough to fallback to the comment if the ReportingName isn't set?

I could probably tweak the code such that Fiddler sets the ReportingName attribute if the your plugin sets a WebTest-ReportingName flag on the Session?


With regard to the "replace a value with a WebTest parameter"-- I don't know enough about your scenario to understand what this would entail? It may already be possible to do this with your PreWebTestSave event handler...

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Accepted
Adrian
Top achievements
Rank 1
answered on 18 Mar 2015, 12:52 PM
Reporting names and comments are quite separate in Visual Studio. Empty or unset reporting names are set from the URL, taking the value after the right-most "/"; query strings are ignored. Reporting names can be set at run time in Visual Studio using a plugin; these values are also trimmed to just the item after the right-most "/".

The two changes you want to make could, I believe, be achieved by modifying the ".webtest" file after Fiddler has written it. The Visual Studio ".webtest" file is just XML. I have used a text editor to set and to modify reporting names in the XML. I have also written both C# and Perl programs to do simple manipulations of the XML when I wanted to do the same action several times and so a text editor would be unsuitable.
0
Accepted
Eric Lawrence
Telerik team
answered on 19 Mar 2015, 03:17 PM
Fiddler 2.5/4.5 promote a "WebTest-ReportingName" flag from the Session to the target attribute in the XML.

As no further information has been provided about the "WebTest parameter", that aspect is unchanged for now.

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
48
Top achievements
Rank 1
answered on 24 Mar 2015, 11:28 AM
Thank you both for your replies. I have some time between projects to have another go. It is simply xml file manipulation that could be achieved using many tools outside of Fiddler. I just wondered if there were any built in hooks.

Thanks again.
Tags
Extensions and Customization
Asked by
48
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Adrian
Top achievements
Rank 1
48
Top achievements
Rank 1
Share this question
or