Rebel Labs: Using unit testing to wipe out bugs in your Java apps

Home

News: Rebel Labs: Using unit testing to wipe out bugs in your Java apps

  1. Rebel Labs technician Kostis Kapelonis draws on 8+ years of unit testing as a senior Java developer to introduce (and remind) both beginners and Java masters of the value of unit testing, tools to check out, steps to take and how to make your own sample unit tests.

    Check out waaaay more info and content here:

    Why Your Next Cloud App Will Probably Suck Without...Unit Testing 
    http://zeroturnaround.com/labs/why-your-next-cloud-app-will-probably-suck-without-unit-testing/

    Don’t Test Blindly: The Right Methods for Unit Testing Your Java Apps
    http://zeroturnaround.com/labs/dont-test-blindly-the-right-methods-for-unit-testing-your-java-apps/ 

    Stay tuned for more Java industry know-how, tips and guides from Rebel Labs, the research & content division of ZeroTurnaround...

    Threaded Messages (3)

  2. Only as good as your developers[ Go to top ]

    For the first link, the real danger is that 'Sara' probably will change both the business logic as well as the unit test. This tends to happen in environments where breaking old tests because of changes is common and the normal action is to update the tests. When the people that originally wrote the tests are gone, and the BAs aren't really sure about the business rules, how do you prove the correctness of the business logic or unveil any bugs in the tests themselves?
  3. Only as good as your developers[ Go to top ]

     

    I would recommend putting javadoc in your unit tests that reference your business logic, if you use a tool to track User Stories/tasks/features/bugs then hopefully this should minimize the risk. e.g. 'Feature request BWC-356. Weight can never be negative' in the code, should be in both the method javadoc and unit test javadoc.

    But yes this is still only as good as your developers, as the developer that originally did the has to be disciplined enough to do this documentation.

     

  4. From 'Saras' point of view, BWC-356 is stating it can't be < 0, whereas BWC-756 which she is working on will 'just' limit it even more to not come under 1. In her mind this will allow the unit test to be changed. And even if I would discuss all the changes made to the unit tests with a BA before a release, I doubt he would be able to understand the implications of small changes here and there.