WebTest Plugin

Hi,

I've created a WebTest plugin to set some context paramters for my WebTests. I have derived the class from Microsoft.VisualStudio.TestTools.WebTesting.WebTestPlugin
When I want to add the plugin to my WebTest I get the message:
"The project contains no references to a WebTest plug-in class."

I've tried putting the class in a seperate assembly and reference it from my testproject. This is not helping.

Can anybody help me with this

Thanks,

Martijn


Answer this question

WebTest Plugin

  • Kishore M N

    I've put the plugin manually in the XML of the webtest and when running it I get an errormassage refering to the Microsoft.VisualStudio.QualityTools.WebTestFramework namespace, which I believe is the old name of this namespace.

    Is this a bug in the RTM

    Regards,

    Martijn

  • Dave Jefferson

    I think the only problem is that the class is not public.  Make the class public and the editor will find the plugin from either the assembly or from inside the test project.

  • LukeSkywalker

    You're right! Thank you very much for the fast response!
  • Hadi Eskandari

    Hi,

    I pasted the code of my class below. As said, I tried this from the testproject and from an external assembly. I'm using the following versions:

    VS2005:       8.0.50727.26 (RTM.050727-2600)
    Framework:   2.0.50727

    Thanx!

    Martijn


    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace PerfTest
    {
       
       class
    Settings : Microsoft.VisualStudio.TestTools.WebTesting.WebTestPlugin 
       {
          
    public override void PostWebTest(object sender, Microsoft.VisualStudio.TestTools.WebTesting.PostWebTestEventArgs e)
          {
          }

          public override void PreWebTest(object sender, Microsoft.VisualStudio.TestTools.WebTesting.PreWebTestEventArgs e)
          {
             e.WebTest.Context[
    "Webserver"] = "http://testserver";
             e.WebTest.Context[
    "Application"] = "TestApp";
          }
       }
    }

     


  • Paul Vacarescu

    Can  you post the code for the class   If you are using recent builds, then you should be able to have the plugin in your test project or add it through an assembly.

  • WebTest Plugin