Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336199

Summary: Component names from within Event Handlers cannot be propagated
Product: [Technology] Jubula Reporter: Alexandra Schladebeck <alexandra.schladebeck>
Component: CoreAssignee: Project Inbox <jubula.core-inbox>
Status: CLOSED FIXED QA Contact: Oliver Goetz <Oliver.Goetz>
Severity: enhancement    
Priority: P2 CC: elena.pister, ivonne.kellner, marvin_m, miklos.hartmann
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/82926
https://bugzilla.bredex.de/show_bug.cgi?id=39
https://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=e760e59d331b231158ee4bc19f3537c259440427
Whiteboard:
Attachments:
Description Flags
Project with example test cases none

Description Alexandra Schladebeck CLA 2011-02-03 04:10:35 EST
Component names propagated from within Event Handlers (using the checkbox in the component names view) are not available for editing when the test case containing the Event Handler is reused. 

To reproduce:

1. Create an empty Test Case called TC1
2. Add an action that requires a component name (e.g. check text) to TC1 as an Event Handler (any error type and reentry type).
3. Activate the checkbox in the component names view.
4. Save the Test Case TC1.
5. Create a new Test Case called TC2 and reuse TC1 in it.

The expected behavior is that the propagated component name is visible and editable in the component names view for the reused TC1 in TC2. 

I have checked this in the current build, and in versions 4.3, 4.2 and 3.2, and this expected behavior wasn't present in either of them.

The category "Example 1" in the attached project shows this scenario. 

However, it seems that the component name for the Event Handler Test Case can be "indirectly" propagated:

1. Create a test case called TC3
2. Add the action "check selection by index" for combo box to TC3 as a normal Test Case. 
3. Enter a new name for the nn_nn_cbx component name in the component names view (e.g. combobox) and select the checkbox to propagate it.
4. Save the Test Case TC3.
5. Add the action "select by index" for combo box to TC3 as an Event Handler, (e.g. as a check failed with retry as the reentry type).
6. In the component names view, activate the checkbox to propagate the old name nn_nn_cbx. 
7. Save the Test Case TC3.
8. Create a new Test Case called TC4 and reuse TC3 in it. 
9. Add TC4 to a Test Suite, complete the data and perform the object mapping.

The Test Suite is marked as incomplete. Looking in the object mapping editor shows that the component "nn_nn_cbx" is not mapped. Selecting "show corresponding specification" provides "TC4/TC3" as the place where the component name comes from. This example is shown in the category and Test Suite "Example 2" in the attached project.
Comment 1 Alexandra Schladebeck CLA 2011-02-03 04:11:30 EST
Created attachment 188212 [details]
Project with example test cases
Comment 2 Alexandra Schladebeck CLA 2011-06-16 04:49:35 EDT
The workaround for this issue is described (more clearly) and exemplified in issue https://bxapps.bredex.de/bugzilla/show_bug.cgi?id=39
Comment 3 Alexandra Schladebeck CLA 2011-08-05 11:04:26 EDT
As discussed with the product owner, this is actually a missing feature and should be more highly prioritized.
Comment 4 Alexandra Schladebeck CLA 2012-01-04 04:11:40 EST
Crosslink: This has also been noted in the GUIdancer Bugzilla:
https://bxapps.bredex.de/bugzilla/show_bug.cgi?id=217
Comment 5 ivonne kellner CLA 2016-07-28 05:27:36 EDT
i have this problem, but the links with the workarounds are not functioning anymore.
Comment 6 Alexandra Schladebeck CLA 2016-07-28 05:30:59 EDT
The fixed links are:
https://bugzilla.bredex.de/show_bug.cgi?id=39
https://bugzilla.bredex.de/show_bug.cgi?id=217
Comment 7 Miklos Hartmann CLA 2016-10-05 04:03:29 EDT
I think this issue is caused by the CompNamesBP.getAllCompNamesPair method using the getNodeListIterator method of the INodePO's - as usual, Event Handlers are ignored by this method.

The solution is to use the new getAllNodeIter iterator from this (not yet merged) contribution: https://git.eclipse.org/r/#/c/81526/

See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=500825
Comment 8 Eclipse Genie CLA 2016-10-11 08:34:00 EDT
New Gerrit change created: https://git.eclipse.org/r/82926
Comment 9 Miklos Hartmann CLA 2016-10-11 08:47:18 EDT
This problem also affected the Search Replace action.
Comment 10 Marvin Mueller CLA 2016-10-14 07:00:46 EDT
see Comment 8
Comment 12 Elena Pister CLA 2017-01-13 04:00:51 EST
closing as merged to master