Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Issues with repeated drag&drop in same test case
Issues with repeated drag&drop in same test case [message #1609615] Tue, 10 February 2015 08:21 Go to next message
Andreas Falter is currently offline Andreas FalterFriend
Messages: 15
Registered: February 2015
Junior Member
Hi,

I have started to evaluate some testing tools for our RCP application, first of all I think RCPTT ist the best solution I have found so far!

Currently I'm struggling with some drag&drop issues, we make a lot use of drag & drop between different views with custom transfers in our application. One thing I found is that multiple drag&drop operations in the same test case behave differently than executed manually.

E.g. there is a project explorer integrated in the application with a simple project "test" and a file "test.txt". When I connect with the debugger to the running AUT, set a breakpoint to class DNDListener, method handleEvent, case DND.DragStart, and then start a simple drag of the file to itself (will cause no action), the breakpoint is hit, but the Event e.datatype field is 'null'. I think this is as expected, because it will be filled later during the drag&drop operation.

When I record this action, the followin ECL code is recorded:
with [get-view "Project Explorer" | get-tree] {
select "project/test.txt"
get-item "project/test.txt" | drag-start 1 8
get-item "project/test.txt" | drag-enter 6 8 -detail move
get-item "project/test.txt" | drag-over 22 8
get-item "project/test.txt" | drag-exit
drag-end
}


Also when replaying this, the breakpoint is hit and the e.datatype field is 'null'. Now when I duplicate this code to execute it twice in the same test case, the first time the breakpoint is hit, the datatype field is 'null', but when the second DragStart event occurs, the datatype field is already filled (with the datatype from the previous drag&drop operation, I think it's the type for LocalSelectionTransfer).

This is not a problem when doing the same drag&drop operation twice, because the datatype will be the same, but this also occurs when I perform a totally different drag&drop operation after the first one (e.g. from a different view with a custom transfer). In this situation, the second drag&drop operation will fail, because the correct datatype is not set anymore, and the drop listener will fail to handle the drop operation.

Is it possible that the first event is "reused" somehow without resetting the datatype?

While searching for the reason why the datatype is not reset, I came to class DragSource, method drag, which is called when I manually perform the drag&drop operation in the AUT, but it's not called at all when replaying the recorded ECL code. May this be a reason for the missing reset? Is there possibly a missing event that was not recorded?

Thanks in advance!
Re: Issues with repeated drag&drop in same test case [message #1632709 is a reply to message #1609615] Tue, 24 February 2015 12:39 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hello,

I'm sorry for a long delay.
Thank you for letting us know about that! I've created a bug, and we are going investigate it.
How does this issue affect your application? Do you have any real side effects of this behaviour?


Yours sincerely,
Olga.
Re: Issues with repeated drag&drop in same test case [message #1634703 is a reply to message #1632709] Wed, 25 February 2015 12:03 Go to previous messageGo to next message
Andreas Falter is currently offline Andreas FalterFriend
Messages: 15
Registered: February 2015
Junior Member
Hello Olga,

thanks for your response! I indeed have a usecase where this seems to prevent the correct execution of a test case. The project explorer example from my first description was just a simplification that can easily be reproduced.

Here comes an explanation of of the real-life usecase:

In our application, we have a editor containing a GEF chart. There are two additional views which contain dragable objects, each view has a custom defined transfer (ServiceTransfer for services and ValueTransfer for values). In the application, a user can drag&drop services from the one view to the editor chart, which then creates a new node in the chart. From the other view, the user can now drag&drop a value to the created node, which then does some special assignment of the value to the service.

When I now create a test case, which executes the drag&drop of the service to the chart, this works fine. With an attached debugger, I can see in DNDListener.handleEvent() - case DND.DragStart, that initially the datatype of the event is null, and in case DND.DragSetData already the correct datatype of the custom ServiceTransfer is assigned.
If I create a new test case now (without any initial contexts), that just executes the drag&drop of the value to the already existing service node, this also works correctly. In DND.DragStart the data type is null again, and afterwards, in DND.DragSetData the event datatype is matching to the ValueTransfer as expected.

But when doing both drag&drop operations in the same test case, the second drag&drop will fail (value is not assigned to service). In the debugger, I can see that the first drag&drop operation behaves correctly (ServiceTransfer is assigned to the event in DND.DragSetData), but when the DND.DragStart event for the second operation occurs, the assigned datatype is still the one from the first operation. Also in the DND.DragSetData event of the second drag&drop operation, still the datatype of the first operation is assigned (ServiceTransfer instead of the expected ValueTransfer). This causes the drop operation to fail, because this datatype/transfer cannot be handled by the drag/drop adapters.

I hope I was able to describe the use case understandable, just tell me if you need additional information.
Re: Issues with repeated drag&drop in same test case [message #1668102 is a reply to message #1634703] Thu, 12 March 2015 10:28 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hello,

Thank you for detailed explanation.
I am trying to reproduce this issue on our side, but no luck as of right now.
Could you please share your AUT to us for the further investigation?


Yours sincerely,
Olga.
Re: Issues with repeated drag&drop in same test case [message #1689336 is a reply to message #1668102] Mon, 23 March 2015 10:49 Go to previous messageGo to next message
Andreas Falter is currently offline Andreas FalterFriend
Messages: 15
Registered: February 2015
Junior Member
Sorry for the late reply.

Unfortunately it will not be possible to share the current AUT directly, but I will try to create a simple sample application where the effect can be seen.
Re: Issues with repeated drag&drop in same test case [message #1699450 is a reply to message #1689336] Wed, 24 June 2015 11:55 Go to previous messageGo to next message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Andreas,

Any update on this?

Kind regards,
Ulyana.
Re: Issues with repeated drag&drop in same test case [message #1699737 is a reply to message #1699450] Fri, 26 June 2015 09:46 Go to previous message
Andreas Falter is currently offline Andreas FalterFriend
Messages: 15
Registered: February 2015
Junior Member
Hello Ulyana,

unfortunately I was not able to reproduce the issue with a simple example application. I created a small product with just some views and tables that supported drag&drop for different drop targets, but the recording/replay was working correctly there Sad

In our main application the problem still exists, I will retry with new RCPTT version 2.0.0. I could close the bug as WORKSFORME for now and then reopen it if I'm able to get more detailed information?
Previous Topic:Verification of text file content without using AUT
Next Topic:Automatic testing of some external options
Goto Forum:
  


Current Time: Fri Apr 19 07:34:56 GMT 2024

Powered by FUDForum. Page generated in 0.02033 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top