Instant Testing with CasperJS
()
About this ebook
This book will be extremely useful for web developers who are new to testing or who want to move from another testing solution to CasperJS. It is assumed that you are familiar with web development and have a good knowledge of JavaScript.
Related to Instant Testing with CasperJS
Related ebooks
JavaScript Unlocked Rating: 5 out of 5 stars5/5React Components Rating: 0 out of 5 stars0 ratingsInstant RESS Implementation: How To Rating: 0 out of 5 stars0 ratingsRSpec Essentials Rating: 3 out of 5 stars3/5Mastering Linux Shell Scripting Rating: 4 out of 5 stars4/5Jasmine JavaScript Testing - Second Edition Rating: 0 out of 5 stars0 ratingsYour First Week With Node.js Rating: 0 out of 5 stars0 ratingsJavaScript Concurrency Rating: 0 out of 5 stars0 ratingsInstant StyleCop Code Analysis How-to Rating: 0 out of 5 stars0 ratingsAdvanced Express Web Application Development Rating: 0 out of 5 stars0 ratingsWebSocket Essentials – Building Apps with HTML5 WebSockets Rating: 0 out of 5 stars0 ratingsJavaScript Projects for Kids Rating: 0 out of 5 stars0 ratingsFrank Kane's Taming Big Data with Apache Spark and Python Rating: 0 out of 5 stars0 ratingsJavaScript Security Rating: 4 out of 5 stars4/5Learning jQuery 3 - Fifth Edition Rating: 0 out of 5 stars0 ratingsPro PowerShell for Amazon Web Services Rating: 0 out of 5 stars0 ratingsMastering Reactive JavaScript Rating: 0 out of 5 stars0 ratingsBuilding Slack Bots Rating: 0 out of 5 stars0 ratingsDistributed Computing in Java 9 Rating: 0 out of 5 stars0 ratingsWeb Development with Jade Rating: 0 out of 5 stars0 ratingsExpress Web Application Development Rating: 3 out of 5 stars3/5Mastering JavaScript Design Patterns - Second Edition Rating: 5 out of 5 stars5/5Introduction to JVM Languages Rating: 0 out of 5 stars0 ratingsApache Spark 2.x Cookbook Rating: 0 out of 5 stars0 ratingsMQTT Essentials - A Lightweight IoT Protocol Rating: 0 out of 5 stars0 ratingsInstant Jsoup How-to Rating: 0 out of 5 stars0 ratingsCoffeeScript Application Development Rating: 0 out of 5 stars0 ratingsNode.js By Example Rating: 2 out of 5 stars2/5Learning Karaf Cellar Rating: 0 out of 5 stars0 ratingsHacking with Spring Boot 2.3: Reactive Edition Rating: 3 out of 5 stars3/5
Internet & Web For You
The Digital Marketing Handbook: A Step-By-Step Guide to Creating Websites That Sell Rating: 5 out of 5 stars5/5Beginner's Guide To Starting An Etsy Print-On-Demand Shop Rating: 0 out of 5 stars0 ratingsThe Logo Brainstorm Book: A Comprehensive Guide for Exploring Design Directions Rating: 4 out of 5 stars4/5More Porn - Faster!: 50 Tips & Tools for Faster and More Efficient Porn Browsing Rating: 3 out of 5 stars3/5Coding For Dummies Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Wireless Hacking 101 Rating: 4 out of 5 stars4/5Cybersecurity For Dummies Rating: 4 out of 5 stars4/5Six Figure Blogging In 3 Months Rating: 4 out of 5 stars4/5Hacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 5 out of 5 stars5/5Wordpress for Beginners: The Easy Step-by-Step Guide to Creating a Website with WordPress Rating: 5 out of 5 stars5/5The Beginner's Affiliate Marketing Blueprint Rating: 4 out of 5 stars4/5SEO For Dummies Rating: 4 out of 5 stars4/5Remote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5The Designer's Web Handbook: What You Need to Know to Create for the Web Rating: 0 out of 5 stars0 ratingsThe Mega Box: The Ultimate Guide to the Best Free Resources on the Internet Rating: 4 out of 5 stars4/5From Nothing Rating: 5 out of 5 stars5/5Mike Meyers' CompTIA Security+ Certification Guide, Third Edition (Exam SY0-601) Rating: 5 out of 5 stars5/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5Podcasting For Dummies Rating: 4 out of 5 stars4/5How to Disappear and Live Off the Grid: A CIA Insider's Guide Rating: 0 out of 5 stars0 ratingsGet Rich or Lie Trying: Ambition and Deceit in the New Influencer Economy Rating: 0 out of 5 stars0 ratingsStop Asking Questions: How to Lead High-Impact Interviews and Learn Anything from Anyone Rating: 5 out of 5 stars5/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5C++ Learn in 24 Hours Rating: 0 out of 5 stars0 ratingsHow To Start A Podcast Rating: 4 out of 5 stars4/5
Reviews for Instant Testing with CasperJS
0 ratings0 reviews
Book preview
Instant Testing with CasperJS - Éric Bréhault
Table of Contents
Instant Testing with CasperJS
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Instant Testing with CasperJS
Installing CasperJS (Simple)
Getting ready
How to do it...
How it works...
There's more...
Installing CasperJS with Homebrew on Mac OS X
Installing PhantomJS on Ubuntu
Using the CasperJS Ruby executable
Getting started with CasperJS (Simple)
Getting ready
How to do it...
Timing is everything
Live recording
How it works...
There's more...
XPath selectors
Assertion methods
The WaitFor methods
The wait() method
Installing Resurrectio from the GitHub sources
Writing advanced tests (Intermediate)
How to do it...
Downloading files
Uploading files
Authentication
Keyboard and mouse events
How it works...
There's more...
Passing parameters to the download() method
setHttpAuth might have surprising timing
Best practices (Intermediate)
Testing the real thing
Surviving design changes
Creating test suites
Running CasperJS on Jenkins
Running CasperJS on Travis-CI
Beyond testing (Advanced)
Web scripting
Screenshot production
Instant Testing with CasperJS
Instant Testing with CasperJS
Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: January 2014
Production Reference: 1230114
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-943-1
www.packtpub.com
Credits
Author
Éric Bréhault
Reviewer
Sven Anders Robbestad
Acquisition Editors
Pramila Balan
Harsha Bharwani
Commissioning Editor
Govindan K
Technical Editors
Veena Pagare
Manal Pednekar
Copy Editors
Insiya Morbiwala
Stuti Srivastava
Project Coordinators
Sherin Padayatty
Sageer Parkar
Proofreaders
Simran Bhogal
Paul Hindle
Production Coordinator
Nilesh Bambardekar
Cover Work
Valentina D'silva
About the Author
Éric Bréhault wrote his very first web pages in 1993, started JavaScript application development in 1998, and is still enjoying it.
As an IT engineer, he has used a lot of different server-side technologies, but since 2006, he has been focusing on Plone—a Python open source CMS—and been an active participant of its community. His main contribution has probably been Plomino, a Plone-based application builder. He has also worked on different, modern web mapping solutions such as Leaflet.
JavaScript has always been an important part of his work, and he started using CasperJS in 2012 as his favorite testing utility. He developed Resurrectio, a CasperJS test recorder Chrome extension.
He works as a technical manager at Makina Corpus—a French open source consulting and development company providing services for web and mobile applications—specifically on environmental issues and in the fields of spatial analysis and data visualization.
I would like to thank all my teachers.
About the Reviewer
Sven Anders Robbestad is a software developer with extensive experience in web technologies. He is also an experienced developer of mobile apps for phones and tablets. Primarily experienced in the field of machine learning and web intelligence, he currently resides in Norway where he works at a