tdl-client-nodejs
Submodules
Project contains submodules as mentioned in the .gitmodules
file:
- broker
- tdl/client-spec (gets cloned into features)
- wiremock
Use the below command to update the submodules of the project:
git submodule update --init
Getting started
Javascript client to connect to the central kata server.
Manual
Stopping the above services would be the same, using the stop
command instead of the start
command.
npm install
To run the acceptance tests, start the WireMock servers:
python wiremock/wiremock-wrapper.py start 41375
python wiremock/wiremock-wrapper.py start 8222
And the broker, with:
python broker/activemq-wrapper.py start
Automatic (via script)
Start and stop the wiremocks and broker services with the below:
./startExternalDependencies.sh
./stopExternalDependencies.sh
Then run the tests in RunAllAcceptanceTest.java via the CLI:
Run tests
npm test
npm run example
If you want to run the Spec file in your IDE you need to pass -r ./test
to cucumber-js
Running Scenarios using cucumber
Run the below from the project root folder:
./node_modules/.bin/cucumber-js -r ./test
Running Scenarios using cucumber and istanbul
Run the below from the project root folder:
istanbul cover ./node_modules/.bin/cucumber-js -- -S -r ./test
Running specific Scenarios using cucumber
Run the below from the project root folder:
./node_modules/.bin/cucumber-js --name "[Name of the scenario in the .features file within quotes]" -r ./test
Running specific Scenarios using cucumber and istanbul
Run the below from the project root folder:
istanbul cover ./node_modules/.bin/cucumber-js -- --name "[Name of the scenario in the .features file within quotes]" -S -r ./test
or via the IDE
To release
npm login
npm config ls
For new version of Spec
npm version minor
For patches without changing the Spec
npm version patch
npm publish
Then go to https://www.npmjs.com/~
Other notes:
- the major version needs to be changed in package.json
- the deployment has not been configured to run on the CI server