c# - The URL Specified () does not correspond to a valid directory. -


when trying run unit test error:

test name: getmethodtest test fullname: quanser.codex.app.web.repository.unittests.documentscontrollertests.getmethodtest test source: c:\dev\engineering\mobile apps\software\codex\trunk\web\repository\unittests.repository\documentscontrollertests.cs : line 34 test outcome: failed test duration: 0:00:00

result message: url specified ('http://localhost:53364/') not correspond valid directory. tests configured run in asp.net in iis require valid directory exist url. url may invalid or may not point valid web application.

this test case:

    [testmethod()]     [hosttype("asp.net")]     [urltotest("http://localhost:53364/")]     public void getmethodtest()      {       // ...     } 

i know there wrong line:

 [urltotest("http://localhost:53364/")] 

what should put url in attribute?

note: need use these attributes testing rest api

thanks

those attributes testing asp.net web forms projects. if need test webapi controllers should able delete them, e.g.

[testmethod()] public void getmethodtest()  {   // ... } 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -