Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Load saved workspace preferences at SWTBot test launch
Load saved workspace preferences at SWTBot test launch [message #1232665] Fri, 17 January 2014 13:03 Go to next message
Surdeanu Mihai is currently offline Surdeanu MihaiFriend
Messages: 1
Registered: January 2014
Junior Member
Hello!

I am using SWTBot to test an Eclipse application with a special plugin incorporated. That plugin have some preferences kept into .metadata/.plugins directory of each workspace used. For each SWTBot test launched, I want to load automatically these preferences. For that, I have tried to copy that .prefs files (where preferences are stored) into SWTBot debug workspace. But every time I start a SWTBot test these files added are removed automatically.

I also tried to copy these files into eclipse/configuration/.settings Eclipse directory, but I get the same answer.

Is there a chance to load automatically some plugin preferences (saved into a workspace) when a SWTBot test it is launched?

Eclipse Classic 4.2.1 it is the version used by me.

Thanks for your help. Smile
Re: Load saved workspace preferences at SWTBot test launch [message #1232700 is a reply to message #1232665] Fri, 17 January 2014 14:25 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

FYI, what you described is not related to SWTBot in particular, it's a
pure JUnit in Eclipse issue.

That said, preference files are not meant to be copied or moved like
that. A JUnit test has to be autonomous, and is responsible of
configuring the application as necessary (and cleaning it after).
Instead of assuming things about the application, you should modify the
preferences in the @Before or @BeforeClass method of the test, so are
sure that the preferences are set as you expect whenever the test run.

--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:SWTBot with Tycho in Travis CI
Next Topic:Help to Click on SWT Element
Goto Forum:
  


Current Time: Fri Apr 26 04:37:34 GMT 2024

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

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

Back to the top