Comments (17)
Also, i can't execute because no runtime environment is present. Is there any way to do it with maven plugin?
from red.
Hi,
It seems that you're seeing this error because RED is not able to locate python installation with RF installation. It is needed for various reasons. Please go to eclipse preferences and then in Robot Framework / Installed frameworks add your local directory where python is installed (or jython)
from red.
Hi @michalanglart
Actually i am using robotframework maven plugin which does not need to install anything extra(python,jython etc) to run robot framework in java. (http://robotframework.org/MavenPlugin/)
Please let me know how i can use RED for it now
from red.
Hello,
I didn't understood you correctly in previous comments. I gave it a thought once again, but I don't have good news.
It is currently not possible to make it work without actually having python interpreter installed (I will always refer to language itself when writing "python" and CPython when referring to its standard interpreter) and robot framework installed in it. RED needs that because it starts background server using this interpreter and communicates with this server all the time in order to for example generate libraries specifications. This interpreter can be one of following: CPython, Jython, IronPython or PyPy.
On the other hand this maven plugin downloads a single jar from maven repository which contains both the jython code and RF code, so you don't need to install anything (beside Java to run jython from this jar).
In order to make it possible RED should provide a way to point which jar file contains jython interpreter (it is located in your local maven repository) , but this is not possible at the moment.
We we'll discuss it with team and investigate issue further.
Cheers!
from red.
@mhshaikh: Can I ask you simple question: What kind of IDE do You use, when you write RF tests? As far as I know RIDE do not support Maven Plugin itself and I do not see this kind of support in any other RF IDE tool.
Anyway for me introduce Maven Plugin support for RED, will be equal to answer questions:
- where libraries are defined and robot version - in red.xml or pom.xml? I do not like personally, if someone required for me to manage configuration in multiple files;
- should we override current Maven RF Plugin configuration defined in pom.xml file - since we use
listener
andSuiteVisitator
API to supportRun\Debug
andAutodiscover
libraries - disable this because of user configuration, will be equal to really blind tool; ForSuiteVisitator
as I see Maven pom parameter even not exists, so we will be need to wrote RF parameter to file and useargumentFile
.
As I see main reason for introduce Maven RF Plugin, was to introduce currently exists test cases to Maven build phase, since Authors wrote: it's a non-invasive way of introducing acceptance test driven development to your existing projects quickly.
The issue with pure robotframework*.jar download by Maven is that is not start as Jython or Python interpreter, but as RobotFramework tool with options to run
, verify
or generate libdoc
. Therefore it will be not work with RED. The only possibility to use it is to create some kind of wrapper (currently custom script is not supported) for it with specific name like jython.exe or python.exe - I made such one by using http://launch4j.sourceforge.net/ it works when I set main class as org.python.util.jython
.
from red.
Hi @adam-wypych : I am using eclipse as a IDE for RF tests. Yes, RIDE does not support Maven plugin.
- I guess it should be on pom.xml because most likely if we are doing it with maven then we will modify pom.xml and won't do anything in red.xml
I really appreciate your efforts to understand my issue. I also agree that we can have some wrapper between Maven jar and RED plugin. But to be frank i don't know how to do it. I will look into link provided by you and help from your side will be appreciated:).
from red.
Hi,
@mhshaikh Are You using windows or linux?
from red.
Windows
from red.
Ok I will try to prepare simple FAQ with description how to create such wrapper.
from red.
Thank you so much Adam
from red.
- Download from https://sourceforge.net/projects/launch4j/files/launch4j-3/3.8/ applicable for Your OS package - I am using
launch4j-3.8-win32.zip
(it is standalone version, which requires only unzip) - Run
launch4j.exe
GUI application - In
Basic
tab setOutput file:
to be jython.exe application, the location i.e. You desktop directory and switch onDont't wrap the jar, launch only
option.
- In
Classpath
tab switch onCustom classpath
and setMain class:
toorg.python.util.jython
. InEdit item:
please putrobotframework*.jar
and pressAccept
button. Please repeat this still and add also%RF_JAR%
variable.
- In
Header
tab just switchHeader type
fromGUI
toConsole
.
- In
JRE
tab please put inMin JRE version
value1.7.0
.
- After this in main menu please press
Build wrapper
- thisoption \ tools
icon:
. The application will ask you for save configuration, it is required - the name of configuration and place where it will be located is optional. - If everything was done ok you will be able to see in
Log
text area information aboutSuccessfully created
file.
The created jython.exe
file has to two possibilities to set robotframework*.jar
location:
- via already set variable
%RF_JAR%
you can set it inSystem Variables
- using jar located in the same directory where
jython.exe
file is present
The last test before integration with RED - is to test if executable file was compiled ok and will work, for this I executed in command line set RF_JAR=D:\userdata\wypych\Desktop>set RF_JAR=C:\Users\wypych\.m2\repository\org\robotframework\robotframework\3.0\robotframework-3.0.jar
and after jython.exe -m robot.run --version
if You will see information like: Robot Framework 3.0 (Jython 2.7.0 on java1.*)
it means that You can integrate jython.exe
with RED.
After this You can just integrate jython.exe
with RED for do this please:
- put
jython.exe
file tobin
directory it could be anywhere, but it must be inbin
- i.e. I put it inC:\bin\
. - I chose option to copy
robotframework*.jar
to thisbin
directory instead of setRF_JAR
environment variable :) - run
eclipse.exe
orRED.exe
depends on which RED version You are using plugin / product - go to
Window -> Preferences -> Robot Framework -> Installed frameworks
preference - Click
Add...
button and select Yourbin
directory - if everything will be ok, you should see information about
Robot Framework *.* version
. - when you will create RED project or execute
Clean\Build
You should see inRobot Standard libraries
standard libraries like i.e.BultIn
with information about keywords, which they contains.
I hope it helps :)
from red.
Hi,
Any feedback?
from red.
I will try and let you know
from red.
Thank you so much @adam-wypych
Its working. I will explore RED more and will get back to this good community in case of any issue.
from red.
@mhshaikh: Thanks for feedback :) If is ok for You, I will close this issue and in case of any other problem You can create new ticket.
from red.
yeah sure.
from red.
I did have some difficulties using this approach and so I created another solution. Please have a look at https://github.com/gpaulissen/jython/blob/master/BLOG.md
from red.
Related Issues (20)
- eclipse+RED Robot Editor,False positive error HOT 1
- Cannot find RED.exe or any .exe files in RED master. Perhaps I'm the fool but it's really not clear to me how to go about installing RED without an executable file. HOT 1
- any plan to support robot framework 4.0? HOT 2
- Successfully imported python library does not see its keyword in run HOT 1
- Cannot use Undo in Eclipse HOT 4
- Guideline for Developer : How to build and debug Red Plugin source code HOT 2
- An internal error occurred during: "Looking for Python installations". HOT 2
- How to rerunfailedsuites using maven plugin
- With latest version of Robot Framework i am unable to get assistance calls HOT 1
- RED can not support adding library by pyc files
- How can I configure the working directory for a test execution? HOT 4
- 'Building' has encountered a problem. An internal error occurred during. "Building" HOT 5
- Unable to communicate with XML-RPC server HOT 2
- Missing requirement: org.eclipse.equinox.app 1.4.400.v20191212-0743 requires 'osgi.ee; (&(osgi.ee=JavaSE)(version=1.7))' but it could not be found
- does RED editor support Robot framework 5? HOT 2
- Library not being recognized using Red HOT 3
- Error while building new Project
- Unable to open .robot files after RED installation in Eclipse: Unable to initialize Suite editor HOT 3
- Is Eclipse and RED supporting Robotframework 6.0?(Project is not building in Eclipse with RED "https://sourceforge.net/projects/red-robot-editor/files/repository/0.9.1/)
- Library specification generation problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from red.