I have a simple project and I have created a TestCase. I can run it with Tools/Test Current Document, but if I click "Test Project" it gives a popup that says "There are no compiled JUnit TestCases available for execution." All files are compiled and the TestCase is part of the project.
What am I doing wrong?
A tar file of the source and project file is attached. The test case is HandTest.
Version info:
DrJava Version : 20080112-0033
DrJava Configuration file: /Users/charlie/.drjava
Mac OSX 10.4.11
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
Java HotSpot(TM) Client VM (build 1.5.0_13-121, mixed mode, sharing)
tar file of source and pjt file
Logged In: YES
user_id=430590
Originator: NO
There is a bug in recent releases of DrJava that prevents it from seeing the TestCase class files if you run unit tests without compiling the open files first. I presume that this is the bug that you are encountering. You should be able to work around it by always explicitly compiling the files before testing them. This bug has been fixed in the current build, which I just made available as a jar file (the July 15, 2008 version) at the website http://www.cs.rice.edu/~javaplt/drjavarice/. Please try downloading this build to determine if it still has the same bug. If you have problems with this new build please post a follow-up comment.
Logged In: YES
user_id=582350
Originator: YES
The problem persists with the July 15 release. I still get the exact same behavior.
To elaborate slightly, after compiling the project and hitting the Test Project button I get three pop-ups.
1. "To unit test all documents you must first compile all out of sync source files... (Yes/no to recompile)
2. "All open files must be compiled before running a unit test." (ok)
3. "There are no compiled JUnit TestCases available..." (ok)
Am I just doing something wrong?
Logged In: YES
user_id=1075744
Originator: NO
I have seen this behavior before:
https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1657550&group_id=44253
Is one of your Java files empty, or does it not contain a class with the same name as the file? DrJava has a problem with empty Java files, or with a file named A.java, for instance, that doesn't contain a public class A { ... }
Logged In: YES
user_id=582350
Originator: YES
There are no empty files or misnamed files. The tar file is attached to my original submission.
Work-around
Logged In: YES
user_id=1075744
Originator: NO
Sorry, I didn't see the attachment. This problem has been documented as:
[ 1884764 ] JUnit fails with enumerated type open
http://sourceforge.net/tracker/index.php?func=detail&aid=1884764&group_id=44253&atid=438935
We'll look at the problem today. In the meantime, you can wrap the enum into a top-level class:
public class SuitClass {
public static enum Suit { ... }
}
I have attached a modified version of your code that demonstrates this work-around. I apologize for the inconvenience and let you know once we have fixed this problem.
File Added: gin2.tar
Logged In: YES
user_id=1075744
Originator: NO
I just fixed this problem. It will be available in the next release, which we expect to be released in the next few weeks. In the meantime, I have made an internal release available to you:
http://www.cs.rice.edu/~javaplt/drjavarice/drjava-071508.jar
Please let us know if you still run into any problems. Thanks for using DrJava!
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).