I was curious, if anybody was creating UNIT tests for their application as they were developing it (i.e. JUnit TestCases)? If so, did you find it beneficial for your SCJD project?
I did create unit tests for my key classes and was very glad I did as it allowed me to improve my design and coding by refactoring it over and over again with confidence that I hadn't broken anything in the process. Speaking about JUnit: "Never in the field of software development was so much owed by so many to so few lines of code" - Martin Fowler This is so true.
Mark, I too am using JUnit and a couple of custom classes to do unit tests. It's really good for peace of mind. Like Ken said, you can change something, even radically, then retest it. If it still works you're all good. One question for Ken: Did you include your test classes in your uploaded project? I'm not intending to do this, does that sound ok? Regards, jb
I have a custom class to do the testing of my Data class methods. JUnit would probably have been better, but the custom class works fine for me. I also do manual user testing of the application in both network and standalone modes. The custom class test is a lifesaver though. TJ
Billy - Did you do any type of multithreaded test as a unit test? Or just the manual testing you mention above? I know you passed recently, so I was just wondering. TJ
Ken - Did you do a multithreaded unit test to pound the data manipulation methods? Just curious - I have a question posted out here at this url and it's not getting any response. I would love to hear your 2 cents worth. TJ
I'm using junit and junitperf. I've copied the junitperf loadTest from some other thread in this forum. My unit testcase which can run on it's own (AND is succesfull in both tests)
The performance tests which starts 50 clients at the same time and does a 1 time only setup/teardown. WithLock->succes | WithoutLock->fails (as expected)
[ January 22, 2004: Message edited by: Roel De Meester ]
Originally posted by Jay Bromley: Mark, I too am using JUnit and a couple of custom classes to do unit tests. It's really good for peace of mind. Like Ken said, you can change something, even radically, then retest it. If it still works you're all good. One question for Ken: Did you include your test classes in your uploaded project? I'm not intending to do this, does that sound ok? Regards, jb
Jay do no include Testing in your code I've been reading about JUnit and "JUnit In Action" says that you should just use JUnit testing for your internal testing needs, kind of like to simulate the actual customer of your product. Hope this helps.
Ken and Dev, THanks for confirming my suspicions about not submitting test code. I didn't want to do so, because my test code is not as "pretty" as the Sun Coding Conventions might want them to be, but I wasn't sure if the grader might be interested in them. Thanks and regards, jb
Post by:autobot
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
a bit of art, as a gift, the permaculture playing cards