views:

5257

answers:

5

I'm finding it difficult to phrase this question well, as there are quite a few generic terms (run, configuration, launch, etc.). Here goes:

You can save run configurations in a .launch file. (in the Run Configuration Dialog, under the Common tab, Save as a shared file.

We check these in to SVN. The developers can pass them around, and it helps getting new devs running a working application quicker.

I'd like to check these out as part of our build and use them to programatically run the application, the tests, etc, without spinning up the whole IDE.

What would be the best way to run a .launch file outside of the UI?

Edit: I am trying to unify the tests run on the build server and the IDE. I do not particularly want to give up integrated debugging, which would be the case with an ant script to run the tests .

This is probably more a problem for integration testing with multiple bundles, or unit testing a whole bundle, where you'd like to mock up extensions.

+1  A: 

Ant4Eclipse may provide a good starting point on how to do this.

Unfortunately, this is limited to Java Applications and JUnit configurations; I am more interested in PDE applications and Plugin JUnit tests.

jamesh
+1  A: 

there is an eclipse plugin built over JUnit, called TPTP. It provides an automation client which can be used to launch the test from eclipse with no gui. maybe it helps

Adrian Pascalin
+1  A: 

I think you don't need to use the .launch configurations to run the tests. If you build an application using the Eclipse Build System, then you can use the AntRunner application from Eclipse to run your units tests. This doesn't start the whole IDE.

This article describes how to run the tests during your build process. With this process, you use a special "Test" Eclipse and load the plugins you want to test.

Mario Ortegón
The problem I'm trying to avoid is that of keeping the build/test/deploy metadata all in synch. If I can get everything running from the same set of metadata...
jamesh
A: 

Does anyone have a solution to this question ?

I tried with ant4eclipse but I was unable to run anything.

+1  A: 

Perhaps running the configurations the way you would run your own custom run configurations would help here. It is described in this article.

Fabian Steeg
This article allows us to define our own launch configuration types. We want to be able run existing configurations. Unfortunately, these launch configuration types (plus the framework itself) are all in org.eclipse.jdt.debug.ui, so not really suitable for a headless build server.
jamesh