Package uk.ac.sheffield.vtts.web

This package contains four Java programs designed to be launched by CGI scripts, in order to offer the validation, verification, test generation and test grounding tools online, as web-services.

See: Description

Package uk.ac.sheffield.vtts.web Description

This package contains four Java programs designed to be launched by CGI scripts, in order to offer the validation, verification, test generation and test grounding tools online, as web-services. It is part of the Broker@Cloud Verification and Testing Tool Suite, v1.0, © Anthony J H Simons and Raluca Lefticaru, 2015. Main web site: http://staffwww.dcs.shef.ac.uk/people/A.Simons/broker/.

Package uk.ac.sheffield.vtts.web

This package contains four Java programs designed to be launched by CGI scripts, in order to offer the validation, verification, test generation and test grounding tools online, as web-services. All these programs have been designed with JDK 1.6 compliance in mind (for the sake of older web servers) but have also been compiled and executed under JDK 1.7. Examples of these programs in use may be found at the web site: http://staffwww.dcs.shef.ac.uk/people/A.Simons/broker/. All of these programs work in the same way as the command-line versions, with the exception of the test grounding program, which performs the equivalent of test generation and grounding in a single step.

Dependencies

These tools use the Java Abstract Syntax Trees (JAST) package for marshalling and unmarshalling, © Anthony J H Simons, University of Sheffield, available from: http://staffwww.dcs.shef.ac.uk/people/A.Simons/jast/. You should install and unpack JAST 1.1 (available as the jar-file JAST11.jar in the same place that you compile and install this software. This will be in some directory that is accessible from your web server's cgi-bin directory (see below).

You will need a web server configured to allow simple executable CGI scripts. You will need to write four short CGI scripts, in your preferred scripting language, to launch the Java Runtime Environment with one of the programs below as the main class to execute. You will need a web browser to submit web forms and view results as web pages. You will also need to create suitable HTML web pages designed to collect the inputs required by each program and submit them via a web form, in the URL-encoded format. Examples of such web-pages are available here: http://staffwww.dcs.shef.ac.uk/people/A.Simons/broker/. Your web browser must be configured to display raw XML files using a default CSS stylesheet.

Configuration

To run these programs under CGI (Common Gateway Interface), you will need to have a web server configured to allow you to run simple executable scripts under a directory that is usually named cgi-bin. Here, you will place small scripts which invoke the Java Runtime Environment (JRE) with one of the programs below, on your machine. While every installation may be slightly different, in the following we assume that you have a cgi-bin directory, and under this, have created a sub-directory to store compiled Java classes, cgi-bin/classes. We assume that your local JRE is installed at the absolute path: /usr/local/bin/java.

The simplest way to install the software is to compile the source code from this software bundle, and install the compiled classes, along with the unpacked classes from the JAST 1.1 bundle, in their natural package directory structure, under cgi-bin/classes, which must be a readable directory (but need not be executable). The CGI back-end only uses classes in the packages:

and the other source distribution packages are not so relevant (the software does depend on standard Java packages). Then, you will write simple executable scripts to launch each main program, and place these in the parent directory cgi-bin. Illustrations are given below.

In the following, we also assume you have designed a web page to launch each program. Each page will have a web-form which collects the expected parameters for that program. The web form should use the HTTP POST method to submit the form data, since each program expects to receive the web form data on standard input. The output from the program will be returned as XML data, apart from grounding, which returns a Java source code text file. You may need to configure your web browser to display raw XML using a default CSS stylesheet (Apple Safari sometimes does not display raw XML).

Usage

Since Java class files are not directly executable as CGI programs, you will need to write short executable scripts (in C shell, Bourne shell, etc.) that launch your Java runtime environment with the chosen program. The following example scripts are merely illustrative and do not necessarily reflect the actual pathnames on your machine. The examples each describe the web form parameter names used to pass data.