|
Should we make unit test ? it is very important part of development ?
|
|
|
|
|
Try working for a company that is regulated by the FDA. I can't sneeze without writing test scripts first
|
|
|
|
|
|
Hehe this is survey no 666
|
|
|
|
|
Does that mean The Beast will be voting? My guess is that it never unit tests.
"For fifty bucks I'd put my face in their soup and blow." - George Costanza CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.
|
|
|
|
|
Ashley van Gerven wrote: My guess is that it never unit tests.
Sure about that, I would think it would test every 'unit' for acceptance into purgatory.
[/bad humor]
|
|
|
|
|
What do you mean unit testing?
Do you mean unit testing with frameworks like NUnit, of simply unit test = testing the functionalities of function one-by-one?
Unit testings with NUnit and other stuffs needs a lot of code. It's efficient, but add +50% to the development time (or costs). This is somethint that is hard to achieve if you do custom software development...
Mostly simple unit tests and proper logging is how testing/debugging works...
NUnit like unit testing are rarely used in the .NET (at least i've never met a software company around where it's done). It's almost inpossible even to convince your employees to invest some $ for researching/learn the usage of usefull frameworks - they (who're sitting up in the big chairs) wan't profit imediately...
So i'm sick of this approaches, and will switch my employee soon - i've finally found one, where it's possible to play around with new frameworks, to teach the basics of it and to make a standard from them for a newly recruited .net team
C#, ASPX, SQL
|
|
|
|
|
You must be kidding, right? I mean, all the buzz in the community about testing and even microsoft adding more TDD suppor to VisualStudio should be a sign that there are a lot of writing unit test, is it not?
|
|
|
|
|
Without unit testing it will be bugging and debugging instead of coding and debugging
"Silence will create respect and dignity; justice and fair play will bring more friends;
benevolence and charity will enhance prestige and position; courtesy will draw benevolence;
service of mankind will secure leadership and good words will overcome powerful enemies"
Ali (Peace be upon him)
|
|
|
|
|
I believe it depends on the skill and experience of the developer.
John
|
|
|
|
|
You are right. But since to err is humane and for sanity one would better do a unit testing. Otherwise small bugs might popup during the integration, which incurs some costly rework.
"Silence will create respect and dignity; justice and fair play will bring more friends;
benevolence and charity will enhance prestige and position; courtesy will draw benevolence;
service of mankind will secure leadership and good words will overcome powerful enemies"
Ali (Peace be upon him)
|
|
|
|
|
I saw that 18.56% of the votes don't know what unit testing is, so here goes:
From Wikipedia
In computer programming, unit testing is a procedure used to validate that individual units of source code are working properly. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual program, function, procedure etc, while in object-oriented programming, the smallest unit is always a Class; which may be a base/super class, abstract class or derived/child class. Units are distinguished from modules in that modules are typically made up of units.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
I suspect a good chunk of the replies that checked not knowing are in the vein of:
Programmer A
Hey I you put in 90hrs last week. When do you sleep?
Programmer B
Sleep? Please define or describe.....
But then again you were providing the definition, so maybe you were taking it in that vein too.
|
|
|
|
|
Those sound like a description of me … once upon a time.
Best record: 36 hours from description of requirements to completion of project (no sleep). Deadline was 48 hours – you would think I would have received a bonus for that one, especially since I had not been hired to write software and I was sick. All I received was a lecture from my doctor for doing something so stupid. The company managed to get a contract worth something in the neighborhood of 100k per month, and the general manager received a bonus (Go figure).
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
|
Just to make it clear, I don't think that the intention of the question is whether we unit test our code using a formal framework such as nUnit. A lot of times I find it simpler to use Debug.WriteLine / Console.WriteLine / Trace.WriteLine or to simply view the output on the screen to unit test my code that I know won't change much (or at all). Other times I may opt to use a formal unit test using nUnit where it makes sense. With this clarification, I believe that most people unit test their code and the stats here may not be correct due to people confusing unit testing with writing / executing formal tests.
Muhammad Haroon
Thoughtful discussions about software design, development, and management, using Microsoft and related tools and technologies.
|
|
|
|
|
/signed
We don't suffer from insanity, we enjoy every minute of it!
|
|
|
|
|
C# Genius wrote: Re: Unit Testing Not Equal To
I wrote that I never unit test. As I never use any formal unit test suite, however I do have a built in log system (in all my applications) that records every error, warning, outputs values... I also do have some test routines for some of my lower level code that will yell if they are get the wrong result for that case but this is only for a small fraction of the code and does not appear to be at as low a level as unit tests.
John
|
|
|
|
|
Most of the problems come from house-of-cards apps built long ago by others.
Anything new gets tested.
He was a snowflake, like other "unique" snowflakes, falling down, getting stepped on, and pushed aside to disappear.
|
|
|
|
|
Never mind the official title, who could (or would) build an app without testing the methods as they go along?
I suppose one could dump out 60,000 - 70,000 lines and then expect it all to work, but it would seem to be natural to test the all of its several parts, if for no other reason, then to fein sanity.
Balboos
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
|
|
|
|
|
depends what you class as testing?
i know people who test every function, spend ages on each function ensuring that its 100% functional and covers all possible errors and handles them.
others will just hack the code out hit (f5'run') fix syntax bugs and compiler bugs then says its alright. sure it works but isnt going to be stable.
myself i try to do the first one but when in a team its very hard, even if your the boss and you make sure that your dev's know they should do proper coding and testing someone will miss something just due to rushing or hacking code out.
thats why we have QA testing team who i make sure i dont get emails from lol
|
|
|
|
|
I could not agree more! I always ran my own tests constantly while building applications even before I knew what the names of the different testing types where. The best person to test the individual pieces of code is the developer of that code. Of course as a matter of pride, I do my best to avoid any errors in my code and am more than happy to let someone else try to break it. If there is something wrong, then I want to know no matter who finds the problem.
Those who try to hide problems are fools and only hurt themselves in the long run.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
My younger brother spends much of his free time working on his house (go figure?). Anyway, there's an old adage he quotes which can be applied to doing testing as one goes along:
Measure Once - Cut Twice.
- or -
Measure Twice - Cut Once.
The irreversability of the cutting in the physical world may, perhaps, be related to the brown stains on ones reputation when their buggy application falls apart because ego precluded testing one's own code.
Another somewhat wise saying (am I going to get a reputation for this?):
"If you can't find the time to do it right the first time . . . how are you going to find the time to do it again?"
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
|
|
|
|
|
I think it’s a good reputation to have.
Now if we can just convince the management that: If you do not give us the time to do it right the first time . . . it will cost you more in the long run.
That is an old battle that I became tired of fighting a long time ago, I learned to say the heck with it. I just warn them and walk away. The only thing that surprises me is when I do not get the call confirming I was right; that is very rare.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
As of Mon 23-Apr 7:40am ET, the majority of respondents (26.92%) say they never unit test! How do they sleep at night?
/ravi
|
|
|
|