Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot and WebStart how to add test plugin to application(SWTBot with WebStart)
SWTBot and WebStart how to add test plugin to application [message #1798768] Fri, 23 November 2018 18:17 Go to next message
Alex Gor is currently offline Alex GorFriend
Messages: 151
Registered: November 2014
Location: Russia
Senior Member
Hello

Could you please help me to resolve problem?

We have a test suite that works against Eclipse 3 application. Before current time we execute the following steps



  1. Download application from developer site and install it
  2. Add our SWTBot based plugin with test to installed application
  3. start our test suite via command line. We use special swtbotapplication for start testing


The next version of application is distributed via WebStart. Our testsuite and application under testinare located in different repositories and they are built independency. Is there way to put our plugin to application that is installed via WebStart technology.

By the way I understand that the best way is join our codebase in one repositories and try to download test suite and application in the same time, the try to start test suite. But to my regret this is long way in our conditions.

Thank you for cooperation

Alex

[Updated on: Fri, 23 November 2018 18:19]

Report message to a moderator

Re: SWTBot and WebStart how to add test plugin to application [message #1798819 is a reply to message #1798768] Mon, 26 November 2018 10:00 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 151
Registered: November 2014
Location: Russia
Senior Member
From other hands Can I connect by SWTBot to running application. Something like : connecting to remote application by debugger?
Re: SWTBot and WebStart how to add test plugin to application [message #1801319 is a reply to message #1798819] Wed, 16 January 2019 16:26 Go to previous message
Alex Gor is currently offline Alex GorFriend
Messages: 151
Registered: November 2014
Location: Russia
Senior Member
May be will be help for other memebers of this community

final Matcher<Label> matcherLabel = allOf(widgetOfType(Label.class), anyOf(withRegex(labelRegExp)));
    		final Label label = bot.widget(matcherLabel);
    		final String labelText = this.getLabelText(label);
		@SuppressWarnings("unchecked")
		final Matcher<Combo> matcherCombo = allOf(widgetOfType(Combo.class), anyOf(withLabel(labelText)));
    		final Combo combo = bot.widget(matcherCombo);
    		final SWTBotCombo botCombo = new SWTBotCombo(combo);


where getLabelText (dur to strong UI thread protection) is
 private String getLabelText(final Label label) {
    	Display.getDefault().syncExec(new Runnable() {
		    public void run() {
		    	labelText = label.getText();
		    	LOG.debug("Found labelText");
		    }
		});
    	
    	return labelText;
    }


labelText is global
So shortly

I found corresponded label by regexp, get full label text then get corresponded combo.
This difficult, but in my case label text in German and contains some special German symbols that cannot be saved in UTF-8 source code
Previous Topic:How to decrease warning message such as Widget is not enabled
Next Topic:KeyStrokes don't work anymore with Mac
Goto Forum:
  


Current Time: Fri Nov 27 06:59:46 GMT 2020

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

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

Back to the top