lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [6101] Rectify test specifications


From: Greg Chicares
Subject: [lmi-commits] [6101] Rectify test specifications
Date: Sun, 25 Jan 2015 00:53:47 +0000

Revision: 6101
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6101
Author:   chicares
Date:     2015-01-25 00:53:46 +0000 (Sun, 25 Jan 2015)
Log Message:
-----------
Rectify test specifications

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/wx_test_calculation_summary.cpp
    lmi/trunk/wx_test_validate_output.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2015-01-23 16:13:44 UTC (rev 6100)
+++ lmi/trunk/ChangeLog 2015-01-25 00:53:46 UTC (rev 6101)
@@ -35615,3 +35615,9 @@
 Remove a bizarre zero-height workaround. See:
   http://lists.nongnu.org/archive/html/lmi/2014-12/msg00099.html
 
+20150125T0053Z <address@hidden> [516]
+
+  wx_test_calculation_summary.cpp
+  wx_test_validate_output.cpp
+Rectify test specifications.
+

Modified: lmi/trunk/wx_test_calculation_summary.cpp
===================================================================
--- lmi/trunk/wx_test_calculation_summary.cpp   2015-01-23 16:13:44 UTC (rev 
6100)
+++ lmi/trunk/wx_test_calculation_summary.cpp   2015-01-25 00:53:46 UTC (rev 
6101)
@@ -1,4 +1,4 @@
-// Test calculation summary features.
+// Test calculation summary.
 //
 // Copyright (C) 2014, 2015 Gregory W. Chicares.
 //
@@ -300,10 +300,84 @@
              paste the output for inspection, then
              Illustration | Copy full illustration data
              paste the output for inspection
+             [note--apparently this creates a file automatically]
 
     The output is pasted into 4 files called {New,Calc}Ill{Summary,Full}.txt in
     the current working directory.
+    [note--we'd rather write them to the gui-test directory; but, as
+    noted above, (D) already writes its own file...and, as noted below,
+    it may be better to remove (C) and (D) from this file altogether.]
  */
