Test Driven Development for Scripts


News: Test Driven Development for Scripts

  1. Test Driven Development for Scripts (2 messages)

    Mike Clark has written about being burned by "breaking" the system with a change to a shell script. He goes on to explain the situation, and how he wrote a test which guarantees that it doesn't happen again. How much should we be testing?
    I write a goodly number of shell scripts because, well, you can do a lot of automation with a low-tech shell script. So I have enough of these buggers now that I can't remember if they all work. In other words, I have more than two scripts. And I feel this twinge of fear every time I tweak one of them.
    Read Mike Clark in Yes, Even Shell Scripts

    Threaded Messages (2)

  2. test if it can't break[ Go to top ]

    If you don't want something to fail then
    you need to test it. You'll need unit tests
    and a test area where you can run full tests.
    If the system uses scripts or not doesn't really

    A lot of my scripts can fail without the world
    being worse off so i don't unit test them, though
    i always acceptance test them.
  3. test it![ Go to top ]

    If you don't want something to fail thenyou need to test it.
    Our management truly believes in Test Driven development and committed to QA therefore we just hired two developers to write test cases to control correctness of bytecode generation. So far they produced about 150 JUnit test cases and the tests already proved their usefulness. No problems related to bytecode generation were submitted in our bug tracking system.