Andreas Grabner About the Author

Andreas Grabner has been helping companies improve their application performance for 15+ years. He is a regular contributor within Web Performance and DevOps communities and a prolific speaker at user groups and conferences around the world. Reach him at @grabnerandi

How to extend Visual Studio 2010 Web- and Load-Testing with Transactional Tracing

Microsoft recently published the first official beta build of Visual Studio 2010. Visual Studio Team System for Testers has some nice improvements on their testing features. Additionally to new features – Microsoft also opened their extension points. One new interface that I am using to integrate dynaTrace into Visual Studio is the LoadTestPackageExt object and the ability to add new tabs to the WebTestResultViewer.

Providing your own tab in the Web Test Result Viewer

Extended Web Test Result Viewer

Extended Web Test Result Viewer

The image above shows a new dynaTrace tab that is added to the Result Viewer. Everytime the selection changes in the Result Tree – all tabs get a notification with the current selection context including the Web Reqest and Web Response. In my case I check the Web Response headers for the tagged dynaTrace Header. This header indicates that dynaTrace has captured a PurePath for the request. The header value also uniquely identifies the captured PurePath. My tab control hosts a Browser Control – displaying HTML that contains links all PurePaths of the currently selected request (there could be more than one PurePath because embedded requests may also result in a PurePath). With the new open dynaTrace RESTful APIs I can then just simply open the PurePath in the dynaTrace Client by sending an HTTP GET Request. (I will cover the RESTful Service APIs in a separate blog as I think this will be benefitial for many dynaTrace users).

Steps to implement your own custom tab?

Step 1: Create a Visual Studio Add-In

Just create a new Visual Studio Add-In Project. The Project Wizard will create a working Add-In.

Step 2: Reference Microsoft.VisualStudio.QualityTools. assemblies

Reference the following assemblies:

  • Microsoft.VisualStudio.QualityTools. LoadTestPackage
  • Microsoft.VisualStudio.QualityTools. LoadTestFramework
  • Microsoft.VisualStudio.QualityTools. WebTestFramework

Step 3: Work with the LoadTestPackageExt object to register callbacks

In the OnConnection method of your Add-In you can register the callbacks in order to create and dispose your tab controls. In case your Add-In gets activated when a Result View is already opened – you can also iterate through the currently opened Result Windows.

OnConnection Implementation

OnConnection Implementation

Step 4: Create your tab control and add it to the Result Viewer

Implement a Create method that creates the new control and adds the control to the result viewer tab. Also – keep track of created controls and which test result is displayed. At the SelectionChange event handler you only want to update the control in the Test Result View that had the selection change. This is necessary because multiple result viewers can be open at the same time displaying different test run results.

Create control and add tab

Create control and add tab

Step 5: Implement your event handlers

The event handlers take care of triggering the tab creating, notifying about a selection change in a Result Viewer and notifying about the disposal of a result view.

Event Handler Implementation

Event Handler Implementation

Step 6: Update your control on selection change

Whenever the selection changes your event handler can forward the current context to your control.

Update Controls on Selection Changed

Update Controls on Selection Changed

Conclusion

Visual Studio provides more and more extension points that allow you to add your own tabs to the Result Viewer. dynaTrace leverages this new interface in addition to the interfaces that were support with older versions of Visual Studio, e.g.: LoadTest-Plugin, WebTest-Plugin and WebTestRequest-Plugin.

If you’re interested in running similar load tests, especially involving Visual Studio 2010, you’ll probably be interested in a White Paper I collaborated on about Transforming the Load Test Process.
Also, seeing as Visual Studio 2010 is built on the .NET Platform you might also be interested in my latest White Papers about Continuous Application Performance for Enterprise .NET Systems.

