LukeANewton/Tool-Framework-to-Measure-Test-Case-Diversity

Give users the option to not specify a filename with the "-s" flag in compare instructions

Closed this issue · 0 comments

currently, if a user wanted to save results of their compare command to a file, they must include "-s " in the command. We want to make the specification of a filename optional, so that there are 3 choices for output:

  1. "-s " will let the user save the results in a specified file
  2. "-s" will let the use save the results in the default output file specified in the config object
  3. omission of "-s" will only display the results to the console, and not save to any file

Currently, if the user specifies a file we fill the output filename field of the DTO with that filename. When the time comes to save results, we either save to the filename provided, or do not save if the filename is null. To achieve this new choice, an extra boolean field should be added into the CompareDTO. This new field would tell us whether to save results to a file or not, and the output file name being null would tell us to get the default filename from the config file.

In addition to changing the CompareDTO, this will require changes in the InputParser to make the filename specifiecation after "-s" optional, and changes in the Controller when writing results to a file.