Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WEB APP TESTING USING KNOCKOUT.JS

You're reading from   WEB APP TESTING USING KNOCKOUT.JS Design, implement, and maintain a fully tested JavaScript web application using Knockout.JS

Arrow left icon
Product type Book
Published in Nov 2014
Publisher
ISBN-13 9781783982844
Pages 154 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
ROBERTO MESSORA ROBERTO MESSORA
Author Profile Icon ROBERTO MESSORA
ROBERTO MESSORA
Arrow right icon
View More author details
Toc

User interface testing with PhantomJS


Introducing Karma, we talked about PhantomJS and its usage as a virtual browser during unit testing execution. More precisely, PhantomJS (http://phantomjs.org/) is a headless WebKit scriptable browser, which means that:

  • It's based on the well-known WebKit web engine

  • It downloads a web page from a URL, renders the content into the DOM, executes JavaScript if present, and the executed result will be reflected on the browser's DOM

  • It doesn't render the page into a visualized content

  • The term scriptable means that we can instrument a PhantomJS instance to do actions using a JavaScript API

PhantomJS is not related in any way to NodeJS and its plugin ecosystem: it's a simple cross-platform executable (can be installed on Windows, Mac, and Linux) that runs independently from other runtime engines.

Most common PhantomJS uses are (from PhantomJS website):

  • Headless web testing: Run functional tests with frameworks such as Jasmine

  • Screen capture: Programmatically capture...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime