Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to conduct blackbox testing on an AJAX application?

What's the best, crossplatform way to perform blackbox tests on AJAX web applications?

Ideally, the solution should have the following attributes:

  • Able to integrate into a continuous integration build loop
  • Cross platform so I you can run it on Windows laptops and Linux continuous integration servers
  • Easy way to script the interactions
  • Free-as-in-freedom so you can adapt it into your tool chain if necessary

I've looked into HttpUnit but I'm not conviced it can handle AJAX-heavy websites.

like image 313
morais Avatar asked Sep 16 '08 09:09

morais


2 Answers

Selenium might be what you're looking for: http://selenium.openqa.org/

It allows you to script actions and evaluate the results. It's open-source (Apache 2.0), cross platform, and has nice tools.

like image 62
Sietse Avatar answered Nov 11 '22 07:11

Sietse


I have used Selenium for exactly this task, but found it to be brittle.

Check out this talk by two Googlers: Does my button look big in this? Building testable AJAX applications

They isolate the testable javascript (non DOM-interaction) and test that using the Rhino javascript engine.

like image 42
awi Avatar answered Nov 11 '22 07:11

awi