Hello guys, I will post about how to install protractor and cucumber to test an AngularJS and how to import this project on your Eclipse.
You need JDK and Node.js installed:
– Install node in your mac
brew install node
node --version
– Check the version of you java
java -version
– Git clone this project as an example:
https://github.com/AndrewKeig/protractor-cucumber.git
– Install protractor and cucumber through npm, update and start the webdriver server
npm install -g protractor
npm install -g cucumber
protractor --version
webdriver-manager update
webdriver-manager start
– You will see a message like this on your console:
11:13:08.586 INFO - Selenium Server is up and running
– Run cucumber.js on the protractor-cucumber’s project folder
– If you have the error below, move the features folder to outside the examples folder and open the /features/step_definitions/steps.js and remove one of the “../”:
return binding.lstat(pathModule._makeLong(path)); ^ Error: ENOENT: no such file or directory, lstat '/Users/Documents/workspace/protractor-cucumber/features' at Error (native) at Object.fs.lstatSync (fs.js:887:18) at Object.realpathSync (fs.js:1518:21) at Object.expandPathWithExtensions (/usr/local/lib/node_modules/cucumber/lib/cucumber/cli/path_expander.js:14:23) at /usr/local/lib/node_modules/cucumber/lib/cucumber/cli/path_expander.js:8:27 at Array.map (native) at Object.expandPathsWithExtensions (/usr/local/lib/node_modules/cucumber/lib/cucumber/cli/path_expander.js:7:31) at Object.expandPaths (/usr/local/lib/node_modules/cucumber/lib/cucumber/cli/feature_path_expander.js:9:38) at Function.Configuration (/usr/local/lib/node_modules/cucumber/lib/cucumber/cli/configuration.js:21:63) at getConfiguration (/usr/local/lib/node_modules/cucumber/lib/cucumber/cli.js:46:38) Rafaelas-MBP-2:protractor-cucumber rafaelasouza$ cucumber.js module.js:341
If you want to run on Eclipse:
– Install nodeclipse, a Node.js plugin for Eclipse
npm install -g nodeclipse nodeclipse -g
– Import this project into your workspace and install Enide on your eclipse.
Thank you guys ! See you tomorrow !