Wrap up tests fall into two areas: save and command mode. Save mode testing verifies that user configurations are saved to to script files correctly for future sessions. We test this indirectly by saving test cases and running the saved version against truth data. Command mode tests verify that Resource configuration works correctly both before and after BeginMissionSequence. Rigorous command mode testing must only be performed on the following objects for R2012a: Spacecraft However, for all resources not listed previously, a test must be written to verify a warning is thrown if the user tries to configure the Resource in command mode via a whole-object assignment or by setting a field on the object.
Test that when performing field level assignment in command mode, all fields work correctly. The following rules apply
Create Spacecraft setSet copySat; GMAT setSet.Attitude = CoordinateSystemFixed; GMAT setSet.AttitudeCoordinateSystem = 'EarthFixed'; GMAT setSet.EulerAngleSequence = '213'; Create ReportFile TestDataReport TruthDataReport BeginMissionSequence; % Apply finite burn to copied spacecraft and report GMAT copySat.Attitude = CoordinateSystemFixed; GMAT copySat.AttitudeCoordinateSystem = 'EarthFixed'; GMAT copySat.EulerAngleSequence = '213'; For I = 1:60 Propagate DefaultProp(copySat) {copySat.ElapsedSecs = 60}; Report TestDataReport copySat.TAIModJulian copySat.Q1 copySat.Q2 copySat.Q3 copySat.Q4 EndFor % Apply finite burn to configured spacecraft and report For I = 1:60 Propagate DefaultProp(setSet) {setSet.ElapsedSecs = 60}; Report TruthDataReport setSet.TAIModJulian setSet.Q1 setSet.Q2 setSet.Q3 setSet.Q4 EndFor |
Test that when a user-data type is consistent with a field type, that you can set the field using the user data type. The following rules apply
Create Spacecraft setSet copySat; setSat.X = 7120 Create Variable myVar; myVar = 7120; Create ReportFile TestDataReport TruthDataReport BeginMissionSequence; copySat.X = myVar; For I = 1:60 Propagate DefaultProp(copySat) {copySat.ElapsedSecs = 60}; Report TestDataReport copySat.TAIModJulian copySat.Q1 copySat.Q2 copySat.Q3 copySat.Q4 EndFor % Apply finite burn to configured spacecraft and report For I = 1:60 Propagate DefaultProp(setSet) {setSet.ElapsedSecs = 60}; Report TruthDataReport setSet.TAIModJulian setSet.Q1 setSet.Q2 setSet.Q3 setSet.Q4 EndFor |
Test that when performing object to object assignment, all fields work correctly. The following rules apply
Here is an examples for Spacecraft where for the CoordinateSystemFixed attitude mode. Other tests are written for SPICE and Spinner modes.
Create Spacecraft setSet copySat; GMAT setSet.Attitude = CoordinateSystemFixed; GMAT setSet.AttitudeCoordinateSystem = 'EarthFixed'; GMAT setSet.EulerAngleSequence = '323'; Create ReportFile BeginMissionSequence % Apply finite burn to copied spacecraft and report GMAT copySat = setSet; For I = 1:60 Propagate DefaultProp(copySat) {copySat.ElapsedSecs = 60}; Report TestDataReport copySat.TAIModJulian copySat.Q1 copySat.Q2 copySat.Q3 copySat.Q4 EndFor % Apply finite burn to configured spacecraft and report For I = 1:60 Propagate DefaultProp(setSet) {setSet.ElapsedSecs = 60}; Report TruthDataReport setSet.TAIModJulian setSet.Q1 setSet.Q2 setSet.Q3 setSet.Q4 EndFor |
Test each field on the object by setting it to a disallowed value and make sure the invalid setting results in an Error. Here is an example for ReportFile. You will only be able to test a single field in a given test file because as soon as the error is encountered, an error is thrown and execution stops.
Create ReportFile aReport BeginMissionSequence aReport.WriteReport = InvalidString; % This is an invalid setting aReport.Precision = -30; % This is an invalid setting |
The purpose of Save testing is to verify that when the user saves a script and runs the saved version the results are the same. This tests that when you input a configuration, the save file contains all of the configuration data. The GMAT test system has built in functionality to test this and you only have to mark TC files for the test cases you would like to run in Save mode. Here is a sample TC file (Ballistic_and_Mass_Case01_LEO.tc) configured to run in Save mode. You simply add the "Save" keyword to the Categories list. As feature lead it is your responsibility to mark files for full coverage of the feature. All Resources and Commands must have Save mode tests.
Categories: [Numeric, Dynamics, Save] Requirements: [FRR-4,FRR-4.1,FRR-4.3.1,FRR-4.4.1,FRR-4.4.2,FRR-4.4.3,FRR-4.4.4] OutputFiles: [ { File: Ballistic_and_Mass_Case01_LEO.report, Truth: Ballistic_and_Mass_Case01_LEO.truth, Comparator: PVComparator, Tolerances: 1e-3 } ] Bugs: [] |
Here is a partial RunDef file configured to run all Save tests on Spacecraft Ballistic and Mass folder.
% This example runs save mode tests on spacecraft ballistic and mass fields RunDef.Modes = {'save'}; % Set mode to save RunDef.Comparisons = {'truth'}; %RunDef.Cases = {}; % Must be commented out for "and" filter to work RunDef.Categories = {'Save'}; % Runs test cases with "Save" in the category field of the TC file RunDef.Folders = {'FRR-4_SpacecraftBallisticMass'}; %RunDef.Requirements = {}; % Must be commented out for "and" filter to work RunDef.FilterMode = 'and'; % Telss test system to run tests that meet all criteria |
The Resource Tree in the GMAT GUI allows users to delete and rename Resources
The delete and rename functionality must be tested to ensure that:
Item 1 is tested by TestComplete. Items 2 and 3 need to be tested manually, for now.
The list of couplings between resources and commands is located in the Couplings sheet in the User Interface Spec.
If your feature can use parameters (using ParameterSelectDialog), you need to check the following behavior:
|
ResourceName_Delete.script
" (for example, "XYPlot_Delete.script
". Save it to the input\GuiRenameDelete
folder in the test system.ResourceName_Delete.script
").ResourceName_Rename_Baseline.script
" (for example, "XYPlot_Rename_Baseline.script
". Save it to the input\GuiRenameDelete
folder in the test system.XYPlot_Rename_Result.script
". Save it to the input\GuiRenameDelete
folder in the test system.