Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Documents the approach to functional/integration testing for the application REST services layer.

Coverage

There are six services, each with a JPA implementationThese service are currently covered by REST integration testing.

  • Security Service
  • Metadata Service
  • Content Service
  • History Service

Complete coverage would address each mode of use of each method call of each service, and combinations of calls across them, as well as any ad hoc test cases for identified errors not covered by existing test cases.

Coverage Definition

The attached spreadsheet formally defines REST service layer coverage from an integration testing perspective. 

...

  • A dev database exists that is loaded with exactly the sample "full" data from the config/ project.
  • Any changes made are reverted to initial conditions so all tests can assume identical initial conditions
  • A server built using the latest code is deployed to the URL specified in the base.url property of the config file used to run the integration tests.
  • The server is configured to use "default" authentication in which "guest" and "admin" users can be authenticated with any password (and the auth token matches the usernames)

Coverage is defined in a multi-dimensional matrix that takes into account the services, the methods of the services, and the modes of use of the services (including normal use, degenerate use, and edge casesedge case use, and role check). NOTE: in many cases there are many "normal" modes of use which may extend the number of columns in the spreadsheet.  For example, methods that take optional parameters (e.g. Pfs). Coverage also considers combinations of calls that have related effects to each other and a placeholder for "ad hoc" tests that can be filled in as gaps in coverage are identified.

The following sample coverage spreadsheet begins to outline the methodology for defining coverage though it is not fully fleshed outis the current coverage definition.

...

Integration tests are organized under the integration-testing project.  Looking through the Java packages, you should find a "org.ihtsdo.otf.ts.test.rest" package that defines a number of test classes that represent the coverage spreadsheet.

Each Generally each column of each tab of the coverage spreadsheet is represented by a single testing class, where each row within that column corresponds to a particular method of that testing class.  The coverage spreadsheet defines both the class names used to implement tests as well as the method names (so they can be easily cross referenced).

...