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

159121Re: [XP] TDD and kinds of test

Expand Messages
  • Phlip
    Apr 3, 2014
      > In practice ATDD and BDD ..

      Just a note here - another HUGE industry fallacy, repeated at all
      levels, is that BDD, for "functional testing", mean "integration tests
      using klutzy screen-driver AND a declarative language that even
      consultants can read & write."

      Put another way, junior Rails programmers by the truckload these days
      are taught -

      - tdd the model with the unit test folder, and call it BDD bc we test
      with RSpec

      - tdd the controllers & not the view with the functional test folder,
      with template rendering turned off

      - tdd the HTML or JS, even at the trivial level of "what color tag do
      we template in?" using ONLY
      * Cucumber BDD runner, using ...
      * Gherkhin notation, driving ...
      * Capybara (a webrat offspring), running Selenium on your Chrome
      browser!, plugged into ...
      * a real HTTP server, running your Rails app in a 4th
      environment, operating on ...
      * a complete batch of data records copied in each time, using ...
      * a ton of mocks for everything that "just stopped working bc we
      added that feature & didn't want to add it to the test", AND ...
      * a couple of ridiculous hack gems that keep your test VM in
      memory forever so it's not so incredibly slow.

      A more fragile stack could not be imagined. Oh, yeah, and it's all
      open source, getting out of sync with each other every season or so.

      (the correct way to test HTML views, btw, is render their templates &
      test most of the view using assert_xpath, and yes I'm obviously
      recovering from an experience, here...)

      All of that teaching is wrong, false, the opposite of true, and only
      damages the BDD movement. Good luck getting rid of that stupid meme
      because it's unbelievably damaging, and entirely tempting using
      today's tools!!
    • Show all 9 messages in this topic