0

I am building an AngularJS web application with Java as backend.When I look for an end to end testing framework, Protractor found to be a better option.But it is highly dependent on node.js(since it's built on top ofnode). Is that correct?

what I need is , I want to run Protractor with maven and tomcat. Can we run it without the dependency of node.js?

Kara
  • 6,115
  • 16
  • 50
  • 57
Tom Sebastian
  • 3,373
  • 5
  • 29
  • 54

3 Answers3

0

No, Protractor is dependent on Node.js So you have to use it.

0

There are two separate questions:

  1. Can you run protractor without node? The answer is no. Protractor is a node project and requires node dependencies.

  2. Can you use Protractor in a maven project? The answer is yes. I have not tried it but I've seen community members comment on this. A quick search to maven and protractor, I came across this stackoverflow for maven + protractor with the corresponding maven plugin project on github.

Community
  • 1
  • 1
cnishina
  • 5,016
  • 1
  • 23
  • 40
0

I hit this question since I'm wrestling with the same problem. This is what I've figured out.

Protractor (and Karma for the jsunit testing of Angular) requires node, but this isn't a large obstacle since you can pull in and install node using Maven, and use it to pull in yarn to get angular setup and built at deploy and test time. It is also possible to set up a proxy server from the node server to the Spring Boot App so that the REST endpoints will work.

What I want (and what I'm guessing the original poster wants) is to figure out a way to start up protractor without starting the node server. I don't want that server started because as part of the end to end testing I want to verify the spring app is serving the necessary static files correctly, not just the REST endpoints.

If I find an answer I'll update this.

Michael Morris
  • 531
  • 5
  • 7