Welcome to MSDN Blogs Sign in | Join | Help

Progressive Development

Zany Adventures in Software Engineering with Maven and Motley

Browse by Tags

All Tags » unit testing   (RSS)
Motley says: “Slow down to go fast? Do I look like a tortoise?”
Summary Motley: There is no harm shortcutting a few steps of development to meet a deadline. Some up-front check-in steps just take too much time. Maven: Slow down to go fast. Obey check-in checklists or you will pay for it later in the development cycle. Read More...
Motley says: "More test automation is always better"
Summary Motley: A tester's job is to find bugs, so measure them on the amount of bugs they find. More test automation is always better. Maven: Do not measure testers by the amount of bugs they report. Think of the test team as more a quality assurance Read More...
Motley says: "Just use a batch file to run unit tests"
Summary Motley: Just use a batch file to execute unit tests - it's easy and quick. Maven: Use a unit test framework to write and execute unit tests. A framework makes tests easy to write, executes tests quickly and consistently, and provides features Read More...
Motley says: "If-then-else hooks are the best way to inject mock objects"
Summary Motley: A simple if-then-else hook is the simplest and best way to inject a mock object. Maven: First, you have to design to interfaces. Then, techniques like dependency injection, factories, and endo-testing are more effective ways to inject Read More...
Motley says: "Test both private and public methods"
Summary Motley: To get high code coverage, we should be testing both public and private methods Maven: Only test public methods. Testing private methods gets in the way of refactoring ______________________________ [Context: Maven checks in on Motley's Read More...
Motley says: "Contracts are for baseball players and cell phones"
Summary Motley: Contracts don't apply to software - leave them for baseball players and cell phone providers Maven: Contracts (preconditions, postconditions, invariants) help drive your unit tests ______________________________ [Context: Motley is all Read More...
Motley says: "100% code coverage tells me there is nothing left to test"
Summary Motley: If I hit 100% code coverage for my tests, then there is nothing left to test. Maven: 100% line coverage does not necessarily mean you have full test coverage. You have to consider condition coverage as well. ______________________________ Read More...
Motley says: "Refactoring is too hard - it's not worth the effort"
Summary Motley: Every time I make a change in refactoring I either cause compile problems or break functionality. Refactoring is slow and not worth the effort. Maven: Use tools to refactor and leverage unit tests to improve your confidence that your refactoring Read More...
Motley says: "I don't have time to Refactor - I need to get it right the first time"
Summary Motley: Refactoring takes too much time - I have to ship you know! Maven: Refactoring leads to much more maintainable code, and if you have tests in place, the return on investment far outweighs the cost. ______________________________ [Context: Read More...
Motley says: "If I write code to pass tests I'm cheating!"
Summary Motley: Tests need to validate code that has already been written - not the other way around. Maven: Writing tests before you code allows the tests to drive your code while providing more sound requirements validation. ______________________________ Read More...
Motley says: "I can't write tests before application code - there's nothing to test."
Summary Motley: You can't possibly write tests before code - there's nothing to test. Maven: Writing tests for a method before coding it has all kinds of design advantages. ______________________________ [Context: Motley has been writing unit tests for Read More...
Motley says: "Unit tests take too long to execute, so don't bother"
Summary Motley: Unit tests take too long to execute. I'm not going to bother. Maven: Unit tests need to run quickly - you need to execute them frequently. Mock objects can help. ______________________________ [Context: Motley has been writing unit tests Read More...
Motley says: "I am a developer - I don't test. Testing is for the test team."
Summary Motley: Unit testing is the test team's job! I am not paid to write tests. Maven: White box (unit) tests help with code quality and give you confidence to change your code. ______________________________ [Context: During a previous conversation Read More...
Motley says: "Rely on the debugger to write solid code"
Summary Motley: I rely on the debugger when I am writing code. Without it, I'd have a really hard time tracking down all the bugs in my code. Maven: Write code as if the debugger does not even exist. Include unit tests, assertions, tracing, logging, static Read More...
Page view tracker