| Summary: | Build SWTBot with Tycho | ||
|---|---|---|---|
| Product: | [Technology] SWTBot | Reporter: | Mickael Istria <mistria> |
| Component: | Build | Assignee: | Project Inbox <swtbot-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | cvgaviao, KetanPadegaonkar, mariot.chauvin |
| Version: | unspecified | ||
| Target Milestone: | 2.0.6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 358496, 358933, 360217, 362476, 385380 | ||
| Bug Blocks: | |||
| Attachments: | |||
|
Description
Mickael Istria
FYI, this branch contains some refactorings that: * Remove the JUnit issue described in bug 358496 * Builds bundles and repository. (Simply check out and "mvn clean install") I'll work on getting the test to work. Besides of tests, what would you need to see in the Tycho build to make it the official build for SWTBot? The branch: https://github.com/mickaelistria/swtbot +1 for me for building with tycho, but I know Ketan is not a big fan of maven. I know that too ;) That's why your support is welcome. But I have some arguments when it will be time to think about officially using Tycho. The first step is to provide a build with the same features as the current one. Then my question is: * What feature must the build provide to be equivalent to the current one? * From this commit: https://github.com/mickaelistria/swtbot/commit/59d30b2986ce84a9d92a4f578079c7a9b664e964 , I have SWTBot update site built, with test execution OK. Only a few tests are failing, probably because of Locale and keyboard stuff: in org.eclipse.swtbot.swt.finder.test " Failed tests: typesText(org.eclipse.swtbot.swt.finder.widgets.SWTBotTextTest) Tests in error: typesSpecialCharactersAtALocation(org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledTextTest) shouldBeAbleToParseUserProvidedKeyboardLayout(org.eclipse.swtbot.swt.finder.keyboard.KeyboardLayoutTest) shouldBeAbleToParseUserProvidedKeyboardLayoutViaPreference(org.eclipse.swtbot.swt.finder.keyboard.KeyboardLayoutTest) createsKeyboardForAWTKeyboardStrategy(org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactoryTest) createsKeyboardForSWTKeyboardStrategy(org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactoryTest) createsKeyboardForMockKeyboardStrategy(org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactoryTest) getsKeyStrokeForCapitalCharacters(org.eclipse.swtbot.swt.finder.keyboard.KeystrokesTest) getsKeyStrokeForSmallCharacters(org.eclipse.swtbot.swt.finder.keyboard.KeystrokesTest) getsKeyStrokeForSpecialCharacters(org.eclipse.swtbot.swt.finder.keyboard.KeystrokesTest) compatibilityWithOtherReferences(org.eclipse.swtbot.swt.finder.ReferenceByTest) Tests run: 373, Failures: 1, Errors: 10, Skipped: 7 " (In reply to comment #5) > From this commit: > https://github.com/mickaelistria/swtbot/commit/59d30b2986ce84a9d92a4f578079c7a9b664e964 > , I have SWTBot update site built, with test execution OK. Only a few tests are > failing, probably because of Locale and keyboard stuff: > > in org.eclipse.swtbot.swt.finder.test > " > Failed tests: > typesText(org.eclipse.swtbot.swt.finder.widgets.SWTBotTextTest) Can you open another bug for this with information on your locale, keyboard settings etc ? Actually, I am currently more thinking this is an issue with configuration of tests rather than issue with keyboard itself. I did not investigate yet; and I'll open a bug when I am sure there is something to change in SWTBot code. Some tests are now working by fixing bug #360217. Some other tests are failing because of incorrect visibility with OSGi (the default "package" dependency does work between classes coming from different OSGi bundles, it is necessary to use "public"). Encouraging current status: Failed tests: typesText(org.eclipse.swtbot.swt.finder.widgets.SWTBotTextTest) getsKeyStrokeForSpecialCharacters(org.eclipse.swtbot.swt.finder.keyboard.KeystrokesTest) bringsShellToFront(org.eclipse.swtbot.swt.finder.widgets.SWTBotShellTest) Tests in error: typesSpecialCharactersAtALocation(org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledTextTest) (In reply to comment #9) > Encouraging current status: > > Failed tests: > typesText(org.eclipse.swtbot.swt.finder.widgets.SWTBotTextTest) > getsKeyStrokeForSpecialCharacters(org.eclipse.swtbot.swt.finder.keyboard.KeystrokesTest) > > Tests in error: > > typesSpecialCharactersAtALocation(org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledTextTest) These are known to fail if you are on a different keyboard layout. > bringsShellToFront(org.eclipse.swtbot.swt.finder.widgets.SWTBotShellTest) This might be a random failure. I'll see if I'm able to reproduce on my computer. I know still have those ones failing: Failed tests: typesText(org.eclipse.swtbot.swt.finder.widgets.SWTBotTextTest) getsKeyStrokeForSpecialCharacters(org.eclipse.swtbot.swt.finder.keyboard.KeystrokesTest) Tests in error: typesSpecialCharactersAtALocation(org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledTextTest) with the following message (respectively): * Expected: a string containing "Type This 123" got: "Type This " * java.lang.AssertionError: expected:<SHIFT+> but was:<!> * java.lang.IllegalArgumentException: Could not understand keystroke ALT+CTRL+ I have tried to run tests with 2 keyboard layouts enabled on my system: us_intl and fr_FR. In vain. What is the way to have those tests working too? (In reply to comment #11) > I know still have those ones failing: > > Failed tests: > typesText(org.eclipse.swtbot.swt.finder.widgets.SWTBotTextTest) > > getsKeyStrokeForSpecialCharacters(org.eclipse.swtbot.swt.finder.keyboard.KeystrokesTest) > > Tests in error: > > typesSpecialCharactersAtALocation(org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledTextTest) > > > with the following message (respectively): > * Expected: a string containing "Type This 123" got: "Type This " > * java.lang.AssertionError: expected:<SHIFT+> but was:<!> > * java.lang.IllegalArgumentException: Could not understand keystroke ALT+CTRL+ > > I have tried to run tests with 2 keyboard layouts enabled on my system: us_intl > and fr_FR. In vain. What is the way to have those tests working too? You will not be able to have those working without changing code of the keyboard layout manager, or you may have but there are will remain problems with the current code. Let me explain. On a french keyboard, to enter "1", you have to type "é" + SHIFT. If you enter the following mapping in the keyboard layout, you will encounter an exception with awt.Robot class, as "é" should be entered with the following code : robot.keyPress(KeyEvent.VK_DEAD_ACUTE); robot.keyPress('e'); robot.keyRelease('e'); robot.keyRelease(KeyEvent.VK_DEAD_ACUTE); The current SWTBot do not do this. I started to modify the code those case but never finish. (In reply to comment #12) > On a french keyboard, to enter "1", you have to type "é" + SHIFT. If you enter > the following mapping in the keyboard layout, you will encounter an exception > with awt.Robot class, as "é" should be entered with the following code : > > robot.keyPress(KeyEvent.VK_DEAD_ACUTE); > robot.keyPress('e'); > robot.keyRelease('e'); > robot.keyRelease(KeyEvent.VK_DEAD_ACUTE); > > The current SWTBot do not do this. I started to modify the code those case but > never finish. This has been on my list of things to do, unfortunately I've no way of testing these sort of things :( If you have this available on a branch, please send me the link, I'll try these tests with your modifications. Maybe this should be tracked in another bug. Created attachment 206521 [details]
Screenshot of the integration of SWTBot Tycho build in Jenkins
Created attachment 206523 [details]
Screenshot of the integration of SWTBot Tycho build in Sonar
I could go ahead and here is a current status: * Running all the build is simply about "mvn clean install" * Integration in Jenkins/Hudson is free * I enabled Jacoco during the build to perform code coverage * Thanks to mavn and Jenkins Sonar plugins, there is report for static analysis and code coverage in Sonar. I'd like some other people to give it a try, by taking my github master branch and running "mvn clean install". I think that's a good step ahead for SWTBot, it will allow it to join the release train with fewer efforts. Once the Tycho build gets adopted, sonarsource will be able to host reports at nemo.sonarsource.com. I'm not trying to ignore this bug. But, I've not had the time to look at this. I'll be looking at other bug fixes for today my only free time in a few months: ( and hopefully come back to this one, if there's still time left. Ketan, have you at least checked out the branch, and tried "mvn clean install" ? It won't require you lot of time (actually typing it will require you less time that writing you do not have time to do so ;). (In reply to comment #19) > Ketan, have you at least checked out the branch, and tried "mvn clean install" > ? It won't require you lot of time (actually typing it will require you less > time that writing you do not have time to do so ;). I've done that briefly :) I'll just need to browse through and the test output and code coverage with the existing ant build to make sure everything is good. Ok, that's good news to know the build is working also on your side. Please tell me when you feel ready to get it contributed, so that I'll provide a patch. I'm eager to see SWTBot using Tycho! IT seems like bug 375598 will have a certain success and a lot of contributors will be involved in fixing it. Some people are already complaining about not being able to get local or snapshot builds easily. Moving to Tycho would provide that. For those interested, I updated a branch dedicated to this effort: https://github.com/mickaelistria/swtbot/tree/359024 Matthias, I received your pull request here: https://github.com/mickaelistria/swtbot/pull/1 It should be fine to integrate it into SWTBot master@Eclipse. But I think the IP process requires you to attach the patches in the pull request to this bug using "git format-patch" and adding the lines saying that you are author of the parts you contributed and so on as a comment of the bug. I'll then integrate it to a branch and set up some CI builds using it. If it happens to work well, I'll then merge that "tycho" branch to master and the CI builds based on it will become SWTBot main builds. Also, once my committer election process gets finished, I plan to nominate you as a committer based on this contributions and other reports and efforts you made to improve SWTBot. (In reply to comment #24) > Matthias, > > I received your pull request here: > https://github.com/mickaelistria/swtbot/pull/1 > > Also, once my committer election process gets finished, I plan to nominate you > as a committer based on this contributions and other reports and efforts you > made to improve SWTBot. If Matthias agrees, I'm happy to nominate to speed up the process. Created attachment 218836 [details] I amended Mickael's patch adding the modifications I listed in the commit message Here my modification of Mickael's change 359024 [1], feel free to use it as you see fit. [1] https://github.com/mickaelistria/swtbot/tree/359024 I confirm that I am the author 100% of the modifications I am contributing. that I own the copyright of the contributed content that I have the right to contribute the content to Eclipse under swtbot's license (EPL) I created branch tycho-359024 to work on this issue: http://git.eclipse.org/c/swtbot/org.eclipse.swtbot.git/log/?h=tycho-359024 A CI job for SWTBot with Tycho: https://hudson.eclipse.org/hudson/job/swtbot-tycho/ A lot of tests are failing, I suspect it's because of bug 362476 . This is an issue I can reproduce locally. CI job is blue with all tests working: https://hudson.eclipse.org/hudson/job/swtbot-tycho/ A repository for snapshot builds (from CI) has been set up: http://download.eclipse.org/technology/swtbot/snapshots So any opposition to merging the Tycho branch into trunk and drop previous builds? (In reply to comment #29) > CI job is blue with all tests working: > https://hudson.eclipse.org/hudson/job/swtbot-tycho/ > A repository for snapshot builds (from CI) has been set up: > http://download.eclipse.org/technology/swtbot/snapshots > > So any opposition to merging the Tycho branch into trunk and drop previous > builds? nope Merged and used in order to build snapshots. |