# NeXtMidas Integration Testing

### Introduction

Prior to every official release of NeXtMidas a large suite of integration tests (also called "Release Tests") are performed to verify that the release will run properly on each of the supported system configurations.

This document assumes that the user has a good working knowledge of NeXtMidas, Unix and Windows. The Web Server tests also assume experience in administering an Apache web server.

Test Groups:

- Testing the Baseline
- Web Server Testing
- Testing Operation on a Headless Server
- Testing X-Midas to NeXtMidas Connections via RMIF

The Baseline tests and WebStart tests (part of the "Web Server Testing") are run on each of the system configurations listed at the top of the NeXtMidas Release Notes. The other tests are run on a limited number of systems since they are not applicable to all platforms.

### Testing the Baseline

1. Checkout a clean copy of NeXtMidas from the CVS repository. (Do not use an existing repository even if it is up to date.)
2. Set the `NMROOT` to point to the copy of NeXtMidas that was just checked out and set `JAVAHOME` to point to the appropriate version of Java.
3. Manually verify that `NMROOT` and `JAVAHOME` are set correctly.
4. Build NeXtMidas.
   - Linux / Solaris / Tru64 UNIX

     Run `nmstart` and then build NeXtMidas using `nm make all`. (Use `source $NMROOT/os/unix/nmstart` rather than `nmstart` since some shells may statically define the `nmstart` alias preventing it from pointing to the correct place even though `$NMROOT` has been changed.)

         $ source $NMROOT/os/unix/nmstart
         $ nm make all

   - Windows (Pre-Compiled DLLs)

     Run `nmstart` and then build NeXtMidas using `nm make all`. Check the output to verify that the pre-compiled DLL's are being used.

   - Windows (Native Build)

     Follow the instructions listed in the "Compile Native Code on Windows Platforms" of the NeXtMidas User's Guide.

5. Start NeXtMidas and run the non-interactive confidence tests.

       nM> CONFIDENCE

6. Run all of the baseline tests (which include all interactive and non-interactive confidence tests) except the ones that require direct access to a web server.

       nM> CONFIDENCE/BASELINE/WEB=NO

7. Check to see that the demos are working correctly.
   - The NeXtMidas Demo.

         nM> DEMO

   - The SD360 Demo (standalone).

         nM> SD360 1e9

   - The SD360 Demo (client-server).

         nM> SD360/SERVER/BG
         nM> SD360/CLIENT

8. Test the Java look and feel configurations.
   1. Set the look and feel (the `LOOKANDFEEL` command is in the UCL option tree in NeXtMidas 2.0.0).

          nM> LOOKANDFEEL JAVA

   2. Verify that the look and feel looks correct in both traditional NeXtMidas applications (`DEMO`) and Java Swing applications (`HELP/GUI`).

          nM> DEMO
          nM> HELP/GUI

   3. Repeat the above steps with various look and feels. Use the following to get a list of the available look and feels:

          nM> LOOKANDFEEL

   4. Verify that the `/JSETUP` switch works.

          nM> BLD sd360.java MCR SYS
          nM> SD360/BG/SERVER/JSETUP
          nM> SD360/CLIENT

### Web Server Testing

(This section assumes the web server is a RedHat Linux box running Apache.)

(Text in italics indicates details specific to the nextmidas.com web server, other servers may differ slightly.)

1. Load a fresh copy of NeXtMidas on the web server and test it following the steps in the "Testing the Baseline" section.
   The copy of NeXtMidas should installed such that `NMROOT` is `/home/nextmidas/sandbox/nxmXXX/` (where `XXX` is the version number).
2. Run the web tests.

       nM> CONFIDENCE/BASELINE/WEB=YES

3. Link the release so that Apache will find it via the link `http://<server>/nxmXXX/`.

       $ cd /home/nextmidas/nxm_apache
       $ ln -sf ../sandbox/nxmXXX/ nxmXXX

4. Link the release so that Apache will find it via the link `http://<server>/nmroot/` (Skip this step for beta releases).

       $ cd /home/nextmidas/nxm_apache
       $ rm current
       $ ln -sf nxmXXX current

5. Update the top line of the WebStart demos `$NMROOT/htdocs/demo.jnlp` and `$NMROOT/htdocs/shell.jnlp` to point to the correct server.
   Existing:

       <?xml version="1.0" encoding="utf-8"?>
       <jnlp spec="1.0+" href="http://nextmidas.com/nm/htdocs/demo.jnlp"
             codebase="http://nextmidas.com/nm/jars">

   Should be (where `<server>` is the fully-qualified URL of the web server - don't use `localhost`):

       <?xml version="1.0" encoding="utf-8"?>
       <jnlp spec="1.0+" href="http://<server>/nxmXXX/htdocs/demo.jnlp"
             codebase="http://<server>/nxmXXX/jars">

6. Check the release on several different systems using various web browsers.
   1. Bring up the "NeXtMidas 'SYS' Tree" documentation.

          http://<server>/nxmXXX/

   2. Test the WebStart demo

          http://<server>/nxmXXX/htdocs/demos.jnlp

### Testing Operation on a Headless Server

(This section assumes the server is running RedHat Linux.)

1. Log into the headless server with all X11 forwarding disabled. This can usually be accomplished by using `ssh` with the `-x` (lower-case 'X') switch.
2. Load a fresh copy of NeXtMidas on the server and build it following steps 1-4 in the "Testing the Baseline" section.
3. Run the non-interactive confidence tests.

       nM> CONFIDENCE

4. Run the `SD360` macro in headless mode.

       nM> SD360/HEADLESS 1e9

### Testing X-Midas to NeXtMidas Connections via RMIF

(This section assumes that the system has X-Midas 4.2 installed.)

1. Load a fresh copy of NeXtMidas on the web server and test it following the steps in the "Testing the Baseline" section.
2. In a separate shell (that will be used when running X-Midas). Set the `NMROOT` variable and unset the `JAVAHOME` variable (this will prevent X-Midas from using any Java code).

       $ setenv NMROOT <path>
       $ unsetenv JAVAHOME

   (Simulates a system without Java or NeXtMidas available.)
3. Run the RMIF tests.

       nM> HOME TEST
       nM> %TEST_RMIF

   When prompted to test on X-Midas, enter `"YES"` and use the shell that has `NMROOT` set and `JAVAHOME` unset when prompted to run X-Midas.
4. Open a new shell and set both `NMROOT` and `JAVAHOME`.

       $ setenv NMROOT <path>
       $ setenv JAVAHOME <path>

   (Simulates a system with Java and NeXtMidas available.)
5. Run the RMIF tests again, this time using the shell with both `NMROOT` and `JAVAHOME` set.