aspose file tools*
The moose likes Testing and the fly likes JUnit for SCJD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JUnit for SCJD" Watch "JUnit for SCJD" New topic
Author

JUnit for SCJD

Russell Wurth
Greenhorn

Joined: Jul 12, 2004
Posts: 20
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

Joined: Aug 05, 2004
Posts: 87
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.


Author of <a href="http://www.amazon.com/exec/obidos/ASIN/1932394230/ref=jranch-20" target="_blank" rel="nofollow">JUnit Recipes: Practical Methods for Programmer Testing</a>
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30321
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Chris Gastin
Ranch Hand

Joined: Aug 13, 2002
Posts: 51
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


Chris Gastin<br />SCJP 1.4<br />SCWCD 1.3
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
+1 for using JUnit in your SCJD assignment, but I'd recommend not including the test code as part of your submission.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Lasse Koskela:
I'd recommend not including the test code as part of your submission.


Interesting - why?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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

Joined: Nov 07, 2003
Posts: 4982
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


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Eusebio Floriano
Ranch Hand

Joined: Mar 07, 2004
Posts: 235
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,


SCJP 1.4 / 5.0 - SCBCD 1.3 - SCWCD 1.4 - IBM 484
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
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


Java Regular Expressions
Eusebio Floriano
Ranch Hand

Joined: Mar 07, 2004
Posts: 235
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

Joined: Jul 04, 2003
Posts: 1312
Material
JUnit Primer

JUnit Start Guide

JUnit with Eclipse IDE


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
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....


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JUnit for SCJD