GithubHelp home page GithubHelp logo

robotframework / remoteapplications Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 4.0 14.71 MB

A Robot Framework test library that enables using libraries in external JVM.

License: Other

Python 21.89% Java 78.11%

remoteapplications's Introduction

Robot Framework

Robot Framework ® is a generic open source automation framework for acceptance testing, acceptance test driven development (ATDD), and robotic process automation (RPA). It has simple plain text syntax and it can be extended easily with generic and custom libraries.

Robot Framework is operating system and application independent. It is implemented using Python which is also the primary language to extend it. The framework has a rich ecosystem around it consisting of various generic libraries and tools that are developed as separate projects. For more information about Robot Framework and the ecosystem, see http://robotframework.org.

Robot Framework project is hosted on GitHub where you can find source code, an issue tracker, and some further documentation. Downloads are hosted on PyPI.

Robot Framework development is sponsored by non-profit Robot Framework Foundation. If you are using the framework and benefiting from it, consider joining the foundation to help maintaining the framework and developing it further.

Latest version License

If you already have Python with pip installed, you can simply run:

pip install robotframework

For more detailed installation instructions, including installing Python, see INSTALL.rst.

Robot Framework requires Python 3.8 or newer and runs also on PyPy. The latest version that supports Python 3.6 and 3.7 is Robot Framework 6.1.1. If you need to use Python 2, Jython or IronPython, you can use Robot Framework 4.1.3.

Below is a simple example test case for testing login to some system. You can find more examples with links to related demo projects from http://robotframework.org.

*** Settings ***
Documentation     A test suite with a single test for valid login.
...
...               This test has a workflow that is created using keywords in
...               the imported resource file.
Resource          login.resource

*** Test Cases ***
Valid Login
    Open Browser To Login Page
    Input Username    demo
    Input Password    mode
    Submit Credentials
    Welcome Page Should Be Open
    [Teardown]    Close Browser

Tests (or tasks) are executed from the command line using the robot command or by executing the robot module directly like python -m robot .

The basic usage is giving a path to a test (or task) file or directory as an argument with possible command line options before the path:

robot tests.robot
robot --variable BROWSER:Firefox --outputdir results path/to/tests/

Additionally, there is the rebot tool for combining results and otherwise post-processing outputs:

rebot --name Example output1.xml output2.xml

Run robot --help and rebot --help for more information about the command line usage. For a complete reference manual see Robot Framework User Guide.

Interested to contribute to Robot Framework? Great! In that case it is a good start by looking at the CONTRIBUTING.rst. If you do not already have an issue you would like to work on, you can check issues with good new issue and help wanted labels.

Remember also that there are many other tools and libraries in the wider Robot Framework ecosystem that you can contribute to!

Robot Framework is open source software provided under the Apache License 2.0. Robot Framework documentation and other similar content use the Creative Commons Attribution 3.0 Unported license. Most libraries and tools in the ecosystem are also open source, but they may use different licenses.

Robot Framework trademark is owned by Robot Framework Foundation.

remoteapplications's People

Contributors

jussimalinen avatar mikahanninen avatar pekkaklarck avatar spooning avatar yanne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

remoteapplications's Issues

FAIL AttributeError: 'Namespace' object has no attribute '_testlibs'

Could you help me check this issue?
version: remoteapplications-2.0.jar swinglibrary-1.7.0.jar/swinglibrary-1.9.1.jar/swinglibrary-1.9.6.jar

KEYWORD RemoteApplications . Take Libraries Into Use SwingLibrary
Documentation:
Takes the libraries into use at the remote application.
Start / End / Elapsed: 20170313 07:00:02.846 / 20170313 07:00:03.292 / 00:00:00.446
07:00:03.240 INFO Mar 13, 2017 7:00:03 AM org.robotframework.remoteapplications.org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [org/robotframework/remoteapplications/client/clientContext.xml]
07:00:03.291 FAIL AttributeError: 'Namespace' object has no attribute '_testlibs'

Thanks.

RemoteApplications agent keeps the the jvm running until System.exit is called.

Steps to reproduce:

  • Download remoteapplications-1.3.jar to a local directory (eg C:\RemoteServer_Test\lib)
  • Set JAVA_TOOL_OPTIONS variable to point cause that jar to be loaded (eg SET JAVA_TOOL_OPTIONS=-javaagent:"C:\RemoteServer_Test\lib\remoteapplications-1.3.jar"="C:\RemoteServer_Test\lib")
  • Execute Java in the same command window

Expected reult:

  • Java prints command line help and exists

Actual result:

  • Java prints expected command line help and hangs until terminated (Ctrl-c)

This is exactly how the remote applications library gets injected into Java applications, so the fact that it prevents Java processes from quitting as expected, causes applications to hang. This is particularly problematic if child Java processes get created by an application that don't have any GUI as they just sit there and never terminate.

Note:
The way to work around this is to connect to the process using the Application Started keyword and then call Close Application. That will then free us the process.

Java 7 get "Calling dynamic method 'get_keyword_names' failed: ExceptionInInitializerError"

Hi

I don't kwon if this is an issue or not, but i need help to understand what happen.

I always use the remoteApplications to launch my application by JLNP. In java 6, this work fine, no problem...
After change to Java 7 (1.7.0_60-ea) stop to work, i get this when use "Take Library Into Use":

