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
Jasmine JavaScript Testing - Second Edition Rating: 0 out of 5 stars0 ratingsClean Code in JavaScript: Develop reliable, maintainable, and robust JavaScript Rating: 4 out of 5 stars4/5Node.js for Beginners: A comprehensive guide to building efficient, full-featured web applications with Node.js Rating: 0 out of 5 stars0 ratingsBurp Suite Essentials Rating: 4 out of 5 stars4/5Modern JavaScript Bundling with Rollup: Definitive Reference for Developers and Engineers Rating: 0 out of 5 stars0 ratingsGamification with Unity 5.x Rating: 0 out of 5 stars0 ratingsFull-Stack Web Development with TypeScript 5: Craft modern full-stack projects with Bun, PostgreSQL, Svelte, TypeScript, and OpenAI Rating: 0 out of 5 stars0 ratingsPhoneGap for Enterprise Rating: 0 out of 5 stars0 ratingsGitHub for Next-Generation Coders: Build your ideas, share your code, and join a community of creators Rating: 0 out of 5 stars0 ratingsCoding with JavaScript For Dummies Rating: 0 out of 5 stars0 ratingsLearn Python Programming: A comprehensive, up-to-date, and definitive guide to learning Python Rating: 0 out of 5 stars0 ratingsJavaScript Coding for Teens: A Beginner's Guide to Developing Websites and Games Rating: 0 out of 5 stars0 ratingsNode.js Cookbook: Practical recipes for building server-side web applications with Node.js 22 Rating: 0 out of 5 stars0 ratingsRaspberry Pi Super Cluster Rating: 0 out of 5 stars0 ratingsReact and React Native: Build cross-platform JavaScript and TypeScript apps for the web, desktop, and mobile Rating: 0 out of 5 stars0 ratingsNW.js Essentials Rating: 0 out of 5 stars0 ratingsMastering pandas for Finance Rating: 0 out of 5 stars0 ratingsFlask Blueprints: Dive into the world of the Flask microframework to develop an array of web applications Rating: 0 out of 5 stars0 ratingsMastering JavaScript Promises Rating: 1 out of 5 stars1/5HTML language complete Rating: 0 out of 5 stars0 ratingsDancing with Qubits: How quantum computing works and how it can change the world Rating: 5 out of 5 stars5/5HTML5, JavaScript, and jQuery 24-Hour Trainer Rating: 2 out of 5 stars2/5Ultimate Bitbucket for Automating Workflows Rating: 0 out of 5 stars0 ratings
Internet & Web For You
The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 4 out of 5 stars4/5Build a WordPress Website From Scratch 2024: WordPress 2024 Rating: 0 out of 5 stars0 ratingsAdvanced Web Development with React: SSR and PWA with Next.js using React with advanced concepts Rating: 0 out of 5 stars0 ratingsGet Into UX: A foolproof guide to getting your first user experience job Rating: 4 out of 5 stars4/5Notion for Beginners: Notion for Work, Play, and Productivity Rating: 4 out of 5 stars4/5The Logo Brainstorm Book: A Comprehensive Guide for Exploring Design Directions Rating: 4 out of 5 stars4/5Responsive Web Design with HTML5 and CSS3 Essentials Rating: 5 out of 5 stars5/5Canva Tips and Tricks Beyond The Limits Rating: 3 out of 5 stars3/5JavaScript All-in-One For Dummies Rating: 5 out of 5 stars5/5PHP and MySQL For Dummies Rating: 4 out of 5 stars4/5Python: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5The Gothic Novel Collection Rating: 5 out of 5 stars5/5Learn PHP in 24 Hours Rating: 0 out of 5 stars0 ratingsiCloud for Beginners: A Ridiculously Simple Guide to Online Storage Rating: 0 out of 5 stars0 ratingsMastering Postman: A Comprehensive Guide to Building End-to-End APIs with Testing, Integration and Automation Rating: 0 out of 5 stars0 ratingsPublishing E-Books For Dummies Rating: 4 out of 5 stars4/5CISM Certified Information Security Manager Study Guide Rating: 4 out of 5 stars4/5A Pocket Guide to CSS Animations Rating: 5 out of 5 stars5/5UX/UI Design Playbook Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5JavaScript: Beginner's Guide to Programming Code with JavaScript Rating: 5 out of 5 stars5/5Coding For Dummies Rating: 5 out of 5 stars5/5REMOTE ACCESS VPN- SSL VPN: A deep dive into SSL VPN from basic Rating: 5 out of 5 stars5/5HTML, CSS, & JavaScript All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsSpring MVC Beginner’s Guide Rating: 2 out of 5 stars2/5JavaScript: Tips and Tricks to Programming Code with Javascript Rating: 0 out of 5 stars0 ratingsResponsive Web Design with HTML5 and CSS3 - Second Edition 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