Skip to content
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

document running dredd manually #3

Open
proppy opened this issue Oct 28, 2014 · 7 comments
Open

document running dredd manually #3

proppy opened this issue Oct 28, 2014 · 7 comments

Comments

@proppy
Copy link
Collaborator

proppy commented Oct 28, 2014

for lang != .js

@webmaven
Copy link
Contributor

webmaven commented Nov 2, 2014

Here is what I did in the end to run tests successfully on my repo:

  1. sudo npm install -g [email protected]
  2. sudo npm install -g [email protected]
  3. sudo npm install -g [email protected]
  4. 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

@webmaven
Copy link
Contributor

webmaven commented Nov 3, 2014

What I'd like to see is a workflow more like this:

  1. npm install todomvc-api -g
  2. todomvc-api test http://localhost:8080

@stephenplusplus
Copy link
Member

  1. sudo npm install -g [email protected]
  2. sudo npm install -g [email protected]
  3. 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.

  1. npm install todomvc-api -g
  2. 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

@webmaven
Copy link
Contributor

webmaven commented Nov 3, 2014

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:

  1. npm install $PACKAGENAME
  2. dredd $OPTIONS

or:

  1. npm install $PACKAGENAME
  2. 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.

@webmaven
Copy link
Contributor

webmaven commented Nov 9, 2014

At @stephenplusplus' suggestion on #10: Bump.

@proppy
Copy link
Collaborator Author

proppy commented Nov 11, 2014

I think we should document how to run dredd manually after installing todomvc-api, it should be in node_modules/.bin

@webmaven
Copy link
Contributor

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants