aaronjkoenes / rapidrider

Automatically exported from code.google.com/p/rapidrider
0 stars 0 forks source link

There are no JUnit tests #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
JUnit tests were part of the requirement for Elaboration II, but we don't
have any JUnit tests yet.

Original issue reported on code.google.com by anyninbign@gmail.com on 8 Nov 2008 at 11:09

GoogleCodeExporter commented 9 years ago
An update on the progress of this issue:

There are several unit testing frameworks to choose from:
  * J2MEUnit.  The A Team has gone with this one.  It looks like a decent option.
  * JMUnit.  This looks quite similar to J2MEUnit.  I don't know which one I would
prefer.  JMUnit supports more assertion types than J2MEUnit.  I don't know how 
much
that matters though.
  * MoMEUnit.  I don't know much about this option.  I think it is like J2MEUnit with
a bit of stuff added.
  * CLDCUnit.  This might actually be a good option.
  * Mobile JUnit.  This was created by Sony Ericsson and seems pretty nice.  However,
it is not open source and is only developed for Windows.  I almost got it to 
work for
me, but there is a problem in one of the classes.  If I had the source, it 
would be
an easy fix (the code forgets to call Process.waitFor() at a certain spot, I 
think.)
  * Regular old JUnit.  This might be the best and simplest testing solution after
all.  The other frameworks allow the tests to be run on the device itself.  I 
don't
really know how valuable that is.  If we want to use JUnit 4.0, then the tests 
will
need to have their own project.  It seems like it might be possible to include 
JUnit
tests in the same project if we use JUnit 3.8.1, but I am not sure.  Right now, 
I get
validation errors with the tests in the RapidRider project.  It would annoy me 
to
have the tests in a different project, but I might be able to get over that.

So, if anyone else has an opinion about this, I would be happy to hear it. 
Otherwise, I will figure something out sometime.

Original comment by rabbits...@gmail.com on 16 Nov 2008 at 9:57

GoogleCodeExporter commented 9 years ago
I have added _a_ unit test.  It is in a separate project and uses JUnit 3.8.1.

I have gotten Mobile JUnit to work.  I can run Mobile JUnit tests from the 
command
line or from Ant build files.  But Eclipse thinks there are errors sometimes, 
and I
don't know why.  And it would be hard to share files for running those tests.  
Also,
the output of failed tests is not very informative.  So, at least for now, I am 
not
going to go with Mobile JUnit.

Original comment by anyninbign@gmail.com on 17 Nov 2008 at 6:13

GoogleCodeExporter commented 9 years ago
Another update:

I have found another project that is at least related to testing.  cqME.  It 
looks
well supported, but I am having a hard time understanding what it really is.

Also, I think we should consider switching to NetBeans.  Team C is using 
NetBeans. 
NetBeans is another IDE like Eclipse.  It is already installed in the lab, and 
it
supports JMUnit well.  I will look into this further.

Original comment by anyninbign@gmail.com on 17 Nov 2008 at 11:53

GoogleCodeExporter commented 9 years ago
I have written more JUnit tests.

Original comment by anyninbign@gmail.com on 13 Dec 2008 at 11:05

GoogleCodeExporter commented 9 years ago
Comment about comment number 2:
Mobile JUnit actually does provide more output than what I first thought it 
did. 
There is an "errors" tab that I must not have noticed before which provides 
details
on why tests failed and such.  It would be nice if that information was also 
written
to standard output.

So, it looks like the project will stick with regular old JUnit.

I just added some tests to the server code.  They are a little bit WATERY (Why 
All
That Extra Repetition Yo?), as opposed to DRY (Don't Repeat Yourself).  Some 
classes
are found in both the client code and the server code, with slight variations.  
The
same is true of the tests.

The tests are in the default package, just like all of the server side code is. 
 I
tried moving the code around, but couldn't get the servlet to work when it is 
not in
the default package, even after messing with the .packaging file and other 
settings.
 This is almost as annoying as having the tests in a separate project... Apparently,
if we were using Java 1.3 on the server side, then code in a package (such as 
"test")
could reference code in the default package, but that doesn't work in Java 6.

I also couldn't figure out how to test the code in the servlet.  When I tried 
to use
the RapidRiderServlet class, I got the complaint "Can't find bundle for base 
name
javax.servlet.http.LocalStrings."  I don't really know how to fix that.

Some of the other testing options still seem like the might be worth figuring 
out. 
But we are basically out of time.

Original comment by anyninbign@gmail.com on 15 Dec 2008 at 4:19