See: Description
Class | Description |
---|---|
GenerateTests |
Program that reads an XML service specification and generates a high-level
test suite from the specification.
|
GroundTests |
Program that reads a high-level test suite and generates an executable
JUnit test driver.
|
ValidateMachine |
Program that reads an XML service specification and checks the finite
state machine for state reachability and transition completeness.
|
VerifyProtocol |
Program that reads an XML service specification and checks the protocol of
the service for input and memory completeness and deterministic behaviour.
|
This package contains four command-line programs to launch the validation, verification, test generation and test grounding tools individually. 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/.
This package contains four command-line programs to launch the validation, verification, test generation and test grounding tools individually. All have been compiled and executed under JDK 1.7, but have also been designed with JDK 1.6 back-compatibility in mind (for the sake of older web servers). Alternative front-ends for launching the verification and testing tool suite are provided in the sub-packages. Altogether, there are three alternative front-ends:
uk.ac.sheffield.vtts
- four command-line programs to launch
the verification and testing tools individually from the command-lineuk.ac.sheffield.vtts.gui
- a Java Swing GUI for launching
the verification and testing tool suite as a standalone applicationuk.ac.sheffield.vtts.web
- four CGI programs for launching
the verification and testing tools individually, as web servicesSee the package documentation for the sub-packages. General information about the different tools in the verification and testing tool suite is available at: http://staffwww.dcs.sheffield.ac.uk/people/A.Simons/broker/.
These tools depend directly on two libraries; but any test code you later generate will depend on different libraries, depending on the kind of technology you use for your cloud software services. For convenience, we have bundled the essential library files to accompany this distribution:
jast-1.1.jar
- XML marshalling and unmarshalling softwarejsyntaxpane-1.0.0.jar
- XML and Java syntax pretty-printer
All 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/.
If working with JDK, you should install JAST 1.1 (or any later
version) in the same place that you unpack this software. If
working in an IDE (such as Eclipse, NetBeans, etc.) you should
configure your build path to include jast-1.1.jar
.
The GUI front-end also uses the JSyntaxPane package for
pretty-printing XML and Java syntax, © Ayman Al-Sairafi,
ACI Worldwide, Bahrain (hosted at Google Code), and extended by
Hanns Holger Rutz, SCISS, Germany (hosted at GitHub).
If working with JDK, you should install JSyntaxPane 1.0.0 (or any
later version) in the same place that you unpack this software.
If working in an IDE (such as Eclipse, NetBeans, etc.) you should
configure your build path to include jsyntaxpane-1.0.0.jar
.
While these are the only dependencies required by the verification and testing tool suite, you will generate Java code designed for JUnit 4. We recommend that you install the JUnit 4 library available with your Java IDE. If you generate code just for testing "plain old Java objects" (POJOs), then this is all you will need to execute the generated tests. If you generate code for JAX-WS SOAP web services, then this will depend on whatever Java service client classes that you generate from the service's WSDL, using the JAX-WS tools. If you generate code for JAX-RS REST web services, then this code will depend on the Apache Jersey 1.19 reference implementation of a REST web-server, and also use Google Gson 2.3.1 to unmarshal JSON data. All these packages are widely available at no cost.
A service specification is developed in stages. First the designer should validate the specification, to be sure that they have chosen the intended states and transitions for the service, Later, they should verify that the logical conditions specified for each operation are consistent and complete. When the specification is known to be correct, and has passed the validation and verification stages, the designer may generate high-level abstract tests from the specification, in a technology-neutral format, ensuring that all the states and transitions of the specification are covered. Finally, the designer may generate concrete JUnit test-driver code from the high-level specification, in one of several formats that assume testing either a SOAP or REST web-service, or even a plain old Java object.
A service specification is developed in the XML service specification language developed for Broker@Cloud, for which the XML schema (XSD) can be found here: http://staffwww.dcs.shef.ac.uk/people/A.Simons/broker/ServiceSchema.xsd. The website above also contains examples of specifications conforming to this schema, as illustrations. The four tools are intended to help the designer develop a relevant and correct specification, and should be applied in the given order: validation, verification, test generation, test grounding. Each subsequent tool assumes that the specification has been passed by the previous tools. If not, then arbitrary results may ensue.
In the following, it is assumed that you are invoking each tool as a stand-alone program in the Java Runtime Environment. You may also run them in your IDE, by selecting your Run Configurations and supplying the relevant command-line arguments. If you do not, then the programs terminate with a brief statement of correct usage.
java uk.ac.sheffield.vtts.ValidateMachine <specFile.xml>
java uk.ac.sheffield.vtts.VerifyProtocol <specFile.xml>
java uk.ac.sheffield.vtts.GenerateTests <specFile.xml> [<testDepth:int>
<multiTest:bool>]
java uk.ac.sheffield.vtts.GroundTests <testFile.xml> [<grounding:enum>
<metaCheck:bool> <endpoint:uri>? <packageName>*]