Search code examples
angularprotractore2e-testingangular-e2e

How to correctly run protractor tests? ng e2e equal to protractor... something


Hey I have quick question, I've installed protractor, and I have this basic e2e folder in my Angular project. If I use command "ng e2e", will it build and run my tests inside e2e folder using protractor framework or will it run it without protractor? It's very important for me, I want to run it using protractor. Can I do it with ng command? Thank you If you will answer this :)


Solution

  • If you are using ng e2e, then you are already using protractor by default. It because protractor is a built-in E2E testing framework for Angular.

    If you are already installed protractor in global. (npm install -g protractor) The ng e2e command also execute the protractor within your Angular project. It's not your global's protractor.

    Hope that helps!