Skip to content

Testing

Andrew Bird edited this page Oct 18, 2013 · 9 revisions

##Setup

In "resources" there is a dataset.zip file which needs to be unzipped into the current directory before testing. This contains the datasets used during ncSOS testing.

Also in the "resources" folder, there is a file that is used to configure the tests and which directories are used during testing. "tests_config.xml" contains a set of directory locations used by the tests for input/output xml locations. They are outlined below:

  • ProjectDirectory should be .\ referencing the ncsos project directory.

  • Tomcat location should reference the users tomcat location directory e.g <tomcatLocation>C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.11\</tomcatLocation>

  • <dataSourceDirectory>.\resources\datasets</dataSourceDirectory> and <outputDirectory>.\target\test_out\</outputDirectory> should remain as they are

<testConfiguration>
  <outputDirectory>test-out folder</outputDirectory>
  <tomcatLocation>tomcat folder</tomcatLocation>
  <projectDirectory>project folder</projectDirectory>
</testConfiguration>

The elements are pretty self-explanatory.

  • outputDirectory is where the test suite will print out the test responses in xml format.
  • tomcatLocation is where tomcat is installed locally.
  • projectDirectory is where the pom.xml for the ncsos project is location.

##SOS Templates

ncSOS uses a number of templates to generate an XML response. Templates can be found in the ncSOS\resources\templates project directory. Templates typically contain the main xml outline (major nodes) for each request type, the system will then go through and populate nodes based on the request response. The template approach allows some flexibility when handling different output formats.

Clone this wiki locally