Loading ...
Sorry, an error occurred while loading the content.

[extremeprogramming] Re: Refactor before Functional Tests

Expand Messages
  • tegan@deltanet.com
    ... that ... RefactorMercilessly ... net ... Try this: A report shows the wrong number. The UI does not show this number, and the module that produces it only
    Message 1 of 6 , Jan 12, 2000
    • 0 Attachment
      ronald e jeffries wrote:

      > An issue with refactoring (or any kind of changing without tests) is
      that
      > it's dangerous, kind of like working without a net. So
      RefactorMercilessly
      > alone is v. dangerous. Perhaps the right starting point is to write a
      net
      > of tests around the area being fixed before refactoring.

      Try this:

      A report shows the wrong number.

      The UI does not show this number, and the module that produces it only
      sends it to the printer. (I know the UI should show the number, but The
      Customer Is Always Right.)

      To functional test (just to get this stinkin' number), pick one:

      1> Spoof the printer driver by wedging your printing feature and adding
      a "print to file" option. Then open the file and parse down to the
      number.

      2> Add the number as a custom output of the module that cooks it.
      (Refactor + add functionality.)

      This is "BeltsAndBraces" territory, but I thought that BnB represented
      hard-to-test situations for which any test represented a potential
      refactor.

      --Phlip
    Your message has been successfully submitted and would be delivered to recipients shortly.