+
+// ERASE THIS BLOCK COMMENT WHEN IMPLEMENTATION COMPLETE. The block
+// comment below changes the original specification, and does not
+// yet describe the present code. Desired changes:
+//  - Make sure default columns are used with '--distribution'.
+//  - Remove comment block (A) above: it's incorporated below.
+//  - Remove comment block (B) above: it's incorporated below, with
+//    only one column selected (twelve is overkill).
+//  - Code the additional tests specified below.
+//  - Don't bother reading 'configurable_settings' directly: it cannot
+//    be wrong if all columns on the screen are correct.
+// ERASABLE BLOCK COMMENT ENDS.
+
+// Deferred ideas:
+//
+// Remove comment blocks (C) and (D) above: spreadsheet output is
+// tested elsewhere.
+//
+// Someday, test supplemental-report column selections similarly.
+//
+// To test backward compatibility, modify 'configurable_settings'
+// directly, adding a field that was formerly removed, and setting
+// the version number to a version that offered that field.
+//
+// Columns whose names end with "Zero" are available iff inforce
+// general and separate account value are both nonzero. This could be
+// tested here; however, it would be a vastly better use of limited
+// time to generate the special report that uses them automatically
+// rather than manually, and then to expunge those columns from
+// 'mc_enum_types.?pp'.
+
+/// Test calculation summary.
+///
+/// Iff the '--distribution' option is specified, then:
+///   File | Preferences
+/// make sure "Use built-in calculation summary" is checked.
+///
+/// Display an illustration, to see calculation-summary effects:
+/// File | New | Illustration | OK
+///
+/// File | Preferences
+/// uncheck "Use built-in calculation summary"
+/// set all "Column" controls to "[none]"
+///   do this by simulating {Tab Home} repeatedly because that is
+///   much faster and is what a smart user does
+/// in "Column 2" (two, not zero), select "NewCashLoan"
+/// OK
+/// Verify that the columns shown in the open illustration are exactly
+///   Policy Year
+///   Annual Loan
+///
+/// File | Preferences
+/// Verify that "NewCashLoan" has moved from "Column 2" to "Column 0"
+/// check "Use built-in calculation summary"
+/// OK
+/// Verify that the columns shown in the open illustration are exactly
+///   Policy Year
+///   Net Outlay
+///   Curr Account Value
+///   Curr Net Cash Surr Value
+///   Curr EOY Death Benefit
+///
+/// File | Preferences
+/// uncheck "Use built-in calculation summary"
+/// Verify that "Column 0" is "NewCashLoan" and the rest are "[none]"
+/// OK
+/// Verify that the columns shown in the open illustration are exactly
+///   Policy Year
+///   Annual Loan
+
 LMI_WX_TEST_CASE(calculation_summary)
 {
     configurable_settings const& settings = configurable_settings::instance();

Modified: lmi/trunk/wx_test_validate_output.cpp
===================================================================
--- lmi/trunk/wx_test_validate_output.cpp       2015-01-23 16:13:44 UTC (rev 
6100)
+++ lmi/trunk/wx_test_validate_output.cpp       2015-01-25 00:53:46 UTC (rev 
6101)
@@ -1,4 +1,4 @@
-// Validate existence and naming conventions of output files.
+// Test creation and naming of spreadsheet output files.
 //
 // Copyright (C) 2014, 2015 Gregory W. Chicares.
 //
@@ -38,8 +38,6 @@
 #include <wx/uiaction.h>
 
 /*
-    Add test to validate existence of the expected output files.
-
     This implements the following item of the testing specification:
 
         14. Validate existence and naming conventions of output for
@@ -50,22 +48,103 @@
              Expected results:
                file 'unnamed.monthly_trace.tsv' exists
 
-          B. File | Open | 'MonthlyTrace.ill' | press 'OK' to
-              [dismiss message box] | press 'OK' to run illustration
-             Expected results:
-               file 'MonthlyTrace.monthly_trace.tsv' exists
+OMIT B: duplicates A above:
+OMIT      B. File | Open | 'MonthlyTrace.ill' | press 'OK' to
+OMIT          [dismiss message box] | press 'OK' to run illustration
+OMIT         Expected results:
+OMIT           file 'MonthlyTrace.monthly_trace.tsv' exists
 
           C. File | New | MEC testing | OK
              Expected results:
                file 'unnamed.mec.tsv' exists
 
-          D. File | Open | 'MecTesting.mec' | OK
-             Expected results:
-               file 'MecTesting.mec.tsv' exists
+OMIT D: duplicates C above:
+OMIT      D. File | Open | 'MecTesting.mec' | OK
+OMIT         Expected results:
+OMIT           file 'MecTesting.mec.tsv' exists
 
     The currently configured spreadsheet file extension is used instead of the
     hard-coded "tsv", otherwise the tests are implemented exactly as specified.
  */
+
+// ERASE THIS BLOCK COMMENT WHEN IMPLEMENTATION COMPLETE. The block
+// comment below changes the original specification, and does not
+// yet describe the present code. Desired changes:
+//  - Remove code corresponding to B and D above.
+//  - Then remove the entire /*...*/ comment block above (its
+//    remaining contents are incorporated in the first two
+//    paragraphs below).
+//  - Code the other tests specified below.
+// Consider renaming this file to 'wx_test_spreadsheet_output.cpp'
+// e.g., because its purpose is to test *spreadsheet* output only.
+// To us at least, to "validate" a file suggests checking its
+// contents, while "MEC output" suggests a '.mec.xml' file and
+// "illustration output" most likely means a PDF file, so names like
+//   validate_output_illustration
+//   validate_output_mec
+// suggest something quite different from what those functions do.
+
+/// Test creation and naming of spreadsheet output files.
+///
+/// For simplicity, this description uses extension '.tsv' for
+/// "spreadsheet" output; the actual tests use the configured
+/// spreadsheet_file_extension().
+///
+/// File | New | Illustration
+///   Comments: "idiosyncrasyZ"
+///   OK
+/// Verify that this file was created:
+///   unnamed.monthly_trace.tsv
+///
+/// File | New | MEC testing
+///   OK
+/// Verify that this file was created:
+///   unnamed.mec.tsv
+///
+/// File | New | Census
+/// Census | Edit case defaults
+///   Comments: "idiosyncrasyZ"
+///   Corporation name: "ABC Inc."
+///   OK
+///   Yes (apply to all)
+/// Census | Edit cell
+///   Insured name: John Brown
+///   OK
+/// Census | Add cell
+/// File | Save as "ABC" [used in output file names]
+/// Use this census for the tests below.
+///
+/// Census | Run case
+/// Verify that these files were created:
+///   ABC.John_Brown.000000001.monthly_trace.tsv
+///   ABC.000000002.monthly_trace.tsv
+/// ...and delete them both now.
+///
+/// Census | Print case to spreadsheet
+/// Verify that these files were created:
+///   ABC.John_Brown.000000001.monthly_trace.tsv
+///   ABC.000000002.monthly_trace.tsv
+///   ABC.cns.tsv
+/// ...and delete all three now.
+///
+/// Census | Print roster to spreadsheet
+/// Verify that these files were created:
+///   ABC.John_Brown.000000001.monthly_trace.tsv
+///   ABC.000000002.monthly_trace.tsv
+//    ABC.cns.roster.tsv
+/// ...and delete all three now.
+///
+/// Census | Edit case defaults
+///   Comments: replace contents with "idiosyncrasy_spreadsheet"
+///   OK
+///   Yes (apply to all)
+/// Census | Print case to PDF
+/// Verify that this file was created:
+///   values.tsv
+///
+/// Finally, delete all files created directly or indirectly above
+/// that happen not to have been deleted already.
+
 LMI_WX_TEST_CASE(validate_output_illustration)
 {
     std::string const&
@@ -138,6 +217,14 @@
     LMI_ASSERT(existing_trace.exists());
 }
 
+/// Validate spreadsheet output for MEC testing.
+///
+/// Someday the spreadsheet tested here may be eliminated; then this
+/// test should be expunged.
+///
+/// It might be worthwhile to add a test like this one for any similar
+/// GPT spreadsheet that may be developed.
+
 LMI_WX_TEST_CASE(validate_output_mec)
 {
     skip_if_not_supported("unnamed.mec");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]