-
Notifications
You must be signed in to change notification settings - Fork 7
Project Internals
-
Script are written in JavaScript and executed using Java Rhino.
-
Chrome is launched and controlled from the Java process.
-
Communication to Chrome is over a WebSocket, a Chrome extension creates the WebSocket and connects to the Java process. From there any JavaScript calls made in the script to the Browser object (returned from pizza.open()) are over the WebSocket as RPC calls. Our Chrome extension handles these requests.
-
The Chrome extension is written in JavaScript. It talks to the Chrome Extension API & also the DevTools API to implement its automation features.
-
Page load and http timings are recorded using the DevTools API.
-
We have access to both the Chrome Extensions API and the DevTools API.
(Once) Useful scripts.
Files served up at pizzascript.org.
PizzaScript API specification. There's a JavaScript file here we use to generate the docs. It also contains the Java API for scripting if you don't want to use JavaScript.
The editor, written in Java Swing. It has a built-in Rhino debugger, JavaScript Editor & page results viewer.
Contains both the Chrome extension and the Rhino JavaScript execution environment. The resulting JAR can be used to execute scripts, either in Java or in JavaScript.
Test webserver for emulating different webserver responses. Useful to test the script API against to make sure it issues appropriate failures. Also contains a test suite against the PizzaScript API.
Some example scripts. These are packaged up in the release zip.
Common utilities.
HAR viewer and other JavaScript / CSS / HTML for visualisation of results.
Java_WebSocket version with some fixes. The released version is not good, it has some deadlocks. We might want to modify this in future to simplify locking in our app.