user2880391
user2880391

Reputation: 2791

Protractor - node - grunt connection

I'm pretty new to all the concepts mentioned in the title and I'm trying to understand what is the connection between them and what each of them is responsible for. I know of course that protractor is the e2e testing for angular, but I understood that I can run it by

$ protractor congif.js

and I can also run it by calling

node protractor....something

as I said - I am confused and it would be great if someone could explain the different approaches and some background(or direct me to the specific tutorials). thanks!

Upvotes: 1

Views: 107

Answers (1)

Brine
Brine

Reputation: 3731

As I'm sure you know, Javascript is client-side; it's built into, and runs in a web browser. Eg. you don't run a js file from a command line.

Node.js allows you to run javascript from the server without a browser (run js files from the command line). Additionally, it's a platform for building javascript programs.

Protractor is a Node.js program. Because of this, you can run it via node protractor config.js or protractor config.js.

Grunt is also a node.js program. It's a task runner... so it does a ton of things. It's often used for automating builds/tests/deploying/etc... for CI (Jenkins/Travis).

Upvotes: 2

Related Questions