Welcome to the Crawljax Testing page

NOTE: This site is currently under construction and will be updated regularly.

What is Crawljax?

Crawljax is a Java tool for automatically crawling and testing AJAX based applications.

Crawljax can crawl any AJAX based web application by clicking links and filling in form data. It creates a state-flow graph of the states of the web application. This state-flow graph which is a very powerful base for many types of automated tests.

This site explains how to configure Crawljax and also acts as a test site for Crawljax.

Applications for Crawljax

Setup

Setting up Crawljax only takes a couple of minutes:

CrawljaxConfiguration config = new CrawljaxConfiguration();
CrawlSpecification crawler = new CrawlSpecification("http://www.google.com");

// click these elements
crawler.click("a");
crawler.click("input").withAttribute("type", "submit");

// except these
crawler.dontClick("a").underXPath("//DIV[@id='guser']");
crawler.dontClick("a").withText("Language Tools");

InputSpecification input = new InputSpecification();
input.field("q").setValue("Crawljax");
crawler.setInputSpecification(input);

// limit the crawling scope
crawler.setMaximumStates(5);
crawler.setDepth(2);

config.setCrawlSpecification(crawler);
CrawljaxController crawljax = new CrawljaxController(config);
try {
  crawljax.start();
} catch (Exception e) {
  e.printStackTrace();
  System.exit(1);
}

Requirements