Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » getting started with SWT Bot
getting started with SWT Bot [message #695207] Mon, 11 July 2011 09:20 Go to next message
Eclipse User
Originally posted by: robert julian chandradoss

Hello,
I am pretty new to swt bot and i tried to create my first test
example using the tutorial video

http://download.eclipse.org/technology/swtbot/docs/videos/beginners/SWTBotGettingStartedIn5Minutes/

But, i get error=0 or failure=0. I only get " Runs 0/1 ". Any feed back
is most welcome.

Note: I am running java 1.5 with Junit 4.

/** This is the code I ran as a test in SWT Bot. */


import junit.framework.TestCase;

import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.junit.Test;

public class SWT_TEST extends TestCase {

private SWTWorkbenchBot bot;
public SWT_TEST() {
bot = new SWTWorkbenchBot();
}


@Test
public void runTest() throws Exception {
try {
bot.viewByTitle("Welcome").close();
}
catch(Exception e) {

throw new Exception();
}
}
}


Best regards. --robert julian
Re: getting started with SWT Bot [message #695645 is a reply to message #695207] Tue, 12 July 2011 08:24 Go to previous messageGo to next message
Benjamin Ratiarisolo is currently offline Benjamin Ratiarisolo
Messages: 16
Registered: January 2010
Location: Paris, France
Junior Member
Hi Robert,

It looks as if your test did not actually run. You did not mention how you are running your tests (within eclipse, from the command line, through an ANT task, etc.), but this could come from conflicting JUnit jars/plug-in versions.
I faced a similar issue when I first started using SWTBot. If you dig a little bit I am pretty sure you'll find various threads about it in this forum or a corresponding FAQ/article in the SWTBot Wiki.

Hope this helps,


--
Benjamin Ratiarisolo
IBM ODM Decision Server Rules - Software Developer
IBM Software - France Lab
Re: getting started with SWT Bot [message #695660 is a reply to message #695645] Tue, 12 July 2011 08:44 Go to previous message
Eclipse User
Originally posted by: robert julian chandradoss

On 7/12/2011 1:54 PM, Benjamin Ratiarisolo wrote:
> Hi Robert,
>
> It looks as if your test did not actually run. You did not mention how
> you are running your tests (within eclipse, from the command line,
> through an ANT task, etc.), but this could come from conflicting JUnit
> jars/plug-in versions.
> I faced a similar issue when I first started using SWTBot. If you dig a
> little bit I am pretty sure you'll find various threads about it in this
> forum or a corresponding FAQ/article in the SWTBot Wiki.
>
> Hope this helps,

dear benjamin,
thank a lot for the reply. yes, the link was very useful.
i have my first swtbot application up and running!. :).


best regards. --robert julian
Previous Topic:How to get terminate/resume button in debug perspective
Next Topic:Custom Context Menus and Dialogs
Goto Forum:
  


Current Time: Mon Sep 15 04:09:14 GMT 2014

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

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