Comments

  1. I haven’t checked all your sites so far, but those five I managed to look through really impressed me! How long are you in this business? There’s always field for improvement, sure thing, but this is what a good site should be!

  2. @nike: sorry to tell you that my preferred shoes are Puma’s :-)
    But – thanks for the nice comment. We have been in this field (performance management) for a while and we really hope to not only build awareness of dynaTrace as a company and a cool product but also educate the community. Check out the free dynaTrace AJAX Edition and all the blogs we wrote about it. Let me know if you need any more information about VS2010 or any other .NET/AJAX/Performance Related topics
    Cheers
    Andi

  3. Great post! I am just starting out in community management/marketing media and trying to learn how to do it well – resources like this article are incredibly helpful.
    http://www.mbtshoesstore.net/
    MBT shoes
    http://www.mbtshoesstore.net/
    MBT
    http://www.mbtshoesstore.net/
    MBT outlet

  4. it is interesting, god bless you!

  5. As a famous designer shoes, Super Cheap Christian Louboutin Shoes no doubt, Louboutin Christianity is the highest exposure.Christian Louboutin Shoes boots As a famous designer shoes .

  6. Summary holiday is coming; why not buy new clothing and shoes for yourself? You can find cheapest goods in our site, such as http://www.silverart.uk.com Links Of London,if you have it you will find it really good, or if you like http://www.ewardrobe.uk.com Abercrombie and Fitch you can find them in our site. What’s more you must be satisfied. http://www.comfortoes.com mbt shoes Welcome to our site. it is really cheap and high qualitity discount shop

  7. Do you know the well know clothing brand http://www.lovember.comEd hardy
    ,I think the most suitable match is http://www.lovember.com/ed-hardy-t-shirts Ed Hardy T Shirts with http://www.lovember.com/ed-hardy-tanks Ed Hardy all that can easily put natural generous side out, looked handsome youth .In short to create your own truly beautiful and popular!

  8. wow! it is so perfect.

  9. nothing better than your work.

  10. I’ll learn the thing you teach.thanks .

  11. well done! I’m interested in your article.

  12. thank you very much post this, that is very good.

  13. you are great to post this, that is very useful.

  14. that is a great post that you do, thanks a lot.

  15. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can’t wait to read lots of your posts.

  16. I would like to thank you for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now.

  17. Bookmarked on favorites already.

  18. Positive: Mrs Allison was once accused by a cashier of deliberately cursing his till when her magnetism caused it to develop problems. http://www.0sfz.com http://www.ybwzz.com http://www.sf5z.com http://www.bjxx5.com

  19. Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.

  20. I think your opinions are reasonable.But I don’t agree with you to some extent.

  21. you are great to do this for us, thank you very much, you can have a look at the cheap and nice ugg boots.

  22. I found your blog using Google; it seems decent and the post was great, much appreciated. Keep up the good work.

  23. I really like your topic .. I’ve shared on facebook ..
    Thank you very much again ..

  24. I’m not sure if I understand or not, but good post anyway haha.
    Btw I was wondering if you used a premade template or theme for this blog or if you made it yourself somehow?

  25. Good article – but some more pictures would have been helpful… :)

  26. your artical give met send a link, many thanks.

  27. Ken Baker says:

    For some reason the current VS2010 version with SP1 and all ofthe patches does not have the first assembly in rhe reference list anymore (•Microsoft.VisualStudio.QualityTools. LoadTestPackage). Do you know where to get it from or which reference contains it?

    Thanks!
    Ken

Trackbacks

  1. How to extend Visual Studio 2010 Web- and Load-Testing with Transactional Tracing…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

  2. [...] the request, detailing how much time the request spent at each tier of your application. Check out Andreas’s post on the integration (including some code [...]

  3. [...] the request, detailing how much time the request spent at each tier of your application. Check out Andreas’s post on the integration (including some code [...]

  4. Architecture Blogs…

    [...] Microsoft recently published the first official beta build of Visual Studio 2010. Visual Studio Team System for Testers has some nice improvements on their testing features. Additionally to new features – Microsoft also opened their … [...]…

  5. Architecture Blogs…

    [...] Ed Glas’s blog on VSTS load testing : dynaTrace Leverages new Extensibility Points to Provide Deep Integration with Dev10 @ 2009-05-20 19:25. [...] the request, detailing how much time the request spent at each tier of your application. … [……

  6. [...] How to extend Visual Studio 2010 Web- and Load-Testing with … [...]

  7. [...] just released the first Release Candidate which looks pretty solid and good. Microsoft added new interfaces for performance management solutions like dynaTrace to extend the Web- and Load-Testing capabilities [...]

Comments

*


8 − = five