Package uk.ac.sheffield.vtts.ground

This package contains Broker@Cloud components that implement grounding, or the translation of platform-neutral test suites to technology-specific test suites that may be executed.

See: Description

Package uk.ac.sheffield.vtts.ground Description

This package contains Broker@Cloud components that implement grounding, or the translation of platform-neutral test suites to technology-specific test suites that may be executed. 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.ground

This package contains Broker@Cloud components that are involved in test grounding, or the process of generating concrete tests, targeting a specific service implementation technology, from a high-level test suite. Each concrete grounding is based on a visitor-pattern for code generation; and the three examples that we give (for simple POJOs, JAX-WS clients and JAX-RS clients) are to encourage you to develop your own kinds of grounding for your own service implementation technology. Follow the coding style shown here for easily-maintained results.

Grounding Generators

The interface Grounding is the ancestor of all code generators. The type AbstractGrounding implements much of the code-generating algorithm, but leaves details to specific subclasses JavaGrounding, JaxWsGrounding and JaxRsGrounding, which generate different kinds of JUnit test-driver class targeting specific service implementation technologies. All Grounding generators make use of the type JavaDependency, which discovers package dependencies.

Object Factories

Both during model simulation and during testing, it is necessary to create objects of both simple and complex types, which are passed as parameters. Whereas simple values have printable representations that may be re-read by Java, this is not the case for complex types (such as List, Set, Map, Pair). The interface Factory is the ancestor of all factory objects for synthesising Java instances of complex types. The type AbstractFactory implements much of the object-synthesising algorithm, but leaves details to specific subclasses ModelFactory and JavaFactory.

Complex Arguments

Most arguments passed to and from services are of simple types, such as String or int, which can be easily converted to and from Strings. The expression modelling language also allows values of generic List, Set, Map and Pair types to be used as inputs and outputs. The default Java implementations chosen for these are, respectively, ArrayList, HashSet, HashMap and SimpleEntry. We also provide a free-standing public version of SimpleEntry to overcome objections by some service clients to nested classes.