"Calling dynamic method 'get_keyword_names' failed: ExceptionInInitializerError"

If my application are local (jar file in my pc), i don't get any problem.

Anybody can help me?

Thanks in advance.
Filipe Duarte

`Start Application` keyword should throw an error if lib_dir references to non-existent folder

When I'm using RemoteApplications, I would like the Start Application keyword to raise an error or a warning when the path I've given to the lib_dir-argument is pointing to a non-existent folder.

This is especially useful with Java Web Start, where using the lib_dir -argument is mandatory. Right now, if I accidentally use the wrong path, Take Library Into Use fails with NoClassFoundException, which could also be a result of CLASSPATH problem. This would isolate the situation where I have a typo in my path.

Mixed Arguments when starting JNLP

Used components

  • remoteapplications-2.0.jar
  • Robot Framework 2.7.7
  • Python 27
  • Jython 2.5.3
  • Java 1.7.0_21

To Reproduce

  • remoteapplications-2.0.jar is added to CLASSPATH and to Settings in Test Suite (Library RemoteApplications)
  • Start Test Case containing
    "Start Application | EVL | javaws ${JNLP EVL} | 60 seconds | ${LIB DIRECTORY}"
  • kill javaw.exe (because of issue #8)
  • Java Web Start continues but ends up with error "Invalid ArgumentException"

Error

The arguments list in Java Console looks like this (xxx = placeholder):
"1>, c:\temp\remote_EVL_1369810615.txt, 2>&1, http://xxxxxxxxxxx/evl.jnlp"

And in VisualVM
ra_mixedarguments

rmi binding fails when SUT and Robot FW reside in different machines

An Exception:
java.rmi.AccessException: Registry.Registry.rebind disallowed; origin xxx.xx.xxx.xx. is non-local host

is thrown when trying to run cases via remoteapplications-1.3.jar from remote machine. I have Robot FW 2.7.6, Python 2.7, Jython 2.5.3, SwingLibrary 1.5.3. and Java 7u13. I can launch testing with Application Starter keyword only when I run tests on a local machine (Robot FW and SUT are in the same PC). I have tried to add the .java.policy file, but that does not help either.

This should be easily reproduced by modifying the swinglibrary-demo project to use a remote connection via two remoteapplication-1.3.jar files.

For more information please refer to the post:
https://groups.google.com/forum/?fromgroups=#!topic/robotframework-users/sJqIaycNw90

Thanks,
Jarmo

PS. Basically I am trying to get the SwingLibrary to work as a remote server. If this can be done by some other way than using the remoteapplications-plugin I would be very happy to hear about it.

Problem with the Keyword "Start Application" when >=2 JREs are registered

There is a problem with the Keyword "Start Application" when >=2 JREs are registered. The connect works correct (connected.txt is created), but the application does not come up. There is a javaws-Process in the task list, but it doesn't happen anything. Is it a known bug? Are there any workarounds?

When I use the javaagent-option and connect to the application with the "Application Started"-Keyword than it works perfectly.

Save the output from started application

When calling start application, the output is lost. This makes it very difficult to debug problems when the application does not start or misbehaves in some other way.

Unable to launch Windows shortcuts or batch files

I am experiencing a problem with v2.0 where I am unable to launch an application using the Start Application keyword when providing the path to the application as an .lnk or .bat file. The logging does not show anything useful - the relevant parts being:

Directing output to <a href="c:\users\trobin~1\appdata\local\temp\1\remote_pvclient0_1403237745.txt">c:\users\trobin~1\appdata\local\temp\1\remote_pvclient0_1403237745.txt</a>
Starting with command %s  1> "%s" 2>&1
20140620 16:16:45.179 : TRACE : Trying to connect to rmi url ''
...
20140620 16:16:45.201 : TRACE : Trying to connect to rmi url ''
20140620 16:16:45.288 :  INFO : The filename, directory name, or volume label syntax is incorrect.
20140620 16:16:45.303 :  FAIL : Could not connect to application pvclient0
20140620 16:16:45.303 : DEBUG : 
Traceback (most recent call last):
  File "__pyclasspath__/RemoteApplications.py", line 825, in run_keyword
  File "__pyclasspath__/RemoteApplications.py", line 753, in run_keyword
  File "__pyclasspath__/RemoteApplications.py", line 521, in start_application
  File "__pyclasspath__/RemoteApplications.py", line 635, in _application_started
  File "__pyclasspath__/RemoteApplications.py", line 226, in application_started
  File "__pyclasspath__/RemoteApplications.py", line 240, in _connect_to_base_rmi_service
  File "__pyclasspath__/RemoteApplications.py", line 262, in _could_not_connect

This is a regression as this keyword worked fine for us in earlier versions of Remote Applications.

On further investigation, I believe that commit 0a04d82 has introduced this regression. The reason being that:

  1. os.popen has been deprecated since python 2.6
  2. changing os.popen(cmd) back to subprocess.Popen(cmd, shell=True) fixes the issue for us

Self-tests fail using openjdk 7

Running mvn test using openjdk 7 fails with:

Tests in error: 
  addsJarsToClassPath(org.robotframework.remoteapplications.agent.RmiServiceAgentIntegrationSpec$Any): Expected: [helper-keywords.jar, remoteapplications.jar, swinglibrary.jar, helper-keywords.jar], but was: []

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.