|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 | Next > |
|
|
Are you really using JUnit during your development?I've written JUnit cases for over 1 month.
I have to say it's fun to do the implement coding. But it's suffering to write JUnit cases. Because: 1. I need to know the correct result from the other way around and sometimes it's hard to find another way. 2. Database and JSP pages are difficult to JUnit test. 3. Mock objects brings more than double efforts during the whole develop process. 4. Exception situation is not so easy to make as JUnit claims. 3 friends in 3 different companies (small size and middle size company) complain JUnit as: 1. They planned JUnit testing firstly and they cannot keep it going. TIME reason? 2. It consumes a lot of time but hard to find big problems. JUnit does find small problems as we expected. 3. JUnit testing is not effcient enough. 4. Best JUnit tester is the senior software developer. But senior guys hate to write test cases. 5. For small company, it's really hard to choose between JUnit+develop and develop+functional testing. Is there anyone who is successful in deploying JUnit during develop as: JUnit + code + JUnit + code + System Testing? |
|
|
Re: Are you really using JUnit during your development?I found some interesting reasons here!
http://www.nabble.com/Is-Junit-based-testing-REALLY-possible-for-commercial-software-development---tf1095747.html |
|
|
Re: Are you really using JUnit during your development?On 8/2/06, Jean <2004jing.lei@...> wrote:
> Is there anyone who is successful in deploying JUnit during develop as: > JUnit + code + JUnit + code + System Testing? > Yes. Every day. You're right - some things are easier to unit test then others. I'm not perfect, and I'm still learning. But, I'm doing it (and have been for six years now). Cheers! Carl -- http://genomescampaigns.blogspot.com [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?On 8/2/06, Carl Hume <carl.hume@...> wrote:
> > On 8/2/06, Jean <2004jing.lei@...> wrote: > > > Is there anyone who is successful in deploying JUnit during develop as: > > JUnit + code + JUnit + code + System Testing? > > > > Yes. Every day. > > You're right - some things are easier to unit test then others. I'm not > perfect, and I'm still learning. But, I'm doing it (and have been for six > years now). Like Carl for over six years using JUnit/NUnit (for .NET) work. Its hard work at first but gets easier with time. J.B. Rainsberger's book Junit recipes ( http://www.amazon.com/gp/product/1932394230/104-6174901-2999136?v=glance&n=283155) is a great to get up to speed quickly. However nothing replaces practice. Try, fail, learn, try again. Cheers Mark Levison [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?That's got me beat. I've only been using it regularly for four years.
[Hangs head in shame!] As a technical lead and now a mentor, I don't cut code every day (meetings ... pah!), but when I do cut code, I test most everything I write. Over the past four years of writing tests, the time taken to write individual tests goes down, and the reliability of my code goes up. Sounds like a good long term trend to me. :-) Simon -- www.simonpeter.org On 8/2/06, Carl Hume <carl.hume@...> wrote: > On 8/2/06, Jean <2004jing.lei@...> wrote: > > > Is there anyone who is successful in deploying JUnit during develop as: > > JUnit + code + JUnit + code + System Testing? > > > > > > > Yes. Every day. > > You're right - some things are easier to unit test then others. I'm not > perfect, and I'm still learning. But, I'm doing it (and have been for six > years now). > > Cheers! > Carl > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?On 8/2/06, Jean <2004jing.lei@...> wrote:
> > > > I have to say it's fun to do the implement coding. But it's suffering to > write JUnit cases. Don't feel bad, your situation is pretty common in my experience. The important thing is to realize that tests are important and always do your best to make them part of your development process. We all know that in the real world, sometimes, other tasks take precedence. Just exercise your judgment, put testing in the backseat when the circumstances warrant it (tight deadline, angry customer, etc...) but always remember to get back to them and pay your technical debt whenever you get a chance. -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?On 8/2/06, Jean <2004jing.lei@...> wrote:
> > Is there anyone who is successful in deploying JUnit during develop as: > JUnit + code + JUnit + code + System Testing? > -- It's tempting to start a new thread asking if there is anyone NOT using junit during development ;-) ... but that probably wouldn't help you much. If there is a single big secret to being successful with JUnit it is virtuous circle of : testability -> more tests -> more testability -> more tests Three or four times around this loop and you will probably also wonder how you ever managed without unit tests. Many newcomers to automated unit tests expect to be able to test their code with no changes or are reluctant to make changes /just/ to make it easier to test... they often give up on the whole deal because they find it too hard. I blogged about this a while back : http://www.developertesting.com/archives/month200401/20040116-WhyIsSoftwareSoHardToTest.html Kevin Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?On 8/2/06, Kevin Lawrence <kev.lawrence@...> wrote:
> > > It's tempting to start a new thread asking if there is anyone NOT > using junit during development ;-) Not everybody uses JUnit, you know... Three or four times around this loop and you will probably also wonder > how you ever managed without unit tests. The problem is usually more along the lines of "How can I manage with unit tests?". As the original poster pointed out, the reality depicted in books about testing is very different from the real world, and practical advice for that is fairly scarce (yes, I read Michael Feather's book). Many newcomers to automated unit tests expect to be able to test their > code with no changes or are reluctant to make changes /just/ to make > it easier to test... they often give up on the whole deal because they > find it too hard. That's one reason, there are plenty of others, such as "We're approaching a deadline and I have to add this feature for our customer, so I'll do that instead of adding a test". -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?Cédric Beust ♔ wrote:
> > On 8/2/06, Jean <2004jing.lei@... > <mailto:2004jing.lei%40gmail.com>> wrote: > > > > I have to say it's fun to do the implement coding. But it's suffering to > > write JUnit cases. > > Don't feel bad, your situation is pretty common in my experience. > > The important thing is to realize that tests are important and always do > your best to make them part of your development process. We all know that > in the real world, sometimes, other tasks take precedence. Just exercise > your judgment, put testing in the backseat when the circumstances warrant it > (tight deadline, angry customer, etc...) but always remember to get back to > them and pay your technical debt whenever you get a chance. I'd have to admit that I find coding the /tests/ quite interesting and challenging in their own right. Here are just some of the things that testing has introduced me to, which I may never have otherwise come across: * java.lang.reflect.Proxy - awesomely powerful. 99% of what you need it for is covered by mock objects, but for that remaining 1%, it's indispensible * Jetty (www.mortbay.org) - I've got network utility tests that stand up an embedded Web server to serve content. One example is a wrapper around java.net.URL that verifies content types (e.g. MIME types). Its test pretty much requires a live Web server to vend the appropriate content. * java.lang.AccessibleObject.setAccessible(boolean) - the subject of a recent thread here * code correctness tools (PMD, findbugs, checkstyle) - technically not limited to testing, but that's how I got exposed to it * dependency injection * and many more Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?On 8/2/06, Cédric Beust ♔ <cbeust@...> wrote:
> On 8/2/06, Kevin Lawrence <kev.lawrence@...> wrote: > > > > > > It's tempting to start a new thread asking if there is anyone NOT > > using junit during development ;-) > > > Not everybody uses JUnit, you know... > I know. I was assuming that the OP was using 'junit' to mean 'an automated unit test framework'. I could have made that clearer. Kevin Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
|
|
|
Re: Re: Are you really using JUnit during your development?Hi Rob,
On 8/2/06, Robert Martin <UncleBob@...> wrote: > > > The argument about "TIME" is laughable. It is like saying that we > don't have time to test, but we DO have time to debug. You seem to imply that there are only two kinds of code: - Code that is tested and works - Code that is not tested and doesn't work There is actually something in the middle: it's called "Code that is not tested but that works". It's a fairly common occurrence, in my experience, and the reason behind my comments earlier: if other circumstances warrant it, it's okay to write the code, ship it and write the tests later. Just use your judgment, that's why your employer is paying you. -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?Jean wrote:
> I've written JUnit cases for over 1 month. That's great! > I have to say it's fun to do the implement coding. But it's suffering to > write JUnit cases. Because: > 1. I need to know the correct result from the other way around and sometimes > it's hard to find another way. I understand, but if you don't know the correct result before you write the code, then how do you know if you're writing the code correctly? > 2. Database and JSP pages are difficult to JUnit test. Yes, they are. > 3. Mock objects brings more than double efforts during the whole develop > process. Compared to what? > 4. Exception situation is not so easy to make as JUnit claims. Can you give us an example, because I find it quite easy. > 3 friends in 3 different companies (small size and middle size company) > complain JUnit as: > 1. They planned JUnit testing firstly and they cannot keep it going. TIME > reason? If you do not need to do it correctly, then don't write tests. For decades, programmers have pretended that writing correct code is not part of their job. They are wrong, and have always been wrong. > 2. It consumes a lot of time but hard to find big problems. JUnit does find > small problems as we expected. I find this interesting: but finding all the small problems, there are very few big problems. http://c2.com/cgi/wiki?RidiculousSimplicityGivesRidiculousResources Can you give us an example of a big problem that programmer testing with JUnit didn't help you/them find? > 3. JUnit testing is not effcient enough. In what way is it not efficient enough? What more of something do you expect to get with the same amount of time? > 4. Best JUnit tester is the senior software developer. But senior guys hate > to write test cases. Senior guys don't have the responsibility to write correct code? > 5. For small company, it's really hard to choose between JUnit+develop and > develop+functional testing. There are many small teams (6-8 people) doing /all three/ effectively, so perhaps there are some other interesting problems to try to solve there. > Is there anyone who is successful in deploying JUnit during develop as: > JUnit + code + JUnit + code + System Testing? I'd like to hear stories from other JUnit users, of course. -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?Cédric Beust ♔ wrote:
> On 8/2/06, Jean <2004jing.lei@... > <mailto:2004jing.lei%40gmail.com>> wrote: > > > > > > > > I have to say it's fun to do the implement coding. But it's suffering to > > write JUnit cases. > > Don't feel bad, your situation is pretty common in my experience. I forgot to say something like this, and it's important: we all have felt the same thing. > The important thing is to realize that tests are important and always do > your best to make them part of your development process. We all know that > in the real world, sometimes, other tasks take precedence. Just exercise > your judgment, put testing in the backseat when the circumstances warrant it > (tight deadline, angry customer, etc...) but always remember to get back to > them and pay your technical debt whenever you get a chance. Indeed. It takes time, but the investment is worth it: for the rest of you life, after you master the basics of programmer testing, you will write better code, sooner and you'll spend less time fixing it. It's great. -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?Cédric Beust ♔ wrote:
> On 8/2/06, Kevin Lawrence <kev.lawrence@... > <mailto:kev.lawrence%40gmail.com>> wrote: > > > > > > It's tempting to start a new thread asking if there is anyone NOT > > using junit during development ;-) > > Not everybody uses JUnit, you know... "It's tempting to start a new thread asking if there is anyone NOT /doing programmer testing/ while programming." > The problem is usually more along the lines of "How can I manage with unit > tests?". As the original poster pointed out, the reality depicted in books > about testing is very different from the real world, and practical advice > for that is fairly scarce (yes, I read Michael Feather's book). Which reality depicted in which books is different from what real-world experience? Also, if practical advice seems scarce, I venture it's for two reasons: 1. It's not easy. 2. Once someone like Feathers writes about it, there's no real need to duplicate it. > That's one reason, there are plenty of others, such as "We're approaching a > deadline and I have to add this feature for our customer, so I'll do that > instead of adding a test". I have felt that pain. Implementing /any/ change program, such as changing the way you write code, is not a good idea when you're approaching a deadline. That's why I have found two key ways to introduce programmer testing into a programmer's practice: 1. by working on a side-project where there are no immediate deadlines, such as something open source or personal, OR 2. by working on a desperate project where it couldn't get much worse--if you spend 2 weeks trying to write tests and don't get anywhere, that's fine, because 2 weeks trying to add to a horrible codebase probably wouldn't have helped, either. I happened to do #2 instead of #1. Some people tell me #1 has worked for them, too. Take care. -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Cédric Beust ♔ wrote:
> >You seem to imply that there are only two kinds of code: > > - Code that is tested and works > - Code that is not tested and doesn't work > >There is actually something in the middle: it's called "Code that is not >tested but that works". > > Michael Feathers www.objectmentor.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?On 8/2/06, Michael Feathers <mfeathers@...> wrote:
> > Cédric Beust ♔ wrote: > > > > >You seem to imply that there are only two kinds of code: > > > > - Code that is tested and works > > - Code that is not tested and doesn't work > > > >There is actually something in the middle: it's called "Code that is not > >tested but that works". > > > > > How do you know? ;-) Because a lot of software companies are still in business and I know for a fact they don't do a lot of testing :-) -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Are you really using JUnit during your development?Jean,
Thanks for sending your message. Every tool manages to frustrate some people, even JUnit. :-) But it's very valuable to get feedback from frustrated users who are still trying to make things work. You have a lot of specific questions, and if you choose to highlight one at a time, I think you'll get some really good answers from this community. But I was struck by your first real statement: "I have to say it's fun to do the implement coding. But it's suffering to write JUnit cases." It made me think a lot. I got into JUnit because I really _liked_ writing test cases. But I really respect some people that have been really frustrated, like you are. Is there more going on here than personal preference? I think there might be. I thought a lot about it, and, sadly, wrote even more. Rather than burden the list with it, I've moved my thoughts over to my tech blog: http://shareandenjoy.saff.net Good luck, David Saff Jean wrote: > I've written JUnit cases for over 1 month. > > I have to say it's fun to do the implement coding. But it's suffering to > write JUnit cases. Because: > 1. I need to know the correct result from the other way around and sometimes > it's hard to find another way. > 2. Database and JSP pages are difficult to JUnit test. > 3. Mock objects brings more than double efforts during the whole develop > process. > 4. Exception situation is not so easy to make as JUnit claims. > > 3 friends in 3 different companies (small size and middle size company) > complain JUnit as: > 1. They planned JUnit testing firstly and they cannot keep it going. TIME > reason? > 2. It consumes a lot of time but hard to find big problems. JUnit does find > small problems as we expected. > 3. JUnit testing is not effcient enough. > 4. Best JUnit tester is the senior software developer. But senior guys hate > to write test cases. > 5. For small company, it's really hard to choose between JUnit+develop and > develop+functional testing. > > Is there anyone who is successful in deploying JUnit during develop as: > JUnit + code + JUnit + code + System Testing? > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Not doing testing (was: Re: Re: Are you really using JUnit during your development?)Cédric Beust ♔ wrote:
> On 8/2/06, Michael Feathers <mfeathers@...> wrote: > >> Cédric Beust ♔ wrote: >> >>> You seem to imply that there are only two kinds of code: >>> >>> - Code that is tested and works >>> - Code that is not tested and doesn't work >>> >>> There is actually something in the middle: it's called "Code that is not >>> tested but that works". >>> >> How do you know? ;-) >> > Because a lot of software companies are still in business and I know for a > fact they don't do a lot of testing :-) > This thread has, in my opinion, already veered away from the original poster's question, which seemed to be more about whether it was valuable to use JUnit at all, rather than whether we should use any kind of testing, JUnit or not, or whether we should test all the time, or just most of the time. But since we're already in this territory... I recently had the great pleasure of reading the entirety of DeMarco and Lister's _Peopleware_ in a single day (half of it on the beach, no less). One idea from the book really struck me. I don't remember the exact wording, so I'll inaccurately paraphrase it: "companies that merely want to keep their best customers can make do with less quality than those that want to keep their best employees." Customers only want good-enough products. Your best employees are only really satisfied with rock-solid products that they're proud to show their kids. Of course, companies that begin losing their best employees won't be able to keep their best customers forever... This is a provocative statement, and I'm not sure if I really believe it yet. If it is true, then how does this impact how we think about software testing? David Saff Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Not doing testing (was: Re: Re: Are you really using JUnit during your development?)Hi David, and thanks for stepping in.
On 8/2/06, David Saff <saff@...> wrote: > This thread has, in my opinion, already veered away from the original > poster's question, which seemed to be more about whether it was valuable > to use JUnit at all, rather than whether we should use any kind of > testing, JUnit or not, or whether we should test all the time, or just > most of the time. But since we're already in this territory I'm not sure we moved away from the original topic. The original poster was basically asking "I don't like writing tests, I don't always to test driven design, is it bad?". The traditional answer to this question on this mailing-list is "Yes" and "I do 100% TDD and it works great, what's wrong with you?". My experience differs. I don't always do TDD and I claim that very few people do. It doesn't mean that their software is worthless or that they are bad developers. As you very insightfully point out, the taste for testing is very personal. Some people love it. Some people hate it. Most people don't feel very strongly either way, but they do have customers, deadlines and inflexible bosses to respond to. And I think it's our duty to listen to them and help them out. I'll just repeat what I said in my previous email: most of the software out there is 1) not tested and 2) works great. I'd like everybody to reflect on that for a while before I send my next message... -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
| < Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |