thegrumpys / odop

Open Design Optimization Platform (ODOP) - Coil spring design app; mechanical springs; compression spring, extension spring, torsion spring
https://www.springdesignsoftware.org
MIT License
4 stars 5 forks source link

Execute to Test View #832

Closed 1fifoto closed 1 year ago

1fifoto commented 1 year ago

Presently in #830 we generate console output when a macro (AK an execute file) runs. This output is used to create a test case by dispatching redux calls and checking the objective value. Then this console output must be copied and edited into an actual test case. The edits remove function name & line numbers along with deleting any spurious [Violation] output. This issue is to enhance this capability by creating a new ExecuteToTest view which no longer needs to be edited but can be copied directly into a test case file.

1fifoto commented 1 year ago

Sample screen shot

Screenshot 2023-04-08 at 3 01 12 PM

Merged into master, closing.

grumpyinca commented 1 year ago

Possible refinements

  1. If an import entry is missing, test fails. In my observation, if an import entry is included but unnecessary, test does not even produce a warning. Thus, I suggest that the import template become a superset of all possible import entries.

  2. It may be possible to save an edit for "xxx" in: // This is a mapping of the xxx execute file to an equivalent test case file Perhaps it is as simple as having the comment reference the execute file name that appears just a line or so below.