Created
September 10, 2014 19:52
-
-
Save kirillzh/7b587f3b0795987c60bf to your computer and use it in GitHub Desktop.
RF Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is located in "robot" folder | |
*** Settings *** | |
Documentation CommonResource file with KWs | |
Library OperatingSystem | |
*** Variables *** | |
${SRC_PATH} ../../src/ | |
*** Keywords *** | |
Compile Class | |
[Arguments] ${class_name} ${path}=${SRC_PATH} | |
Run javac ${path}${class_name}.java | |
Run Java Class | |
[Arguments] ${class_name} ${path}=${SRC_PATH} | |
Compile Class ${path} ${class_name} | |
${output}= Run java -cp ${path} ${class_name} | |
Log ${output} WARN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file is located in "src" folder | |
*/ | |
public class Test { | |
public static void main(String[] args) { | |
System.out.println("Hello World!"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is located in "robot/Tests" folder | |
*** Settings *** | |
Documentation Running Java class with RF | |
Resource ../CommonResource.robot | |
*** Testcases *** | |
TestOne | |
Run Java Class Test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment