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
9
votes
1 answer

Testing SWT GUI with SWTBot

I want to test a simple SWT GUI application with SWTBot. Unfortunatly, I have no idea how to start. There are several tutorials which describe the testing of an Eclipse plug-in but I could not find anything regarding my problem. I don't even know if…
schnipps
  • 93
  • 1
  • 3
5
votes
1 answer

Eclipse(2019-09) crashes while running SWTBot tests in windows docker

I am running swtbot tests inside docker with eclipse 2019-09, the tests run fine if I run them from my host with eclipse 2019-09 but when I run them inside the docker I get the following error !SESSION 2019-11-12 20:17:58.723…
Ragnar
  • 645
  • 8
  • 28
5
votes
1 answer

How to add the plugin with my RCP application in the Tycho SWTBot test runtime

My RCP was created on a 3.x Eclipse and is now on 4.x using the compatibility layer. This is the setup that I have: I have two plugins: xyz-plugin and xyz-rcp-plugin. My RCP application is composed of these two plugins. I have a Test fragment…
nbz
  • 3,806
  • 3
  • 28
  • 56
4
votes
1 answer

SWTBot vs. Unit Testing

We use SWTBot for writing of functional tests. To test some cases is very difficult and some programmers use classes and their methods directly from implementation (for example call methods from class AddUserDialog etc.). Is this good approach? And…
4
votes
2 answers

How to assign unique id to swt widget and get it in swtbot?

I want to assign a unique id to swt widget, and than get back the widget in SWTBot test with this unique id. Is there a way to do it?
Ido
  • 951
  • 1
  • 13
  • 27
3
votes
1 answer

Slow Down SWTBot execution

I would like to slow down SWTBot Execution. I have already found this wiki: https://wiki.eclipse.org/SWTBot/FAQ#Can_I_slow_down_the_execution_speed_of_SWTBot_tests.3F But for me it doesn't work. My DEFAULT_POLL_DELAY in SWTBotPreferences look like…
3
votes
1 answer

Programmatically resize a view in Eclipse

I'm testing an non-e4 RCP application using SWTBot and I need to change the size of my view. (Move the sash-bar) I unsuccessfully tried Resize my view using SWTBot (no such api) Resize my view using Eclipse 3 API (no supported) Resize my view using…
Boris Brodski
  • 8,425
  • 4
  • 40
  • 55
3
votes
0 answers

SWTBot cannot copy/paste on tree items using keyboard shortcuts

I want to copy/paste between two SWTBotTreeItem using CTRL+C/CTRL+V. Using copy/paste with the context menu works well, but I am required to use keyboard shortcuts too. The following code doesn't work: I can't copy the first node. SWTBotTreeItem…
dchaudet
  • 51
  • 7
3
votes
1 answer

Using SWTBot on a Maven Project

I am relatively new to SWTBot. I have installed it through the "install new software" in eclipse. I am trying to use it on an SWT application that was imported from an existing maven pom.xml. This application is not an eclipse plugin. Its just a…
Tiago Veloso
  • 8,513
  • 17
  • 64
  • 85
3
votes
2 answers

using keyboard with swtbot test

I'm trying to run SWTbot test case that uses keyboard short-cuts. I could not find any reference for how to do it. I'm pretty sure that should not be that difficult. I'll appreciate it if someone can write a small snippet. Thanks, Ziv
Ziv Salzman
  • 43
  • 1
  • 3
3
votes
2 answers

SWTBot test outside Eclipse application

I have an application that can run as a regular Eclipse plug-in, and I can test it with my SWTBot tests as usual. The same plug-in application can be installed separately on my computer (like any other windows application). The question is - How…
3
votes
4 answers

How can I navigate the view menu using SWTBot?

Is it possible to the view menu using SWTBot? An example of an view menu is the one of Problems view (see screenshot). For example how can I change the grouping to Type using SWTBot? I've tried: for (final SWTBotViewMenu a :…
aphex
  • 3,372
  • 2
  • 28
  • 56
3
votes
1 answer

Excluding bundles from launching SWTBot tests in tycho

I´m running UI tests for an RCP application using SWTBot, which works fine while launching the tests in the eclipse IDE. Now I want to run the tests in maven, which also works so far. Unfortunately, through the dependency chain…
Alexander Hansen
  • 813
  • 8
  • 14
2
votes
1 answer

How to integrate SWTBot test in Jenkins CI?

I've got a SWT application (not Eclipse RCP based) and I currently test it using SWTBot. This works fine while running the tests from Eclipse. I'm using ant as buildsystem. On Jenkins the tests fail - an exception is thrown [junit] Testcase:…
tuergeist
  • 9,171
  • 3
  • 37
  • 58
2
votes
1 answer

How to run JUnit 5 Tests using Run As > SWTBot Tests in Eclipse

I have a couple of really simple UI tests using SWTBot 2.8.0 (at the time of writing, the latest release). These are kept in an Eclipse plug-in fragment and do not use any JUnit 4 specifics like @RunWith(SWTBotJunit4ClassRunner.class): public class…
Andreas Sewe
  • 1,558
  • 9
  • 18
1
2 3
9 10