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.
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
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 didnt use any UNIT test, i did all the testing by myself as a user.
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
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
SCJP, SCJD, SCWCD, SCBCD
Terry Martinson
Ranch Hand
Joined: Oct 18, 2003
Posts: 293
posted
0
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 Krebs
Ranch Hand
Joined: Nov 27, 2002
Posts: 451
posted
0
Jay, I did not submit my test code.
Terry Martinson
Ranch Hand
Joined: Oct 18, 2003
Posts: 293
posted
0
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
Ken Krebs
Ranch Hand
Joined: Nov 27, 2002
Posts: 451
posted
0
TJ, I did write a multithreading test but it wasn't a JUnit test. [ January 22, 2004: Message edited by: Ken Krebs ]
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.
SJCP 1.4<br /> <br />"Go in there and do the best you can. That's all you can do."<br />Tiger Woods<br /> <br />"Practice is the best of all instructors."<br />Publilius Syrus (b. 42 AD)
Jay Bromley
Ranch Hand
Joined: Aug 09, 2003
Posts: 48
posted
0
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
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Anybody using developing their project and adding UNIT Tests?