lte2000 / intellibot

IntelliJ/PyCharm plugin for Robot Automation Framework
https://github.com/lte2000/intellibot
MIT License
90 stars 27 forks source link

Support for robot builtin variables #12

Closed snehaagrawal6034 closed 3 years ago

snehaagrawal6034 commented 4 years ago
Taken from user guide ${CURDIR} An absolute path to the directory where the test data file is located. This variable is case-sensitive.
${TEMPDIR} An absolute path to the system temporary directory. In UNIX-like systems this is typically /tmp, and in Windows c:\Documents and Settings\\Local Settings\Temp.
${EXECDIR} An absolute path to the directory where test execution was started from.
${/} The system directory path separator. / in UNIX-like systems and \ in Windows.
${:} The system path element separator. : in UNIX-like systems and ; in Windows.
${\n} The system line separator. \n in UNIX-like systems and \r\n in Windows.

I can send a pull request if it works with you. My understanding is that it should be a change in RobotFileManager.java

Another tangential suggestion - do you ever want to move this plugin to gradle, it will be far easier for others to setup. If you are ok with that I can open another issue.

lte2000 commented 4 years ago

Thanks for your suggestion. I‘m curious how do you resolve these dynamic variables during editing time. One possibile scenario I can image is all test suites are located in local system and will be executed at the same place. In our project, many person develope keywords and testdata under their own home directory of the PC which may be Linux or Windows, then push to Gerrit repo. The test cases will be pulled and executed on many test platform with different product configuration. So for my limited experience, the values of these variables resolved by the plugin are not correct, except ${CURDIR} if the purpose is to use relative path.

For gradle, I have no plan. Current configuration is following the instruction in the original millennialmedia/intellibot. And in IntelliJ IDEA, only one menu click is required to build/clean/re-build the project. It's quite easy.

bangarharshit commented 4 years ago

${EXECDIR} - can't it be project root? is that different for different individuals? Most of the things can have reasonable default like ${/} just add the same to the path based on OS.

or can we add this as configuration - like i can enter what is the value I need for ${EXECDIR}.

mecanda12 commented 4 years ago

global variables are not supported in the new Pycharm community version 2020.2. example ${EMPTY}, ${None}. Is there any workaround to fix this issue? If not possible to fix in the plugin then how we can fix it in the project? Any help that will be great.

lte2000 commented 4 years ago

fixed in v0.10.143.390.

mecanda12 commented 4 years ago

This issue is fixed on new version 0.10.143.390.