eclipse.launcher returns NULL when running JUnit plug-in tests [message #985997] |
Sat, 17 November 2012 08:09 |
Kivanc Muslu Messages: 153 Registered: November 2010 |
Senior Member |
|
|
Hi,
I am writing a plug-in that needs to retrieve the value of environment variable 'eclipse.launcher' set by Eclipse (so that I can create one more Eclipse). This works completely fine while I am testing the plug-in myself and eclipse.launcher is set to the correct value.
I have created a JUnit plug-in test so that I can automate some of the testing I need to do for my plug-in. However, in this plug-in tests, eclipse.launcher is not set (i.e., returns NULL), which completely crushes my remaining execution (and also testing).
Is there a configuration and/or workaround I can use for this?
Thank you, best regards,
[Updated on: Sat, 17 November 2012 08:09] Report message to a moderator
|
|
|
|
Re: eclipse.launcher returns NULL when running JUnit plug-in tests [message #986099 is a reply to message #986090] |
Sun, 18 November 2012 20:23 |
Kivanc Muslu Messages: 153 Registered: November 2010 |
Senior Member |
|
|
Stephan Herrmann wrote on Sun, 18 November 2012 12:57
Possible workaround: explicitly pass this variable into your test launch?
Hi Stephan, I tried using the environment variables (in run configurations) tab to do this, however it did not work. I also tried to set the environment variable 'eclipse.launcher' using a @BeforeClass method. However, as far as I can see, the product (the second Eclipse with my plug-in running on it), is created and run way earlier than @BeforeClass method is executed. Since my plug-in tries to read 'eclipse.launcher', it still reads null and cannot spawn the headless (third) Eclipse.
Is there any other way that I can pass the variable and make sure that it is set before the second (i.e., testing Eclipse with my plug-in) is created?
Thank you,
|
|
|
|
Powered by
FUDForum. Page generated in 0.03876 seconds