| Summary: | Hidden Run/Debug Configuration causes confusion | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Tim None <tim.myerscough+eclipse-bugzilla> | ||||||||||||
| Component: | Debug | Assignee: | Sarika Sinha <sarika.sinha> | ||||||||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | markus.kell.r, Michael_Rennie, sarika.sinha, srikanth_sankaran | ||||||||||||
| Version: | 4.4 | ||||||||||||||
| Target Milestone: | --- | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Linux | ||||||||||||||
| Whiteboard: | stalebug | ||||||||||||||
| Attachments: |
|
||||||||||||||
Pass to JDT/Debug for comment. I am not bale to reproduce this with Version: Luna (4.4) Build id: I20140606-1215 Modification of arguments are correctly reflected and I ma able to rerun the test. Can you verify the steps ? Able to reproduce with:
Version: Luna Release (4.4.0)
Build id: 20140612-0600
Test Case:
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class EclipseRunConfigurationTest {
@Test
public void test() {
assertEquals("foo", System.getProperty("runProperty"));
}
}
1. Select file > Rclick > run as... > junit test - it will fail.
2. Modify the run configuration: run (menu)> run configurations > EclipseRunConfigurationTest
* Add "-DrunProperty=foo" VM parameter
3. Run it again using the Junit view: Junit View > EclipseRunConfigurationTest > (rClick) > run - it will pass
4. Switch to debug perspective
* Verify that the Debug view shows "<terminated>Rerun EclipseRunConfigurationTest"
* Debug View > <terminated>Rerun EclipseRunConfigurationTest > (RClick)
- RClick the <terminated> Junit launch -> Edit Rerun EclipseRunConfigurationTest...
- Change the VM parameter to "-DrunProperty=bar"
- Apply and Debug - it will fail (debug-3)
5. Open the Run/Debug manager again: Run(Menu) > Run Configurations... (debug-5)
- Note that 'Rerun EclipseRunConfigurationTest' is not listed.
- Note that 'EclipseRunConfigurationTest' is listed.
- Note that the VM parameter is still "-DrunProperty=foo"
- No amount of changing it makes the slightest bit of difference.
However, contrary to Keplar, if you run the test from the toolbar again ( toolbar > run > EclipseRunConfigurationTest) then it works as expected, even when re-running from the JUnit view. However, it is still confusing since if you change the run configuration when "Rerun XXX" is displayed, your configuration changes will effectively be lost. Created attachment 245170 [details]
screenshot of testcase
Created attachment 245171 [details]
screenshot-2
Created attachment 245172 [details]
screenshot-3
Created attachment 245173 [details]
screenshot-4
Created attachment 245174 [details]
screenshot-5
RClick the <terminated> Junit launch -> Edit Rerun EclipseRunConfigurationTest... I don't get Rerun EclipseRunConfigurationTest always , I get run Edit EclipseRunConfigurationTest and thats why it works for me . Once I did get Rerun and I was bale to reproduce the issue. Will invistigate it. Thanks. It's a bit of an obscure one, and it looks like the behaviour has changed slightly (in the right direction) since Kepler. The Rerun Launch Configuration is being created on the fly (and is binned if you just run it again). I'd expect that if the "Rerun" configuration is still required (not sure of the implementation details), then I'd expect it to also be persisted for the standard configuration. If you can do away with the "Rerun" configuration entirely and just edit the "standard" run configuration, then that would be the simplest and most consistent approach for the user. Some updated steps: 1. use the snippet from comment 0 2. Run As > JUnit Test 3. Edit the config from the debug view > add -DrunProperty=foo, re-run from the junit view 4. Rerun config shows up in the debug view At first glance I'm not sure how we would work around this problem. Unless we set the temporary configuration as read-only, which would warn the user when they try to edit it. Rather than making the rerun configuration read only, is it possible to reflect the changes in the original? I've not seen the code so not sure whether it's feasible. Is there any reference (or can one be obtained) between the original and the rerun configurations? Since there must be some relation at some point for the rerun configuration to exist, perhaps a reference could be maintained between the two? Or alternatively, can the "re-run" configuration be removed completely, and simply the original configuration used/updated? 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. |
There is a situation where modifying the Run -> Run Configurations arguments does not work, since the actual run configuration being executed is actually hidden from you. Updating the visible one will not be reflected in your actual run. Test Case: import static org.junit.Assert.assertEquals; import org.junit.Test; public class EclipseRunConfigurationTest { @Test public void test() { assertEquals("foo", System.getProperty("runProperty")); } } 1. Run it - it will fail. 2. Modify the run configuration, add "-DrunProperty=foo" VM parameter 3. Run it again - it will pass 4. Debug it, then switch to the debug view, - RClick the <terminated> Junit launch -> Edit Rerun EclipseRunConfigurationTest... - Change the VM parameter to "-DrunProperty=bar" - Apply and Debug - it will fail 5. Open the Run/Debug manager again - Note that 'Rerun EclipseRunConfigurationTest' is not listed. - Note that the VM parameter is still "-DrunProperty=foo" - No amount of changing it makes the slightest bit of difference.