[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Running JUnit tests that use a debugging workspace

There should be both a Junit launch configuration and a "JUnit Test Plugin" launch configuration. The JUnit config will not work, but the JUnit Test Plugin should.
The only other catch I have run into with running junit tests is that you have to have all the plugins in your workspace, but if you are getting to the point that the tests are actually running and failing to get the workspace then you must have that setup. In the launch configuration what application is it using (I am using org.eclipse.pde.junit.uitestapplication, but I just checked and the org.eclipse.pde.junit.coretestapplication also seems to work for me.. )
Are you seeing anything in your .log or console?
-Peter
Amer, Hoda wrote:


Peter,


I do have the plugin installed and I have tried the JUnit launch
configuration. In the JUnit launch configuration, I direct it to run the
set
of tests under org.eclipse.cdt.core.model.tests, and they all fail to
obtain
the work space. My question is how to setup a debugging workspace. Are
there
any special settings for that? Thanks,
Hoda


-----Original Message-----
From: Peter Graves [mailto:pgraves@xxxxxxx] Sent: Monday, March 03, 2003 5:25 AM
To: cdt-dev@xxxxxxxxxxx
Subject: Re: [cdt-dev] Running JUnit tests that use a debugging
workspace


You will need to get the org.eclipse.pde.junit plugin from:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/plug
ins/
org.eclipse.jdt.junit/index.html


and then you can create a Junit Test Plugin launch configuration which should let you get access to the workspace.
Hope this helps,
-Peter


Amer, Hoda wrote:

Hello All,

I am trying to write a JUnit test that needs to use a workspace. I
noticed
that the tests under the org.eclipse.cdt.core.model.tests package do
this in
setup(). I tried to run these tests through the JUnit Launch
Configuration,
but all fail when trying to get the workspace: workspace= ResourcesPlugin.getWorkspace();
root= workspace.getRoot();
Null pointer exception (workspace = null)!
So what is the proper way for running these tests? Is there anything
special
to do to setup a debugging workspace?


Appreciate your help,
Hoda

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev




_______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx http://dev.eclipse.org/mailman/listinfo/cdt-dev _______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx http://dev.eclipse.org/mailman/listinfo/cdt-dev