Versions Compared

Key

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

Script Testing Concepts

...

 The blocks in yellow represent input files that we need to write required for reach individual test case. These files are described in the following sections.
The test system itself is kept on GMAT's internal repository, located at the following URL:is version controlled in an internal SVN repository.

You can use any Subversion client to download the files, such as TortoiseSVN, SmartSVN, or even the Subversion command-line client. You'll need your NDC login details credentials to access the server. When you check out the system, you'll see several directories worth of files. Here's a short explanation of what you'll seebrief overview:

test/
    bin/
        ...misc MATLAB folders...
        gmattest.m                      # The main test system script
        rundef.m                        # The run definition file (see below)
        setup.m                         # Run this before gmattest.m to set up path info
                                        # (or add to your startup.m)
        ...other .m files...            # Old or developmental scripts; ignore

    doc/
        ...developer documentation...
        reqs/                           # This is where your test matrices will go

    extern/
        Commands/
            FRC-1_Optimize/             # These folders will contain the scripts used to
                                        # generate your truth data (such as STK/Connect
                                        # scripts)
            ...other FRC folders...
        Resources/
            FRR-1_SpacecraftOrbitState/ # same as above
            ...other FRR folders...

    input/
        Commands/
            FRC-1_Optimize/
                scripts/                # .tc files and .script files
                truth/                  # .truth files (truth data)
            ...other FRC folders...
        Resources/
            FRR-1_SpacecraftOrbitState/ # same as above
            ...other FRR folders...

    output/                             # This is where the output files, log files, and results
                                        # are stored. They are divided by the build specifier
                                        # (see the Run Definition section) and then by the 
                                        # Commands/Resources structure like the extern and input
                                        # folders.

...

  1. Check out the test system using Subversion.  Warning the test system contains both GUI and script tests.  It is unlikely you need GUI tests and the data is many GB.  We recommend only checking out the trunk/test/script folder:
    This is an internal system, so you will need to log in using your NDC credentials.
  2. Install MATLAB.

  3. Locate the copy of GMAT you want to test. It's usually best if this is a secondary copy of GMAT, since the test system will copy a lot of data files and create a lot of output during the testing process.

...

  1. Start MATLAB.
  2. In MATLAB:
    1. Change the working directory to the test system bin directory (the directory that contains RunSmokeTests.m).
    2. Run:
      preparegmat('/path/to/gmat')

      where the path is to the top-level GMAT folder. This configures your copy of GMAT for testing.
    3. Open RunSmokeTests.m.
    4. Change the value of RunDef.GmatExe to the path to the copy of GMAT you would like to test. This should be the full path to GMAT.exe.
    5. Run RunSmokeTests.

...