Basic Unit Testing Guidelines(kodefuguru.com)

submitted by KodefuGuruKodefuGuru(2599) 2 years, 6 months ago

When I recently started looking through a certain project’s tests, I was struck by how difficult it was for me to read and understand. The tests were laid out haphazardly, and the code contained enough logic to make me wonder if it would be easier to analyze the functional code. Tests don’t do anyone good if they require that much analysis. In contrast, one of my favorite open source projects contains tests that allow me to learn the functionality of the system without looking at any functional code.

1 comment |category: |Views: 17

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by libertysoftwarelibertysoftware(0) 2 years, 4 months ago 0

Unit testing *should* document what code does. Too often the tests are far more obscure than the system under test. I like the suggestion to have each test class test a particular scenario.

Reply

information Login or create an account to comment on this story