0

I have a problem when running test which derives from WebTest class.

The test fails and in the test results (from .webtestresult file) there is no information about request and why the test failed.

All the tabs (see image below) - Web Browser, Request, Response, Context and Details - are empty.

Do you know what could be the reason?

Empty web test results

Edit:

My test looks similarly to this:

namespace TestProject
{
    public class MyWebTest : WebTest
    {
        public override IEnumerator<WebTestRequest> GetRequestEnumerator()
        {
            var req = new WebTestRequest("http://someexample/");
            yield return req;
        }
    }
}

I've included above test in the ordered test and I'm running this ordered test in the Test Explorer window in VS (I'm using VS 2012).

Mateusz
  • 715
  • 2
  • 7
  • 20
  • I suspect the problem is what you have done in creating a "test which derives from WebTest class". There is no information in your question to help diagnose the problem. – AdrianHHH Feb 20 '15 at 15:20
  • I've added some code and more information to the question. – Mateusz Feb 21 '15 at 11:17
  • Showing some code "similar" to the real code does not help us understand the problem. Pieces of code that you have excluded because you think they are not relevant may be the problem. How does the test behave with the exactly the code you show in the question? Please read http://stackoverflow.com/help/mcve – AdrianHHH Feb 21 '15 at 12:28
  • The result of the example code which I've included in my question is the same. The test fails saying _Message: 1 primary requests, 0 dependant requests and 0 conditional rules failed_ (I guess there is no such page as _http://someexaple/_). But when I'm clicking _Output_ in the Test Explorer window and then _MyWebTest.webtestResult_ there is no detailed information why the test failed. And as I described it in the question all those tabs (_Web Browser_, _Request_ etc.) are empty. I expected that there would be a list of requests done during the test and status codes or sth... – Mateusz Feb 21 '15 at 13:10
  • When I run the code you show as a web test I get useful output. When I add the test to an ordered test and run it with Test Explorer I also see nothing as described in the question. Perhaps you should contact Microsoft and ask them whether this is a bug in Visual Studio. – AdrianHHH Feb 21 '15 at 21:07

1 Answers1

0

Ok, I've found similar question: Web test details are not displayed when ran from an ordered test.

And it looks like there is no detailed test result for a web test run as a part of an ordered test.

One solution is to run web test in a load test and then the result will show up.

Community
  • 1
  • 1
Mateusz
  • 715
  • 2
  • 7
  • 20