Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Restarting Eclipse under test
Restarting Eclipse under test [message #1064873] Fri, 21 June 2013 13:42 Go to next message
Asgeir Sognefest is currently offline Asgeir SognefestFriend
Messages: 6
Registered: June 2013
Junior Member
Hi,
I am using SWTBot to install a plug-in, and then restarting Eclipse. After the restart I want to continue testing (if plugin was correctly installed), but the test restarts and the plug-in is not installed anymore.

Is there any way around this? So I can continue testing after restart.

Thanks Smile
Re: Restarting Eclipse under test [message #1065265 is a reply to message #1064873] Tue, 25 June 2013 07:44 Go to previous messageGo to next message
pawan garia is currently offline pawan gariaFriend
Messages: 39
Registered: February 2013
Member
Hi Asgeir Sognefest

is it possible in SWTBOT to restart eclipse ???

R u able to do the restart and start..
Re: Restarting Eclipse under test [message #1065420 is a reply to message #1064873] Tue, 25 June 2013 15:51 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

As SWTBot starts inside Eclipse, it's not possible to have a test which
deals with the "Restart" process. When you restart, Eclipse stops, then
your SWTBot launcher stops, and Eclipse restart in its vanilla form,
without your SWTBot test being started.
What you can try instead of a restart is to separate your test suite in
2 pieces: one before restart and one after. You run your "before
restart" suite normally. When it ends, the uitestapplication will close
Eclipse, and then you run your "after restart" suite using the
uitestapplication again.

HTH
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Restarting Eclipse under test [message #1066401 is a reply to message #1065420] Tue, 02 July 2013 12:53 Go to previous messageGo to next message
Asgeir Sognefest is currently offline Asgeir SognefestFriend
Messages: 6
Registered: June 2013
Junior Member
Okay, I see.

Thanks Smile
Re: Restarting Eclipse under test [message #1069654 is a reply to message #1064873] Tue, 16 July 2013 10:09 Go to previous messageGo to next message
pawan garia is currently offline pawan gariaFriend
Messages: 39
Registered: February 2013
Member
Hi Mickael,
I tried Using the Restart Functionality With SWTBOT in my Product and Found Some thing unusual, Following is My Test. So Every Time i Run this class File Swtbot is Running the Fist TestCase and Restart Eclipse and Start the Same Testcase again and Again...
It is Not Running the Second TestCase.

@Test
public void opennewSchedule() throws Exception
{
SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.Click();
bot.menu("File").menu("Restart").click();
}

@Test
public void opennewSchedule2() throws Exception
{
SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.menu("File").menu("Open").click();

}
Re: Restarting Eclipse under test [message #1069661 is a reply to message #1069654] Tue, 16 July 2013 10:22 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 07/16/2013 12:09 PM, pawan garia wrote:
> Hi Mickael,
> I tried Using the Restart Functionality With SWTBOT in my Product and
> Found Some thing unusual, Following is My Test. So Every Time i Run this
> class File Swtbot is Running the Fist TestCase and Restart Eclipse and
> Start the Same Testcase again and Again... It is Not Running the Second
> TestCase.

The restart functionality cannot be tested with SWTBot because "Restart"
will just restart Eclipse with the exact same options and won't continue
a Test Suite.
If you want to run a sequence of tests separated by restart, this has to
be implemented in the way you run those tests (Tycho Surefire, Bash,
Ant...) to actually run sequentially different test suites.
Just let the test suite run and close by itself, without using Restart.

--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:SWTBot 2.1.1 released!
Next Topic:Require-Bundle org.hamcrest
Goto Forum:
  


Current Time: Tue Mar 19 09:30:46 GMT 2024

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

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

Back to the top