0

Followed the instructions given over here http://wiki.eclipse.org/SWTBot/Automate_test_execution#On_Jenkins and successfully did the integration were the swtbot testcases worked fine but now all of sudden after adding few more swtbot testcases it started hanging and completely stopped working!

Things which I tried till now are,

-> Ran the testcases in Linux local server which passes without any issue but the same in jenkins hangs now.
-> Changing Xvfb process to Xvnc -> Still same issue, build hangs
-> Commented all swtbot testcase and added simple test like creating a project which works fine without any issues.
-> Changed the jenkins server to new slave to make sure if it's DISPLAY issue but again same problem in the new slave.
-> Used NX Client to track the UI flow which happen in jenkins server via sandbox build but fails with widget not found exception.
-> Used upgraded SWTBot plugin but no help

Mailed to swtbot-dev@eclipse.org 4 days back but no reply still! Can someone please help me in this asap? Not sure what else to try with to resolve this problem now.

Thanks.

Melwyn Jensen
  • 161
  • 1
  • 10
  • can you try adding your test cases one-by-one until it fails, then posting the problematic testcase? – Cpt. Senkfuss Dec 10 '13 at 07:33
  • Thanks for the reply. Ya currently I am trying to do that. Will update the results asap! – Melwyn Jensen Dec 10 '13 at 08:48
  • Tried running it from testcase 1 which we have created and the result is that any small tests like creation of project, checking single table etc works fine but anything more i.e adding 3-4 testcases with many execution steps makes the entire eclipse to freeze and there is no timeout happening too. I made a vnc session to the DISPLAY which is running with the SWTBot and all I can see is that the Eclipse is completely frozen and not able to even close the eclipse window to make the build to complete. All those testcases with many steps worked before without any issues. – Melwyn Jensen Dec 10 '13 at 09:54
  • anything useful on the eclipse log? is the eclipse on jenkins run with the same memory settings as your local one? – Cpt. Senkfuss Dec 10 '13 at 10:27
  • eclipse workspace log and memory settings both looks the same with local and jenkins. Right now I tried reverting to the previous revision where all the testcases was passing but even now the build hangs :( – Melwyn Jensen Dec 10 '13 at 11:50
  • !MESSAGE Missing required bundle org.eclipse.ocl_[3.0.0,4.0.0). !MESSAGE Bundle org.eclipse.emf.query.ocl_2.0.0.v20091215-1624 [389] was not resolved. I can see this as the diff between the local and jenkins log. Does it really matter? – Melwyn Jensen Dec 10 '13 at 11:58
  • hmm. I'm kinda happy I don't have to deal with Eclipse dependency hell anymore.... Since we have no other clues, I'd try to get rid of it, especially if you're using EMF in the app you're testing. – Cpt. Senkfuss Dec 10 '13 at 15:25
  • hmmm ok.. thanks anyways for your time! Hoping that someone will give a solution on this.. – Melwyn Jensen Dec 10 '13 at 15:51
  • Sry, the first sentence of my last comment wasn't meant to add anything to the discussion. Just a little side-rant ;) And by get rid of "it", I meant your dependency problem. Is there a chance you can fix it? Can you check whether that bundle is in fact missing? – Cpt. Senkfuss Dec 11 '13 at 08:34
  • Looks like that bundle missing issue is not a problem because I tried running the same jenkins build via console but not from frontend and got some strange result. The testcases runs fine via console and when I try to trigger it from the jenkins frontend it just hangs in the same place. Am totally confused now :-/ It's the same machine which I am using and via console the testcase runs fine but with jenkins frontend trigger it just hangs. Any cache which we need to cleanup or so in jenkins? Can you tell me how to do that if any? – Melwyn Jensen Dec 11 '13 at 10:40
  • so it's not local vs jenkins anymore but console vs frontend on jenkins machine? I admit I'm out of ideas here. But I'd advse you to update your original problem description with the new findings and hope that someone else has an idea... sry – Cpt. Senkfuss Dec 11 '13 at 11:35

2 Answers2

0

When you connect via VNC, try checking out if there's not any other modal window hiding behind the Eclipse workbench. We used to have problems especially with the "Usage data" window.

Lula
  • 1
  • Did some more test and found out that the UI hangs whenever a popup dialog box is opened. For eg. my eclipse plugin testcase as a delete option and when clicked a popup shows up asking "Confirm delete" and now during the click of delete the entire UI just hangs. So tried removing all the popup flows and now the testcases executes fine but during the closing of eclipse a popup use to showup for saving workbench I guess so now it just hangs after closing all the winodws.. any suggestion? or help on this? Why it has to hang for only the popup dialog boxes? – Melwyn Jensen Jan 06 '14 at 14:50
  • I just tried putting bot.sleep(infinite value) and do the same operation which the testcase does and close the eclipse that works fine without any issue but the same flow when running with swtbot testcase hangs now!! Am just confused what's going on.. but one thing am sure of is dialog box makes the swtbot testcase hang for some reason.. – Melwyn Jensen Jan 06 '14 at 15:09
  • Tried removing all the dialog box actions and to have a plain testcase and now the testcases executes without any issue but the moment it tries to close the eclipse all the editor pages gets closed but the main eclipse window just hangs again :( – Melwyn Jensen Jan 10 '14 at 06:41
0

Found the issue finally and fixed the problem!

Our testcases involves checking the shortcut keys which are meant for table operations such as, inserting a new row - insert key, delete a row - delete key and so on..

It seems that when swtbot executes the keystroke as,

bot.shell("").pressShortcut(Keystrokes.DELETE);

it makes the entire eclipse to hang. Am still not sure what is the reason behind it, so replaced DELETE with CTRL + Q key combination in our implementation code and then it started working fine.

Eclipse hangs even when some keystroke is added in the testcase which doesn't do any ui operations. So, did those cleanup and all the testcases are passing now :)

Seems to be a another limitation in swtbot and hope that development team will analyze this further if possible. Already have posted it in eclipse community as well. http://www.eclipse.org/forums/index.php/m/1234514/#msg_1234514

Thanks to Cpt. Senkfuss and Lula for your suggestions!!

Melwyn Jensen
  • 161
  • 1
  • 10