• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JUnit for SCJD

 
Russell Wurth
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm currently doing my SCJD project and have never written any complex test programs.

Is it worth my while to learn and implement JUnit for my SCJD project? If so, where is a good place that I can go for a quick-and-dirty intro to JUnit?

Russell
 
J. B. Rainsberger
author
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it's worth using JUnit on any project, /especially/ a greenfield project.

For a quick intro, go to http://tinyurl.com/35ozn

Good luck, and if you have questions as you go, come to the JUnit Yahoo! group. A lot of us hang out there.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
377
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Russell,
After you read JBs intro, check out the getting started guide. I always find it helpful to read two tutorials to feel more comfortable with a topic.
 
Chris Gastin
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started using Junit Test with my data layer for the SCJD. This proved to be very useful. epspecially when I started making changes to the code. I would reccommend using JUnit tests since you do not have a QA person to test your app, and after forking out $250 for the project you don't want to fail for some stupid testing error
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
+1 for using JUnit in your SCJD assignment, but I'd recommend not including the test code as part of your submission.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:
I'd recommend not including the test code as part of your submission.


Interesting - why?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because they don't want you to send any 3rd party libraries and they want the code to be compilable out-of-the-box or something along those lines. I believe the assignment instructions said something like that.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition, even you can submit the testing code together with JUnit.jar, it is still not recommended to do so, becos, the instrctions clearly stated that: You wont receive any bonus points for additional features, but marks will be deducted if there are any errors discovered within the additional features.

Thus, it is not worth to do something that may result in mark deduction.

Nick
 
Eusebio Floriano
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally from sun�s site http://suned.sun.com/US/catalog/courses/CX-310-252A.html

The following APIs and facilities may not be used:
# Enterprise JavaBeans
# Servlets, JSP technology, or any other web-oriented APIs
# NIO, the New IO facilities
# Java DataBase Connectivity (JDBC) and SQL
# Java IDL API and CORBA
# Third party software libraries or tools (such as browsers)


SO definitely, you can submit your assigment with JUnit classes.
You could use it only in your development time.

Regards,
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you can't, nor should you.

Submitting JUnit tests, or leaving any trace of thier existance in your code, is an excellent way to fail the exam.

M
 
Eusebio Floriano
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I getting started with unit tests.
I would like to know where i could start.

There are so many materials on internet that i got a little confused.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Material
JUnit Primer

JUnit Start Guide

JUnit with Eclipse IDE
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by somkiat puisungnoen:
Material
JUnit Primer

JUnit Start Guide

JUnit with Eclipse IDE


Originally posted by Vinicius Boson:


There are so many materials on internet that i got a little confused.

JUnit Primer is for introduction to JUnit in general.

JUnit Start Guide is for getting into real testing using JUnit.

JUnit with Eclipse IDE is, as the name says, for some tips of using JUnit in Eclipse IDE.

Hope it helps....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic