Page tree
Skip to end of metadata
Go to start of metadata

Overview

Documentation on unit and integration testing.

Details

Model objects have rigorous unit tests that verify things like getters/setters, equals/hashcode functions, serialization, copy constructors, null fields, and index fields.  Whenever model objects change, these methods need to be updated to reflect the change. In a sense, they serve as a specification for the underlying model objects (or lists).

 

There are a variety of integration tests that are designed to run against the "default development build" of the system (see Building and Deploying in Eclipse).  The "Jpa" tests do not require the server to be running, but the "Rest" tests do.  They also both require a "refset.config" property to be set pointing to a valid deployment config.properties file.

While not comprehensive at this point, they test the REST APIs and a variety of potential flows through the application.

They are run out of the integration-tests module which has a couple of maven profiles for targeting which tests to run. Following are some sample calls to the integration tests:

# BOTH Require the GenerateSampleData to have been used to build the default dev environment
 
# for JPA
mvn install -Pjpa -Drun.config=c:/refset/config/config.properties -DskipTests=false
 
# for REST (requires server running)
mvn install -Prest -Drun.config=c:/refset/config/config.properties -DskipTests=false


 

 

  • No labels