Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312059 - [launcher] create unit tests
Summary: [launcher] create unit tests
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-07 09:34 EDT by Andrew Niefer CLA
Modified: 2021-09-05 14:22 EDT (History)
2 users (show)

See Also:


Attachments
launcherTests v1 (20.11 KB, application/x-zip-compressed)
2010-08-13 10:08 EDT, Martin Oberhuber CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2010-05-07 09:34:16 EDT
The launcher has no unit tests.  We should try to create some.

There are two sides here that I would like to see:
1) A set of smoke tests that can be run on newly compiled binaries _before_ those binaries are checked into cvs for a releng build.  These should run on every platform that we compile on.  These tests should be integrated into org.eclipse.equinox/framework/releng/org.eclipse.equinox.launcher.releng
which contains the scripts used to compile the launchers through hudson.

2) Unit tests that run during the regular releng build, these obviously only run on the platforms that releng is testing on.


I'm not really sure of what the implementation of such tests would look like.  (2) can likely be junit or session tests.  I'm not sure about (1).
Comment 1 Thomas Watson CLA 2010-05-07 09:44:48 EDT
(In reply to comment #0)
> 
> I'm not really sure of what the implementation of such tests would look like. 
> (2) can likely be junit or session tests.  I'm not sure about (1).

Note that session tests currently bypass the native launcher in order to run a separate eclipse instance to run a test.  So these tests either need to be junit tests that invoke the launcher directly, or we need to enhance the SessionTestRunner to allow an option to launcher with the native launcher.
Comment 2 Martin Oberhuber CLA 2010-08-13 10:08:31 EDT
Created attachment 176555 [details]
launcherTests v1

Attached is a first implementation of Unittests for the Equinox Launcher.

The basic trick here is exercising eclipse.exe with a special -jar that does nothing but print its commandline. That way, eclipse.exe can be exercised with different commandline / INI file variations, and the result commandline is checked. The test also has a watchdog which kills the target in case anything takes longer than 5 seconds.

Implementation is plain JUnit, and reading Java System Properties to configure what exe, dll, vm, other args to use. 2 shared launch configs are provided to show how it is executed; executing from the Workspace works out of the box with these. Integrating into standard test runs (via test.xml) or local builds (build.bat / .sh) should be fairly straightforward, using the Java commandline that's generated by those Launches. See the provided README.TXT for more details.

For now, the only real test is for the new --launcher.appendVmargs functionality from bug 149994, but it should be very straightforward to add more tests now that the Infrastructure is there.
Comment 3 Eclipse Webmaster CLA 2019-09-06 15:38:15 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 4 Eclipse Genie CLA 2021-09-05 14:22:34 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.