Questions tagged [swtbot]

SWTBot is an open-source Java based UI/functional testing tool for testing SWT and Eclipse based applications.

SWTBot provides APIs that are simple to read and write. The APIs also hide the complexities involved with SWT and Eclipse. This makes it suitable for UI/functional testing by everyone, not just developers. SWTBot also provides its own set of assertions that are useful for SWT. You can also use your own assertion framework with SWTBot.

SWTBot can record and playback tests and integrates with Eclipse, and also provides for ant tasks so that you can run your builds from within CruiseControl or any other CI tool that you use. You can also use it with testing frameworks like JUnit on Java, or Cucumber on JRuby making it very suitable for writing tests using a scripting language.

SWTBot can run on all platforms that SWT runs on. Very few other testing tools provide such a wide variety of platforms.

Links

  1. SWTBot Home
  2. Download
  3. User-guide
  4. Tutorial
  5. FAQ
139 questions
2
votes
1 answer

Specify a default product for new SWTBot Eclipse run configurations

I'm developing an Eclipse RCP application and running automated GUI tests using SWTBot. When I want to run a test from within Eclipse I right click on the test method (or class), then click "Run As" -> "SWTBot Test". This then runs the test and…
NickG
  • 361
  • 2
  • 11
2
votes
1 answer

Maven/Tycho SWTBot Eclipse RCP

I would like to run my UI Tests SWTBot with Maven/Tycho and Tycho can't get my .product. This my log: !ENTRY org.eclipse.equinox.app 0 0 2017-12-02 16:36:32.573 !MESSAGE Product tychodemo.bundle.product could not be found. ***WARNING: Display must…
2
votes
0 answers

Press [Enter] with SWTBot Keystrokes on Windows

I have a problem with the automation of pressing the [Enter] key using SWTBot. The use case is opening a "date chooser" widget, selecting a date and pressing [Enter] to confirm. While sending a line-feed (LF) worked well on Linux, it failed on…
dokaspar
  • 8,186
  • 14
  • 70
  • 98
2
votes
1 answer

Why is a menu item disabled when using SWTBot?

I've written up a GUI test using SWTBot to test the Extract Method refactoring. I use editor.selectRange() to select a statement to extract into a method. But, when I run the unit test, the Extract Method refactoring menu item is disabled. Thus,…
reprogrammer
  • 14,298
  • 16
  • 57
  • 93
2
votes
1 answer

SWTBot for Lotus Notes java plugin testing

Is it possible to use SWTBot to make automatic GUI tests for Lotus Notes Eclipse Java plugins? EDIT: If yes, how exactly to integrate a Client Services Run Configuration with a SWTBot Test Run Configuration in Eclipse? Certain attributes like the…
Vlad Ilie
  • 1,389
  • 1
  • 13
  • 37
2
votes
1 answer

SWTBot: Press "F5" on project in package explorer

I'm currently trying to press the F5 keybinding using SWTBot tests to refresh a project in the package explorer. So far, I have been unsuccessful. When I attempt to press the F5 keybinding in a way such as this: SWTBotView packageExplorer =…
Citronen
  • 4,050
  • 4
  • 16
  • 20
2
votes
1 answer

SWTBot to drag the mouse

I have a paint program written in java with SWT. I am testing with SWTBot. My test case is to draw a picture on the canvas, capture the image of the canvas, and compare to the expected image. The problem is that I can't find any way to move the…
John Henckel
  • 10,274
  • 3
  • 79
  • 79
2
votes
1 answer

"An unexpected error occured (return code -1)" when trying to launch SWTBot test suite with Tycho

We are writing SWTBot tests for our Eclipse RCP application. Our RCP application includes NatTable components and has authorization mechanism to enable/disable perspectives. The test suite is working fine when launching it from Eclipse. Now we are…
Gaurav
  • 319
  • 3
  • 20
2
votes
1 answer

SWTBot hangs at click

I'm trying to automate a simple new project wizard using SwtBot 2.2.1 . The code is the one that I've found in the tutorial bot.menu("File").menu("New").menu("Project...").click(); The problem is that the click() method call never returns. My…
Robert Munteanu
  • 67,031
  • 36
  • 206
  • 278
2
votes
1 answer

Eclipse SWTBot randomly throws Widget Not Found Exception

I have a Simple test case to create a project, this test case works fine , but all of a sudden, at some try the WidgetNotFound exception is thrown!! Restart the test, the exception is not thrown !! Again after some try WidgetNotFound exception is…
Destructor
  • 3,154
  • 7
  • 32
  • 51
2
votes
0 answers

How to click a Button that only becomes visible on MouseHover over a Composite using SWTBot

I have to use a relatively unknown SWT-Framwork called Riena. This has an ImageButton that is composed of a Composite and a Button(SWT_PUSH). This Button is invisible by default and becomes visible if you hover over the Composite with your mouse. I…
treeno
  • 2,510
  • 1
  • 20
  • 36
2
votes
1 answer

SWTBot test to read the Welcome page text

I'm trying to write a SWTBot test that opens the welcome page view in eclipse and then reads/maps the content into some object (don't care if only string) so I could compare it with the expected text, I thought this is a very trivial issue and that…
Marwan Jaber
  • 611
  • 11
  • 27
2
votes
3 answers

How to install all features from a p2 update site to an Eclipse using the command line?

I want to install SWTBot into Eclipse from their update site. I installed it manually via the UI and it worked. The link I used for repository is: http://download.eclipse.org/technology/swtbot/releases/latest/ Now I am trying to install SWTBot using…
Destructor
  • 3,154
  • 7
  • 32
  • 51
2
votes
1 answer

Trying a get a tree item in tabItem in swtBot but it is not working

I have attached a image describing my problem, i need to access General under GCC Assembler, i tried to focus on the tabItem with index 0, it came properly to Tool Settings tab but GCC Assembler -> General is not found ! Here is the…
Destructor
  • 3,154
  • 7
  • 32
  • 51
2
votes
2 answers

how to call to context menu in swtboot

I want to call to context menu in my application. The issue that I don't have any items in the tree. I active my view and then I want to open context menu. SWTBotView view = bot.viewByTitle("Project Explorer"); …
1
2
3
9 10