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
0
votes
0 answers

SWTBot Test Configuration Error: Not implemented [multiple displays]

I am trying SWTBot configuration, but after validating plugins, when I try to run, it gives the following error. Can some one please help. !ENTRY org.eclipse.osgi 4 0 2015-03-02 02:15:14.672 !MESSAGE Application error !STACK…
Jeevan
  • 447
  • 2
  • 8
  • 19
0
votes
1 answer

Eclipse Plugin Maven project SWTBot

I have a Eclipse Plugin project where I am trying to create SWTBot Test. The test are running fine. But when i try to run Exit the test runs and give positive result and then throws an error. @Test public void executeExit() { SWTBotMenu…
Jeevan
  • 447
  • 2
  • 8
  • 19
0
votes
1 answer

SWTBot for Jface dialog

Am using the following code to create a dialog for my login page. I need to write SWTBot test cases for the dialog that I create. I have written SWTBot for windows but not for jface dialog. How to get the access of the dialog in the test class by…
HareshKannan
  • 83
  • 11
0
votes
1 answer

Eclipse: How to close an Eclipse E4 part in SWTBot

I am writing SWTBot test case for my Eclipse E4 application. In by setUp() (annotated with @Before), I am opening the part using the menu. I would like to close the same in tearDown (annotated with @After). I tried with SWTWorkbenchBot, get the…
Saminathan S
  • 325
  • 2
  • 11
0
votes
1 answer

Clipboard access in SWTBot

How to access Clipboard while running SWTBot tests? Following code throws Invalid thread access. Clipboard clipBoard = new Clipboard(SWTUtils.display()); Object object = clipBoard.getContents(TextTransfer.getInstance()); The above code is working…
Saminathan S
  • 325
  • 2
  • 11
0
votes
1 answer

SWTBot - check if 3rd party application opened

Hi I am writing an SWTBot test which launches a file from a hyperlink using Program.launch. From the bot test I need to check that the 3rd party application opened to display the file. The only thing that seems obvious to me is checking that focus…
Forrie
  • 73
  • 7
0
votes
1 answer

SWTBot on OS X and Jenkins

We have some TCs running on OS X ... and they work fine! We've integrated this (OS X) build on Jenkins. That's our problem! Jenkins log: myTest (com.path.myTest): The widget was null I tried to set "Run Xvnc during build" but when the Jenkins…
Kasper
  • 685
  • 2
  • 11
  • 30
0
votes
1 answer

Separate eclipse plugin.xml for SWTBot test

I have some plugin UI tests running using SWTBot. As a result of this i had to add some libraries for SWTBot and some other things to the dependencies and classpath of the plugin.xml. But i dont want to have these in the software delivery. Is there…
beanie
  • 1
  • 1
0
votes
1 answer

How to handle unpredictable shells in swtbot

In my RCP Application, sometimes some shell are opening on some conditions and i want to handle them. for example: Overwrite shell will open if file is already exist in folder.I want to work on Overwrite shell if it would open. I have tried if…
0
votes
1 answer

SWTBot Restart rcp application in test

I'm having issues creating a SWTBot test that restarts rcp application. When I run a suite of tests from eclipse, when rcp app restarts it also restarts the suite. So the tests that already ran before the restart, will run again. I read that you can…
0
votes
1 answer

How to record a breakpoint in SWTBot record

I have a problem , when i try to put a breakpoint on debug mode and i record with "swtBot Test Recorder" the generated code is : bot.contextMenu("Add Breakpoint...").click(); bot.textWithLabel("Line number:…
0
votes
1 answer

SWTBot: Error while running with tycho

We are writing SwtBot test cases for eclipse RCP application, it is working fine in eclipse. Now we are integrating test suite with existing tycho so that while creating product test case can also execute. Pom.xml created for SWTBot test suite is…
0
votes
1 answer

How to avoid "assertion failed: Could not post keyevent" in SWTBot?

We get an an AssertionFailedException on our Build-Server, but the Tests run well when started in the IDE. The Build-Job is running on Windows and not as a Service, so this should not be a problem.…
Chriss
  • 5,157
  • 7
  • 41
  • 75
0
votes
2 answers

SWTBot test - Drag and Drop from tree to editor

Good Morning all (or afternoon or evening respectively), I am trying to build a SWTBot test that drags a node from a Tree Viewer into a diagram editor (using Graphiti, don't think that matters). The node to be dragged is in it's own view, not in…
BiggPlanet
  • 77
  • 1
  • 12
0
votes
2 answers

How do I launch a certain project using SWTBot

Not every plugin can be tested without project. For example, I want to test CDT-Plug-in, therefore I need to import a C-project. But there is no such point in Run Configuration and when I'm trying to record importing actions via SWT Plug-in Test…