Eclipse Java: missing jars from plugin library, recommend alternatives or solution?

447 Views Asked by At

I am attempting to use a forked version of googles windowtester pro which was updated to work with eclipse 4.4.x: github.com/fredg02/windowtester/releases

I'm currently using eclipse 4.5.2, but wanted to see if the package would work. I used the "Install New Software..." widget to add the plugin to eclipse, and it seem's to have been successful. I am able to record user input off my java SWT gui and generate test code. After a test has been generated, I got an error with importing:

enter image description here

I went to the test project's build path to see if something was missing and within WindowTester's library 3 .jar files are missing:

enter image description here

I noticed that the 3 missing .jar files have "file:\C:..." infront of them so it seems as if eclipse is looking at the wrong path. I've checked and the 3 missing jars are located in "C:\eclipse\plugins\". Additionally, I attempted to individually import the all the jar's from the WindowTester Runtime, but that failed.

If there is a way to fix this so WindowsTester can be used that would be great. Or if there is a alternative plugin that can be recommended that would be useful also. I need something to record user input on a SWT gui and generate code that can be used with junit.

2

There are 2 best solutions below

0
On BEST ANSWER

The WindowTester Runtime library refer to jar of com.windowtester.???.runtime plugins.
But these plugins are not unpacked during installation. A solution is install these plugins manually, please create following folders structures :

$ECLIPSE_HOME/
  dropins/
    wintest/
      eclipse/
        features/
        plugins/
          com.windowtester.runtime_6.1.2.e44x201511061925/
          com.windowtester.swing.runtime_6.1.2.e44x201511061925/
          com.windowtester.swt.runtime_6.1.2.e44x201511061925/

Download repository zip and unpack it first:

  1. Unpack plugins/com.windowtester.runtime_6.1.2.e44x201511061925.jar to folder com.windowtester.runtime_6.1.2.e44x201511061925/
  2. Unpack plugins/com.windowtester.swing.runtime_6.1.2.e44x201511061925.jar to folder com.windowtester.swing.runtime_6.1.2.e44x201511061925/
  3. Unpack plugins/com.windowtester.swt.runtime_6.1.2.e44x201511061925.jar to folder com.windowtester.swt.runtime_6.1.2.e44x201511061925/
  4. For other plugins/*.jars, check the file list of it's content. If any jar file exist, I suggest you unpack it using the same rule. Otherwise, you can copy it to $ECLIPSE_HOME/dropins/wintest/eclipse/plugins.
  5. Copy features/*.jar to $ECLIPSE_HOME/dropins/wintest/eclipse/features
  6. Restart Eclipse.
0
On

Please make sure, when you create the UI test, that you have the following option enabled:

enter image description here

Just to make sure, here is what I did to set up a WindowTester test:

  1. Download and install Eclipse 4.5.2
  2. Download WindowTester repository zip file from: https://github.com/fredg02/windowtester/releases/download/6.1.2-beta1-e44x/com.windowtester.repository-6.1.2.e44x201511061925.zip
  3. In Eclipse: Help -> Install New Software... -> Add... -> Archive...
  4. Select the WindowTester repository zip file and click OK
  5. Click "Select All" and "Next" a couple of times until WindowTester is installed and Eclipse restarts
  6. Create a new "Record configuration"
  7. Run the "Record configuration" and record a simple test
  8. After the test, the "New UI test" dialog should pop up
  9. Make sure the above mentioned option is selected
  10. Once the test has been created there should be no build path problems