| Running JUnit Plugin Tests from outside eclipse? [message #205442] | 
Tue, 17 April 2007 08:24   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi All, 
 
I have some plugins that have associated JUnit tests. I can kick off these  
tests via the Run.. Junit Plugin Tests command. AS I understand it, this  
kicks off a new JVM and Workbench, etc and then runs the tests on that.  
 
Is it possible to kick off Junit Plugin tests from outside an eclipse  
workbench? I'd like to include these plugin unit tests in our test bucket,  
but this obviously requires some automation of the test invocations 
 
Many Thanks 
 
Andy
 |  
 |  
  | 
| Re: Running JUnit Plugin Tests from outside eclipse? [message #205450 is a reply to message #205442] | 
Tue, 17 April 2007 08:29    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: merks.ca.ibm.com 
 
This is a multi-part message in MIME format. 
--------------010509080706000103060108 
Content-Type: text/plain; charset=ISO-8859-15; format=flowed 
Content-Transfer-Encoding: 7bit 
 
Andrew, 
 
If you look at the debug view for the JUnit process you've just run, you  
can right click to see the properties and that shows how to invoke this  
same thing from the command line.  E.g., 
 
     D:\sandbox\3.3M6\eclipse\jre\bin\javaw.exe -classpath 
     D:\sandbox\3.3M6\eclipse\plugins\org.eclipse.equinox.launche r_1.0.0.v20070319.jar 
    org.eclipse.equinox.launcher.Main -version 3 -port 3303 
    -testLoaderClass 
     org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoade r 
    -loaderpluginname org.eclipse.jdt.junit.runtime -classNames 
    com.example.library.tests.LibraryAllTests -application 
    org.eclipse.pde.junit.runtime.coretestapplication -data 
    D:\sandbox\3.3M6\eclipse\eclipse\plugins/../junit-workspace 
    -configuration 
     file:D:/sandbox/3.3M6/eclipse/eclipse/plugins/.metadata/.plu gins/org.eclipse.pde.core/pde-junit/ 
    -dev 
     file:D:/sandbox/3.3M6/eclipse/eclipse/plugins/.metadata/.plu gins/org.eclipse.pde.core/pde-junit/dev.properties 
    -pdelaunch -os win32 -ws win32 -arch x86 -testpluginname library.tests 
 
 
Andrew Borley wrote: 
> Hi All, 
> 
> I have some plugins that have associated JUnit tests. I can kick off  
> these tests via the Run.. Junit Plugin Tests command. AS I understand  
> it, this kicks off a new JVM and Workbench, etc and then runs the  
> tests on that. 
> Is it possible to kick off Junit Plugin tests from outside an eclipse  
> workbench? I'd like to include these plugin unit tests in our test  
> bucket, but this obviously requires some automation of the test  
> invocations 
> 
> Many Thanks 
> 
> Andy 
> 
 
 
--------------010509080706000103060108 
Content-Type: text/html; charset=ISO-8859-15 
Content-Transfer-Encoding: 8bit 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html> 
<head> 
  <meta content="text/html;charset=ISO-8859-15" 
 http-equiv="Content-Type"> 
</head> 
<body bgcolor="#ffffff" text="#000000"> 
Andrew,<br> 
<br> 
If you look at the debug view for the JUnit process you've just run, 
you can right click to see the properties and that shows how to invoke 
this same thing from the command line.
 |  
 |  
  | 
| Re: Running JUnit Plugin Tests from outside eclipse? [message #205650 is a reply to message #205450] | 
Wed, 18 April 2007 05:56   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi Ed, 
 
Thanks for this info - I can now run something from the command line that  
brings up my test workbench. Unfortunately, it doesn't seem to do anything  
else - the workbench appears, doesn't do anything and then is  
automatically killed after a period of time. If my unit tests are running,  
I can't see them! I guess in a normal test run (via eclipse), eclipse must  
connect to the running test workbench (perhaps via the specified port?)  
and tell the test workbench what to run? Alternatively, perhaps my tests  
are running silently & the results are in some file somewhere? 
 
Can anyone help with this? 
 
Many thanks 
 
Andy 
 
 
Ed Merks wrote: 
 
> Andrew, 
 
> If you look at the debug view for the JUnit process you've just run, you  
> can right click to see the properties and that shows how to invoke this  
> same thing from the command line.  E.g., 
 
>      D:sandbox3.3M6eclipsejrebinjavaw.exe -classpath 
>      
 D:sandbox3.3M6eclipsepluginsorg.eclipse.equinox.launcher_1.0 .0.v20070319.jar 
>     org.eclipse.equinox.launcher.Main -version 3 -port 3303 
>     -testLoaderClass 
>      org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoade r 
>     -loaderpluginname org.eclipse.jdt.junit.runtime -classNames 
>     com.example.library.tests.LibraryAllTests -application 
>     org.eclipse.pde.junit.runtime.coretestapplication -data 
>     D:sandbox3.3M6eclipseeclipseplugins/../junit-workspace 
>     -configuration 
>      
 file:D:/sandbox/3.3M6/eclipse/eclipse/plugins/.metadata/.plu gins/org.eclipse.pde.core/pde-junit/ 
>     -dev 
>      
 file:D:/sandbox/3.3M6/eclipse/eclipse/plugins/.metadata/.plu gins/org.eclipse.pde.core/pde-junit/dev.properties 
>     -pdelaunch -os win32 -ws win32 -arch x86 -testpluginname library.tests 
 
 
> Andrew Borley wrote: 
>> Hi All, 
>> 
>> I have some plugins that have associated JUnit tests. I can kick off  
>> these tests via the Run.. Junit Plugin Tests command. AS I understand  
>> it, this kicks off a new JVM and Workbench, etc and then runs the  
>> tests on that. 
>> Is it possible to kick off Junit Plugin tests from outside an eclipse  
>> workbench? I'd like to include these plugin unit tests in our test  
>> bucket, but this obviously requires some automation of the test  
>> invocations 
>> 
>> Many Thanks 
>> 
>> Andy 
>>
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.32352 seconds