Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swing Library Keywords are not displaying in RIDE #2

Open
nadeemsharif opened this issue Sep 17, 2011 · 10 comments
Open

Swing Library Keywords are not displaying in RIDE #2

nadeemsharif opened this issue Sep 17, 2011 · 10 comments

Comments

@nadeemsharif
Copy link

Hi ,
I have downloaded the SwingLibrary1.02 and also added it to ClassPath but RIDE is not showing any Swing Keywords.
I was reading on robotframework website that i have to create spec file for Java libraries.

Could you please let me know how to create Spec file for Swinglibrary.

I need help.

@pekkaklarck
Copy link
Contributor

Creating library specs for RIDE is discussed here:
http://code.google.com/p/robotframework-ride/wiki/KeywordCompletion

I think we should make SwingLibrary's spec available here on downloads, though.

@nadeemsharif
Copy link
Author

Thanks for the URL.
It would be great if you make SwingLibrary spec file and make it available to download for others.

I don't think it will take more of your time to do that , kindly do that.

Thanks , looking forward to spec file in download area.

@nadeemsharif
Copy link
Author

Hi,
I have tried to create spec/xml file for swinglibrary-1.2 but command prompt is displaying error message

I have following settings on my machine:
Python Installation : C:\Python27
Jython Installation : C:\jython2.5.2
LibDoc Version 2.6.1 File : C:\libdoc.py

Robotframework: C:\Python27\Lib\site-packages\robot

On command prompt i am sending two commands.

C:>set CLASSPATH=C:\Program Files\Java\jdk1.7.0\lib\tools.jar:swinglibrary-1.2.jar

C:>jython -Dpython.path=C:\Python27\Lib\site-packages/ libdoc.py -f xml SwingLibrary

Following error message appears

Importing test library 'SwingLibrary' failed: ImportError: No module named SwingLibrary

@yanne
Copy link
Contributor

yanne commented Sep 19, 2011

I enhanced our build process to also produce the Spec file for RIDE.

I uploaded Spec for 1.2 in the Downloads section.

Just unzip the file, and make sure that the directory containing SwingLibrary.xml is in the PYTHONPATH when RIDE runs

@yanne yanne closed this as completed Sep 19, 2011
@nadeemsharif
Copy link
Author

Thanks for the XML. It is working now.

@yanne
Copy link
Contributor

yanne commented Sep 21, 2011

Good to hear.

@sixsigmapymes
Copy link

FAILS testing Swinglibray demo on RIDE

STEEPs

1.Install RIDE 1.1

2.Load Test Swinglibrary Demo

The ERROR LOGG

Demo1.Example | FAIL |
Suite setup failed:
No keyword with name 'Start Application' found.

2 critical tests, 0 passed, 2 failed

2 tests total, 0 passed, 2 failed

Demo1 | FAIL |
2 critical tests, 0 passed, 2 failed

2 tests total, 0 passed, 2 failed

Output: c:\windows\temp\RIDExpkebb.d\output.xml

[ ERROR ] Error in file 'C:\roboframework\Python27\SwingLibrary-master\demo1\example.txt' in table 'Settings': Importing test library 'SwingLibrary' failed: ImportError: No module named SwingLibrary
Traceback (most recent call last):
None

@HelioGuilherme66
Copy link

I too have been strugling to get RIDE fully working with SwingLibrary projects. Maybe a better documentation should be writen.

This is what I have found:
To have the keywords documented in RIDE we the SwingLibrary.xml must be found by RIDE. This spec file MUST be renamed to SwingLibrary.xml loosing the version suffix.

These projects must be run with Jython (or jybot).
To execute SwingLibrary projects from RIDE, the CLASSPATH must have all required .jar files including the application under test and swinglibrary-1.5.3.jar. It is not clear if the JYTHONPATH must point to the folder where .jar exist.

To run project from RIDE, since the environment vars must be set, we cannot use jybot, but run a custom script (in Windows .bat). This is an execution from Command Window:
C:\ROBOT\swinglibrary-demo>set CLASSPATH=C:\ROBOT\swinglibrary-demo\lib\swinglibrary-1.5.3.jar

C:\ROBOT\swinglibrary-demo> C:\jython2.5.3\jybot C:\ROBOT\swinglibrary-demo\example.txt

Example

Test Add Todo Item | PASS |

Test Delete Todo Item | PASS |

Example | PASS |
2 critical tests, 2 passed, 0 failed

2 tests total, 2 passed, 0 failed

Output: C:\ROBOT\swinglibrary-demo\output.xml
Log: C:\ROBOT\swinglibrary-demo\log.html
Report: C:\ROBOT\swinglibrary-demo\report.html

I have attempted with jybot from RIDE but without success.

But using a custom script whe can execute the test and then look at report outside RIDE. This is a functional example:
C:\ROBOT\swinglibrary-demo\run_demo.bat
content:
C:\ROBOT\swinglibrary-demo\run_demo.py C:\ROBOT\swinglibrary-demo\example.txt

@pekkaklarck
Copy link
Contributor

We should enhance getting started documentation to explain how to take SwingLib into use in RIDE. In addition to explaining using specs, should also explain that tests must be run with Jython.

Should also consider could RIDE handle specs with version in them automatically or should we perhaps drop the version from the distributed specs. We could just have the latest spec in the source repository (would automatically have all versions available under tags) or possibly under wiki. Library version is visible inside the spec so having it in the file name isn't mandatory.

@pekkaklarck pekkaklarck reopened this Mar 5, 2013
@HelioGuilherme66
Copy link

In short we need to:
Ensure that SwingLibrary.xml is always found by RIDE (if simple and not problematic drop version from filename).
Instruct users that even if keywords are found/documented in RIDE the test execution must be done with jython (this exist but not near RIDE documentation).

Secondarily:
(My wish would be to have all required options set when selecting execution from RIDE, and getting proper report and logs in HTML)
Let's say we have a template where the class under test must be defined and dependencies packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants