Rohit Goyal
Rohit Goyal

Reputation: 222

What is the use of **phantom js** over **chrome** when testing using karma?

I have tried both phantomJS and chrome while testing in karma but I am not able to get the advantages of phantomJS over chrome.

Whats the use of phantomJS over chrome.

Why to use phantomJS when we can use chrome

Upvotes: 2

Views: 737

Answers (1)

Diana R
Diana R

Reputation: 1174

One reason is that you don't need all the time to have the browser when testing, for example when there is a service to be tested - you don't use protractor at all because there are no html elements you need to test, but nevertheless you need to run those tests with Karma. Here comes the usage of phantomejs. Additionally when running tests, with phantomejs you can do screen capture of the running process - can you do that with chrome? Check in more details the possiblities of phantomejs and you will see more differences in when/where phantome can be used over chrome.

Upvotes: 1

Related Questions