Tag Archives: PhantomJS

Integrating Test.Check and Javascript


via Integrating Test.Check and Javascript – Ashton Kemerling.

I was recently on The Cognicast with Craig Andera where we discussed using Generative Testing on a large non-Clojure(script) codebase, in particular Ruby on Rails and Backbonejs. If you haven’t listened to the show yet I highly recommend it first.

As I promised on the show, I’d like to share how we used Test.Check to test our Backbone.js code base. Our overall strategy for testing Javascript is going to be:

  1. Compile JS into one file (just like prod).
  2. Compile tests into a single file.
  3. Combine them in a PhantomJS process.
  4. Let the tests do their thing.

While we have been super pleased with the results of Generative Testing, there have been some hurdles for getting it to work for us. In this post I’m going to go over how to setup Test.Check to work with your Javascript app, and how to dodge all the pitfalls I found.

Here are the challenges that lie between us and Generative Testing bliss.

  1. Picking the right library
  2. Setting up Leiningen & Cljsbuild
  3. Dodge PhantomJS issues
  4. Avoid mangling your app, and defeating dueling dependencies

Simple bridge to phantomjs for NodeJS


via baudehlo/node-phantom-simple · GitHub.

A bridge between PhantomJS / SlimerJS and Node.js.

This module is API-compatible with node-phantom but doesn’t rely on WebSockets / socket.io. In essence the communication between Node and Phantom / Slimer has been simplified significantly. It has the following advantages over node-phantom:

  • Fewer dependencies/layers.
  • Doesn’t use the unreliable and huge socket.io.
  • Works under cluster (node-phantom does not, due to how it works) server.listen(0) works in cluster.
  • Supports SlimerJS.

Choosing Automated Testing Frameworks – PhantomJS / CasperJS vs Selenium


via Choosing Automated Testing Frameworks – PhantomJS / CasperJS vs Selenium.

What is the best way to test in headless browsers? JavaScript testing frameworks such as PhantomJS, Selenium and many others are fighting a colossal war. Who is the winner if the battle is already finished? And if not, who is the underdog?

“When developing our test strategy, we must minimize the impact caused by changes in the applications we are testing, and changes in the tools we use to test them.”
–Carl J. Nagle

Now what are headless browsers? Executed using command line interfaces or network communications, headless browsers provide automated control of a web page in an environment similar to popular web browsers. Now let’s cut to the chase:

How to capture Website screenshot using PHP & PhantomJS


Via: phpgang

We have wrote an article on screen capture using a library which is paid with free version it makes screenshots with for 3 days only. So today I am going to write this tutorial to move a free library PhantomJS using PHP and PhantomJS you can easily capture website screenshots for free so let’s start with installation.

v3.0 API Developer Guide


via v3.0 API Developer Guide.

Preamble v3 is a powerful BDD based JavaScript testing framework that runs in any modern HTML5 compliant browser as well as headless via PhantomJS. Preamble has no additional dependencies on any other libraries and has a very powerful assertion engine that your test suites interface with through a very simple to use but semantically rich and intuitive API.

Video Part 1: Learning to Scrape with Python and CasperJS


In this video we install casperjs. You need to have PhantomJS installed as well. We will add these to our system path.

CSS Testing with PhantomCSS, PhantomJS, CasperJS and Grunt


via CSS Testing with PhantomCSS, PhantomJS, CasperJS and Grunt | Phase2.

A new and exciting area of Front-end Development is regression testing. I know, I know… Testing is exciting? Well in a field that has had no formal testing practices, and is constantly plagued by unexpected regressions, the opportunity to write effective tests is incredibly welcome!