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

Documentation for client setup required #1

Open
sebauer opened this issue Sep 1, 2014 · 3 comments
Open

Documentation for client setup required #1

sebauer opened this issue Sep 1, 2014 · 3 comments

Comments

@sebauer
Copy link
Owner

sebauer commented Sep 1, 2014

Please add some information about how to setup the client environment to run the tests.

Current output of npm test:

~/Projekte/schluckspecht/client:master$ npm test

> [email protected] test /Users/sbauer/Projekte/schluckspecht/client
> npm run test-user


> [email protected] test-user /Users/sbauer/Projekte/schluckspecht/client
> node node_modules/cucumber/bin/cucumber.js

Server returned status code 404 from http://localhost/app.html#/home Error: Server returned status code 404 from http://localhost/app.html#/home
  at /Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/lib/zombie/window.js:447:40
  at /Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/lib/zombie/eventloop.js:238:18
  at Object._onImmediate (/Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/lib/zombie/eventloop.js:143:11)
  at processImmediate [as _immediateCallback] (timers.js:336:15)

.F--.-

(::) failed steps (::)

Error: Step failure
  at Function.fail (/Users/sbauer/Projekte/schluckspecht/client/node_modules/cucumber/lib/cucumber/support_code/step_definition.js:72:49)
  at /Users/sbauer/Projekte/schluckspecht/client/features/step_definitions/add-bottle.steps.js:29:16
  at _rejected (/Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/node_modules/q/q.js:807:24)
  at /Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/node_modules/q/q.js:833:30
  at Promise.when (/Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/node_modules/q/q.js:1077:31)
  at Promise.promise.promiseDispatch (/Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/node_modules/q/q.js:751:41)
  at /Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/node_modules/q/q.js:573:44
  at flush (/Users/sbauer/Projekte/schluckspecht/client/node_modules/zombie/node_modules/q/q.js:108:17)
  at process._tickCallback (node.js:419:13)


Failing scenarios:
/Users/sbauer/Projekte/schluckspecht/client/features/add-bottle.feature:6 # Scenario: Add one bottle of type x

1 scenario (1 failed)
3 steps (1 failed, 2 skipped)

npm ERR! [email protected] test-user: `node node_modules/cucumber/bin/cucumber.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test-user script.
npm ERR! This is most likely a problem with the schluckspecht-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/cucumber/bin/cucumber.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls schluckspecht-client
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "run" "test-user"
npm ERR! cwd /Users/sbauer/Projekte/schluckspecht/client
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/sbauer/Projekte/schluckspecht/client/npm-debug.log
npm ERR! not ok code 0
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0
@markusf
Copy link
Collaborator

markusf commented Sep 1, 2014

"npm test" now runs client side unit tests.

Note: This will not start the execution of (cucumber) acceptance tests.
I do not think that this it is necessary to run these on dev machines, since it would require a whole - best case, automatic - system setup (http server, reverse proxy, mongodb).

We should run these only on ci-server. What do u think about this?

@sebauer
Copy link
Owner Author

sebauer commented Sep 1, 2014

I'm not sure.. Tbh I think you should also be able to run an integrative environment on your local dev machine. Therefore I would also think, that cucumber should be run locally. It depends on what you're trying to achieve: for now it looks like cucumber is being used as an integration test tool. But wasn't it basically "Behaviour Driven Development" we wanted to accomplish? Because even though your unit tests are green, it doesn't mean, that the behaviour of the software matches the expected behaviour described in the requirements.

On your local machine you can easily have those tests running against the backend and a mocked database for example - it helps you validating if you match your requirements (which unit test do not). On the CI system this should be used for integrated testing including the whole stack - of course. There the behaviour should still be the same.

Or is it just because the test setup/software stack seems to be so complex and it took so much time for setting it up? (not meant to be bad, just want to understand the real reasons ;) )

@sebauer
Copy link
Owner Author

sebauer commented Sep 1, 2014

btw: added a bit of documentation regarding the setup of the client: https://github.com/sebauer/schluckspecht/wiki/Setup

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

2 participants