-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Newman vs. ASP.NET MVC Web API 2 "No HTTP resource was found" message #78
Comments
Hi @jlampeatds, thanks for the stack trace. Looks like newman is failing at the third request. Is it possible for you to share the URL of the third request and make confirm if it is using any environment variable? Thanks! |
Yep, you're right - it's not failing during the second, it's failing at the third. Here's a "clean third" request that fails right away. (The most unusual part about this seems to be that there is an ampersand and a pair of colons in the URL.) {"id":"49928258-dfdb-b352-ee7c-f2fbf099dcb8","name":"MVCWebApp03","timestamp":1399047632403,"order":["eccdd237-29dd-625a-45c6-757231a6faa5"],"requests":[{"collectionId":"49928258-dfdb-b352-ee7c-f2fbf099dcb8","id":"eccdd237-29dd-625a-45c6-757231a6faa5","name":"Value with path","description":"","url":"http://localhost:26069/values/one:two@three:four/resource/pathone/pathtwo/pathlast","method":"GET","headers":"CustomClientToken: badGUID\n","data":[],"dataMode":"params","timestamp":0,"version":2}]} |
Ah ok. Looks probably like a bug with the path variables. Just to confirm the url that you have mentioned is the clean url (i.e url in the exported collection) - "http://localhost:26069/values/one:two@three:four/resource/pathone/pathtwo/pathlast". We will have a fix ready soon. Thanks again for reporting the issue. |
Hi @jlampeatds, new version of Newman is out with this fix. You can update newman with |
Updated and tested great back at the ranch. You guys are awesome - thanks!!! |
Just tried running Newman 1.0.2 with node.js v0.10.28 on a 64-bit Windows 7 machine and received a "TypeError" error on a fairly common ASP.NET MVC Web API 2 error message.
D:\code>newman -c MVCWebApp03_test.json
Iteration 1 of 1
200 20ms Basic value to root http://localhost:26069/values/5
404 21ms Basic value http://localhost:26069/api/values/5
TypeError: Cannot read property 'two' of undefined
at getKey (C:\Users\tehuser\AppData\Roaming\npm\node_modules\newman\src\uti
lities\VariableProcessor.js:62:23)
at String.replace (native)
at Object.jsface.Class._findReplace (C:\Users\tehuser\AppData\Roaming\npm\n
ode_modules\newman\src\utilities\VariableProcessor.js:64:31)
at Object.jsface.Class._processPathVariable (C:\Users\tehuser\AppData\Roami
ng\npm\node_modules\newman\src\utilities\VariableProcessor.js:33:23)
at Object.jsface.Class.processRequestVariables (C:\Users\tehuser\AppData\Ro
aming\npm\node_modules\newman\src\utilities\VariableProcessor.js:107:8)
at Object.jsface.Class._processUrlUsingEnvVariables (C:\Users\tehuser\AppDa
ta\Roaming\npm\node_modules\newman\src\runners\RequestRunner.js:128:21)
at Object.jsface.Class.execute (C:\Users\tehuser\AppData\Roaming\npm\node
modules\newman\src\runners\RequestRunner.js:46:9)
at Object.jsface.Class._onRequestExecuted (C:\Users\tehuser\AppData\Roaming
\npm\node_modules\newman\src\runners\RequestRunner.js:80:8)
at EventEmitter.emit (events.js:117:20)
at Object.jsface.Class.emit (C:\Users\tehuser\AppData\Roaming\npm\node_modu
les\newman\src\utilities\EventEmitter.js:34:16)
Where “Basic value to root” returns:
"value"
…and “Basic value” returns:
{
"Message": "No HTTP resource was found that matches the request URI 'http://localhost:26069/api/values/5'.",
"MessageDetail": "No type was found that matches the controller named 'api'."
}
More info:
[email protected] C:\Users\jonathal\AppData\Roaming\npm\node_modules\newman
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], reque
[email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
The text was updated successfully, but these errors were encountered: