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

Re: [XP] Book Review: Pragmatic Ajax

Expand Messages
  • Forrest Chang
    If you use selenium with Ruby On Rails, you can do a rake test_acceptance and it will kick off the selenium tests with each browser you ve specified in the
    Message 1 of 24 , May 1, 2006
    • 0 Attachment
      If you use selenium with Ruby On Rails, you can do a "rake
      test_acceptance" and it will kick off the selenium tests with each
      browser you've specified in the config file. This probably comes
      close to meeting your 1st two questions. Not surprisingly since these
      drive browsers, they go by quite a bit slower than normal unit tests.

      For the last question, are you asking for a navigation into offending
      code? You can navigate to the part that didn't pass in the test the
      way it is, and I've thought about writing something that goes through
      the ROR stack traces to hit that.



      On 4/30/06, Phlip <phlip2005@...> wrote:
      > Luiz Esmiralha wrote:
      >
      > > Selenium is compatible with these browsers:
      > >
      > - has anyone ever tested the _entire_ set,
      > simultaneously, after each code change?
      >
      > - has anyone ever figured out how One Test
      > Button can drive tests into all those browsers?
      >
      > - has anyone ever figured out how to navigate
      > to any fault after such a test fails in one
      > of those browsers?
      >
      > These sound like TDD zealotry questions, and of course a healthy
      > project can get by with only spot-checks at test-button-time. However,
      > it seems those questions emerge from the TDD principles...
      >
      > --
      > Phlip
      > http://www.greencheese.us/ZeekLand <-- NOT a blog!!
      >
    • Phlip
      ... Kent Beck calls that topic test faults are syntax errors . That means _all_ errors, whatever their source, should appear in the same list in your editor,
      Message 2 of 24 , May 1, 2006
      • 0 Attachment
        Forrest Chang wrote:

        > For the last question, are you asking for a navigation into offending
        > code? You can navigate to the part that didn't pass in the test the
        > way it is, and I've thought about writing something that goes through
        > the ROR stack traces to hit that.

        Kent Beck calls that topic "test faults are syntax errors". That means
        _all_ errors, whatever their source, should appear in the same list in
        your editor, and you should hit <F4> or similar to optionally navigate
        to them.

        Once when I pushed for a system like that, my colleagues using Vim
        demonstrated that it was impossible, because Vim indeed had an option
        to jump to the first syntax error. But its problem was it _always_
        jumped; you couldn't just opt to jump. Under TDD, 5!% of the time when
        a test fails your cursor should already be near the cause.

        --
        Phlip
        http://www.greencheese.us/ZeekLand <-- NOT a blog!!
      • Ian Collins
        ... Quite hard with JavaScript because your tests run in a different environment (browsers) for your editor. The browser my even be on a different box when
        Message 3 of 24 , May 1, 2006
        • 0 Attachment
          Phlip wrote:

          >Forrest Chang wrote:
          >
          >
          >
          >>For the last question, are you asking for a navigation into offending
          >>code? You can navigate to the part that didn't pass in the test the
          >>way it is, and I've thought about writing something that goes through
          >>the ROR stack traces to hit that.
          >>
          >>
          >
          >Kent Beck calls that topic "test faults are syntax errors". That means
          >_all_ errors, whatever their source, should appear in the same list in
          >your editor, and you should hit <F4> or similar to optionally navigate
          >to them.
          >
          >
          >
          Quite hard with JavaScript because your tests run in a different
          environment (browsers) for your editor. The browser my even be on a
          different box when testing in multiple environments.

          >Once when I pushed for a system like that, my colleagues using Vim
          >demonstrated that it was impossible, because Vim indeed had an option
          >to jump to the first syntax error. But its problem was it _always_
          >jumped; you couldn't just opt to jump. Under TDD, 5!% of the time when
          >a test fails your cursor should already be near the cause.
          >
          >
          >
          Not being able to link form the editor is a good way to force small
          changes and frequent test runs.

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