document running dredd manually
for lang != .js
Here is what I did in the end to run tests successfully on my repo:
-
sudo npm install -g [email protected] -
sudo npm install -g [email protected] -
sudo npm install -g [email protected] -
dredd todos.apib http://localhost:8080 --hookfiles=hooks.js
Note: I am currently including local copies of todo.apib and hooks.js in my repo: https://github.com/webmaven/appengine-todos-morepath
What I'd like to see is a workflow more like this:
-
npm install todomvc-api -g -
todomvc-api test http://localhost:8080
- sudo npm install -g [email protected]
- sudo npm install -g [email protected]
- sudo npm install -g [email protected]
All of these steps are combined by just npm install todomvc-api -- we have those modules as dependencies. They are also not global modules, which is what the -g flag means, so no need to install them as such.
- npm install todomvc-api -g
- todomvc-api test http://localhost:8080
In our case, our backend is Node/Express, so it's easy for us to integrate it into our JS tooling stack. For non-Node implementations, you would prefer having a system-wide, cli test command? Will you integrate API validation tests into your application's test suite somehow? I'm curious how these pieces would fit together, and if we can provide a more ideal solution.
** edit ** Updated link
All of these steps are combined by just
npm install todomvc-api[snip] They are also not global modules, which is what the -g flag means, so no need to install them as such.
I screwed something up when I just installed todomvc-api locally. I wasn't able to run the Dredd command.
For non-Node implementations, you would prefer having a system-wide, cli test command?
Well, other stacks like Rails may have better support for API Blueprints than Python, but for Python I do prefer a CLI command. It need not be installed globally, though, and need not be specific to TodoMVC-API. Almost any variation on:
-
npm install $PACKAGENAME -
dredd $OPTIONS
or:
-
npm install $PACKAGENAME -
todomvcapi $OPTIONS
Would be fine with me.
Will you integrate API validation tests into your application's test suite somehow?
I suppose I could, but I wasn't planning on doing much more than running the API validation manually. Morepath is also a new framework, and there isn't much documentation or culture around testing just yet.
At @stephenplusplus' suggestion on #10: Bump.
I think we should document how to run dredd manually after installing todomvc-api, it should be in node_modules/.bin
Bump