Giter Club home page Giter Club logo

webappwalker's Introduction

WebAppWalker

WebAppWalker is a framework for automated UI-level testing of web applications. The framework gathers the set of events available on a web site, such as clicks on DOM elements, scrolling, and filling forms, and automatically triggers sequences of these events. Which sequences to trigger is decided by a strategy. You can implement a new test generation approach by implementing a new strategy.

We have instantiated the WebAppWalker framework in two projects:

EventBreak

EventBreak is an approach to analyze the responsiveness of web applications through performance-guided test generation. See this paper for details:

EventBreak: Analyzing the Responsiveness of User Interfaces through Performance-Guided Test Generation
by Michael Pradel, Parker Schuh, George Necula, and Koushik Sen
at Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2014

The easiest way to experiment with EventBreak is to use this Virtualbox VM image, where EventBreak, all its requirements, and several benchmark applications are pre-installed. The image contains a file README_EventBreak_Artifact.txt with instructions on how to use it.

Macro-based Test Generation

This approach analyzes execution traces gathered from human users of a web site to infer common usage patterns called macro events. Following the Monkey See, Monkey Do principle, the automated test generator then imitates human users by replaying the macro events. See this paper for details:

Monkey See, Monkey Do: Effective Generation of GUI Tests with Inferred Macro Events
by Markus Ermuth and Michael Pradel at International Symposium on Software Testing and Analysis (ISSTA), 2016

Installation

  • Clone this repository:
git clone https://github.com/michaelpradel/WebAppWalker.git
  • Install jpm (required to launch WebAppWalker):
npm install jpm --global
  • Install Firefox >= 38.0

Usage

Start Firefox with the WebAppWalker extension:

jpm run -b /path/to/your/firefox --binary-args="-no-remote"

By default, jpm creates a new Firefox profile each time you run WebAppWalker. To store visited URLs, settings, etc., create and use a profile specifically for WebAppWalker.

  • Create a new profile via the profile manager:
/path/to/your/firefox -no-remote --ProfileManager
  • Start WebAppWalker with the newly created profile:
jpm run -b /path/to/your/firefox --binary-args="-no-remote" -p nameOfYourProfile

Go to some URL and start WebAppWalker by clicking the "Play" button. You should see that WebAppWalker triggers events, such as clicks. To stop it, click the "Pause" button.

Search strategies

By default, WebAppWalker uses a random search strategy to decide which event to trigger next. We have developed several other strategies, e.g., the EventBreak strategy. To modify the strategy, open the lib/main.js file and modify the line that starts with var search =.

To implement your own strategy, the easiest will be to copy lib/search/random_search.js and start from there.

webappwalker's People

Contributors

michaelpradel avatar

Watchers

Marina Billes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.