Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PhantomJS Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
PhantomJS Cookbook

PhantomJS Cookbook

By : Friesel
4.2 (5)
close
close
PhantomJS Cookbook

PhantomJS Cookbook

4.2 (5)
By: Friesel

Overview of this book

A task-based guide that provides solutions to real-world test automation problems. This book is intended for web development professionals who want to integrate PhantomJS into their development and testing workflows. If you are a web developer looking to run automated unit tests while you work, or perhaps you are a QA engineer looking for a fast test automation utility, then this book is perfect for you. Some prior knowledge of JavaScript would be helpful.
Table of Contents (10 chapters)
close
close
9
Index

Running Jasmine unit tests with Grunt


In this recipe, we will learn about using Grunt to execute our Jasmine unit tests from the command line. Grunt is a popular JavaScript task runner and is useful for automating repetitive operations, such as scaffolding, minification, linting, and testing, on the command line.

Getting ready

To run this recipe, we will need the following items:

  • JavaScript code to test, and the tests for that code

  • Node.js and npm installed and on our PATH

    Note

    The Node.js package manager is npm; it is used to download and install Node.js packages for use in our projects. It is included as part of the core Node.js platform. The typical pattern for using npm looks like this:

    npm <command> [<options>] [<package-name>]
    

    For more information, enter the following on the command line:

    npm help
    
  • The Grunt task runner (grunt-cli)

    Note

    Grunt is a popular JavaScript task runner for the command line. We can find out more about it at http://gruntjs.com/; we can install the...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
PhantomJS Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon