tags:

views:

44

answers:

1

Dear ladies and sirs.

When I run Silverlight unit tests, I get First Chance HttpException, at the following stack trace:

System.Web.dll!System.Web.StaticFileHandler.GetFileInfo(string virtualPathWithPathInfo, string physicalPath, System.Web.HttpResponse response) Line 87  C#
System.Web.dll!System.Web.StaticFileHandler.ProcessRequestInternal(System.Web.HttpContext context, string overrideVirtualPath) Line 507 + 0x18 bytes    C#
System.Web.dll!System.Web.DefaultHttpHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback callback, object state) Line 108  C#
System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() Line 3389 + 0x14 bytes   C#
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) Line 2239    C#
System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) Line 3699 + 0x35 bytes C#
System.Web.dll!System.Web.HttpApplication.ResumeSteps(System.Exception error) Line 2323 C#
System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) Line 1358 C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr) Line 1606 + 0x15 bytes    C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNow(System.Web.HttpWorkerRequest wr) Line 2299  C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) Line 2281 C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) Line 2265 C#
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Request.Process() + 0x17c bytes 
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Microsoft.VisualStudio.WebHost.Connection conn) + 0x6c bytes    
[Appdomain Transition]  
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0x83 bytes   
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) Line 1507 + 0xb bytes    C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) Line 441 + 0xd bytes    C#
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Line 1486 + 0x23 bytes   C#
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 974   C#
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Line 1341 + 0x6 bytes   C#
[Native to Managed Transition]  

The essence of the error is that the file "/ClientBin/Shunra.Common.Test.SL.xapping" is missing, where Shunra.Common.Test.SL is my Silverlight unit test application. The physical path is "C:\dev\windows\Common\Shunra.Common.Test.SL.Web\ClientBin\Shunra.Common.Test.SL.xapping"

What are these xapping files?

Thanks.

+1  A: 

It is just the whole testing framework inside the toolkit is very raw at the moment. During initialization of the SilverlightTestService a call is made to "Verify" the presence of some web service on the server side:

    public void Verify(Action success, Action failure)
{
    new WebTestService(this.ServiceUri).CallMethod("ping", delegate (ServiceResult result) {
        if ((result != null) && result.Successful)
        {
            success();
        }
        else
        {
            failure();
        }
    });
}

You can see that that "ping" combined with this.ServiceUri being complete xap path, gives that .xapping nonsense. At the moment, SL Toolkit unit testing framework is full of loose ends like this.

Stanislav Dvoychenko