29 Matching Annotations
  1. May 2019
    1. Test-first reduces the cost of bugs. Bugs detected earlier are easier to fix. Bugs detected later are usually the result of many changes, and we don’t know which one caused the bug. So first we have to hunt for and find the bug. Then we have to refresh our memories on how the code is supposed to work, because we haven’t seen it for months. Then finally we understand enough to propose a solution. Anything that reduces the time between when we code the bug and when we detect it seems like a obvious win. We consider ourselves lucky to find out about bugs within a few days, before the code is shipped to SQA or to customers. But how about catching them within a few minutes? That’s what test-first accomplishes with the bugs it catches.

      I find this very important because in this semester for our Administration of Software Projects class we had to cut the scope of our project due to constant bugs, there existing no tests, and the team being unfamiliarized with the technologies that were imposed to us by the teacher. Testing can really reduce the impact of bugs and reduce the constant increase of the cost-time curve of changes in the project.

    2. It’s even better than code inspections

      Unit testing is of course better than code inspectors, because code inspectors only check if the code makes sense, whilst they are not specialized for exactly what it is the program is trying to achieve.

    3. All programmers should read this blog, it opens your eyes to the importance of testing.

    1. I Pity The Fool Who Doesn't Write Unit Tests

      I think that overall this article's title comes off a bit strong, but there is reasoning behind it. I agree with what the author says, and why it is utterly stupid to program without using unit tests to check for correct functionality in your code.

    1. Bugs come from lazy programmers.

      I think this title overall describes something that really got my attention, as how it is totally true, and most bugs happen because we programmers are lazy to thoroughly do our code and end up creating bugs because of that.

    2. Great explanation and examples for the do's and dont's of testing.

  2. Apr 2019
    1. It’s faster than writing code without tests!

      I think that this refers to one of the greatest misconception of testing, and one of the reasons why people don't do it. Doing testing is apparently more work and code, that's why a lot of developers avoid the practice. However, it reduces significantly the debugging time, which is, as he says in the same paragraph, "most of the effort we spend on code".

    2. Test-first reduces the cost of bugs.

      I can really say that this can save lots of time and work for the future you.

    1. We're taught to assume we already know how to tell whether our solution works

      This is so true, and many people wont see it. And many will think that they must know it, but we can and will keep learning.

    1. Anybody qualified to be a good tester doesn’t want to work as a tester.

      For this part I think there are people that enjoy findind and fixing mistakes.

    2. I tended to exercise my code the same way every time … I used my own habits, relying on the mouse a lot

      I can really relate to this. Some people dont think this is right.

    1. distinguishes between failures and errors.

      This is something i honestly haven't thought about while testing with JUnit, we only know if the output is the same as the expected one but we never know if the program is in a state of error and i think this is really usefull to better test programs.

    2. There’s not a lot you can do about unanticipated errors (if you did something about them, they wouldn’t be unanticipated any more, would they?)

      This is so interesting and true. But, actually you know sometimes that certain functions or methods could fail in come cases but you know you don't know how to fix them. Wouldn't this be part of this hypothesis?

    3. Our testers spent more time keeping the tests up to date and tracking down false failures and false successes than they did writing new tests.

      What could possibly be done with current software industry practices, like Scrum, where changes are constant and expected, in respect to changing tests to match new outputs?

  3. Mar 2019
    1. Tests end up interacting with one another

      When this happens, how do developers solve it? Not everyone is at the testing framework level.

    2. Many different test cases can be run against the same fixture.

      If the same fixture can be applied to many test cases, can a test case use more than one fixture?

    3. However, when you then wanted to run "this bunch of cases and that bunch of cases" you’d be stuck.

      I'm understanding that it's possible to test multiple instances, but this sentence confuses me a little. How many tests can we run one after the other without getting stuck?

    4. The potential performance problems with this approach shouldn't be a big deal because suites of tests can run unobserved

      Is performance usually a big concern within testing?

    5. you’d like to distinguish between errors you are checking for

      What if the errors that you are checking for actually come from a fault in the code? Would that be unanticipated or simply a failure to your testing?

    6. If you start with a vague idea of what you’ll be testing, you’ll never get started.

      If the broadness of the thing we are testing overwhelms us. Should we stop thinking in TDD to see if something comes up? or, is declaring with fixtures that you are not testing everything is the right way?

    7. It is tempting to write a whole set of test cases, but when tests interact with each other by sharing common features/values, the whole test set might not work because of another test case. Leading to more debugging.

    8. A TestSuite runs a collection of test cases and reports their results all at once

      This seems to be helpful when there is more than one tester in the project.

    9. The simplest way to run a TestCase is just to send it the message "run"

      What is the correct way to run a testcase so that teardown and setup are executed when encapsulated?

    10. If you are looking for a particular return value, you use "print it"

      Is this more related to debugging rather than unit testing?

    11. much more stable

      Ca we guarantee full stability by making this?

    12. The simplest way to represent this is interactively

      Is this the most effective way to do it ?

    13. By choosing a fixture you are saying what you will and won’t test for.

      Is this somehow related to the coverage concept?

    14. I recommend that developers spend 25-50% of their time developing tests

      Is this recommendation for unit testing in general or only for this framework?

    15. are too brittle to be useful.

      What does Kent mean here when he uses the word brittle?