This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

JUnit for SCJD

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 40797
829
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
town drunk
( and author)
Posts: 4118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Material
JUnit Primer

JUnit Start Guide

JUnit with Eclipse IDE
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic