/
Functional Mojo Testing

Functional Mojo Testing

Overview

Information on integration/functional testing for the admin tool mojos.

Coverage

These admin will be covered by mojo integration testing.

 

  • LuceneReindexMojo
  • ProjectLoaderMojo
  • ProjectRemoverMojo
  • StartEditingCycleMojo.java
  • TerminologyClamlLoaderMojo
  • TerminologyRemoverMojo
  • TerminologyRf2DeltaLoader
  • TerminologyRf2FullLoaderMojo
  • TerminologyRf2SnapshotLoaderMojo
  • UpdateDbMojo

Complete coverage would involve calling a series of mojos to enact a standard "scenario" and then verifying the outcome of that scenario. Mojos should be tested in both "server" and "noserver" modes.

Coverage Definition

The attached spreadsheet (TBD) formally defines mojo coverage from an integration testing perspective. 

Assumptions

  • A dev database exists that contains no data (though schema tables may be present)
  • At the conclusion of the test, the dev database again contains no data (so the test can be easily re-run).
  • 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 details a series of "scenarios" that provide coverage over the sample data sets and the standard mojos.  NOTE: degenerate and edge case usage of mojos is not currently under consideration for testing.

The following sample coverage spreadsheet is the current coverage definition.

  • TBD

Organization

Integration tests are organized under the integration-testing-mojo project.  Looking through the Java packages, you should find a "org.ihtsdo.otf.ts.test.mojo" package that defines a number of test classes that represent the coverage spreadsheet.  These are separate from the other integration-test packages as typically a different "run.config.ts" file is used (pointing to an empty database).

<describe spreadsheet>

Integration Test Cases

Following are the test case sequences for mojo validation.