How can we redirect 'RobotTempDir' folder to save at different location on windows 10? - robotframework

I am working with Robot Framework using RED editor on Eclipse IDE. When i ran a Robot test case an error as shown in the screenshot has occurred
Upon tracing back my actions, I have noticed that RobotTempDir... got deleted from Temp folder. I restored that folder and ran the test case. Then it executed successfully.
In future there are chances that while cleaning temp folder contents, RobotTempDir... may get deleted unknowingly. Is there a way to redirect this RobotTempDir... contents to save in a different location?
I looked into the C:\Python36\Lib\site-packages\robot path and didn't find any files where i can change/update Robot temp folder details.

The TestRunnerAgent.py is not part of the Robot Framework application but instead comes with the RED plugin. It is part of their Robot Run functionality which allows it to retrieve information from Robot Framework while it is running.
This information is then displayed in the Eclipse Message Log panel or used when using the RED debugger functionality.
In my view this file is generated every time Eclipse is started and I think the only time this error would occur is when that file/folder is deleted while Eclipse is running. Restarting Eclipse should fix this.

TestRunnerAgent.py is custom listener which is attached to Robot process to report back to RED what is happening during test execution. For normal test runs,this is Execution View information,also Message Log stuff printed there. For Debug run, TestRunnerAgent.py allows to control execution process (breakpoint stop,stepping) and changing internals of Robot (state of variables).
It is embedded in RED package,and as you said, it is temporary placed in Temp dir for execution. If you would like to check source,either check jar file: org.robotframework.ide.core-functions-0.0.1-SNAPSHOT.jar or on GitHub: https://github.com/nokia/RED/tree/master/src/RobotFrameworkCore/org.robotframework.ide.core-functions/src/main/python/scripts
Back to your issue:
RED starts Robot execution with following command:
<selected python interpreter> -m robot.run --listener <path to TestRunnerAgent.py> <details what to run and other miscs>
There is no indication of error such error in TestRunnerAgent.py although there is in RobotLaunchConfigurationDelegate.java which tries to start Robot using interpreter in current Project configuration. I assume that there is something wrong in your env setup (either in RED or in OS)
I would suggest to check following:
check if you selected proper python interpreter with installed Robot (from Windows->Preferences-> RobotFramework ->Interpreters
check if your project looks similar as here: http://nokia.github.io/RED/help/user_guide/quick_start.html
you can try to use custom script to catch robot execution command and remove --listener part to validate if this is the culprit: http://nokia.github.io/RED/help/user_guide/launching/local_launch_scripting.html
there should be command in Console View - try to run it by yourself

Related

How to troubleshoot .app bundle not working

I have been making an application using Javafx, and have finished the project turning it into an application. However, when I try to run the application it immediatley crashes with know error messages, nothing is printed to the console. As a note, the .jar file runs if clicked. This has led me to believe that the problem is with my file structure namely the fact that their are 2 binary files in the Java folder.
Here is my .app packages contents:
A fix to my problem would be nice, however beyond that how should one go about debugging this sort of thing, I can not find any log messages, can it be done?
Edit: Nothing is printed when in terminal I use open -a ApplicationName and the application crashes. And here is my info.plist.

Exception occured while invoking remote Soa service by httpClient

My IDE is IDEA Intellij.
By this IDE i run the program directly and get the right response successfully.
Now i build this program to a jar file by IDEA,
and i run the jar file in windows command line by:
java -jar XXX.jar
then error occurred in a line which looks like impossible to see error.
eg:in the line which defines a parameter etc.
I don't know exactly what case this error,just the ways of run the program are different.By the way i can't update the source code which i invoke by jar file.
When you run your app in IDEA, look for the "Run" tab that opens.
The first line there tells you exactly how Intellij has launch the app (just click on the full line to see if it is truncated with "..." ):
Java executable used
(some parameters set by Intellij you don't need to worry about)
(tons of classpath items you don't need to worry about)
the main class used
the program parameters used.
I am pretty sure that if you use these information to build your command line, it will succeed. The main class may be different than the one used by running your app with "java -jar" or some arguments may differ or be missing.

XCode open file at error line for custom build script

I Apologize if this question has already been asked. i can't seem to find it anywhere if it has.
I have a custom build script use to syntax check some php files and upload them to a server, and this is executed as a part of the build process. since this script is used to parse inline php statements (embedded in objective c blocks using macros) it's fairly critical this script happens on each build. the actual execution is working fine, i'd just also like to be able to open a particular file when there is an error, and locate the cursor in the approximate location.
i have found that since xcode is configured on my system to open .php files by default (not sure if that's the norm or if i did it manually at some point), using
open filename.php
in a shell script opens the file.
i'd like to be able to specify the line number too.
eg something along the lines of
open filename.php --args --jump-to-line 1234
(--args is a switch for "open" meaning pass the arguments on to Xcode)
any ideas?
You can use the xed command. Only works for Xcode 3 though, not other editors. For Xcode 4, try this
See man xed

Error MSB3025: using CruiseControl.net - Builds fine from command prompt

I'm hoping someone has seen this error before. I'm using MSBuild with CruiseControl.Net to run the build for this project. When i run the build from the command prompt it actually builds without errors, but when i run it with CruiseControl.net i get the following error:
error MSB3025: The source file "C:\PE\PE-DEV\UIProjects\FolderName\" is actually a directory. The "Copy" task does not support copying directories.
6 Warning(s)
1 Error(s)
Time Elapsed 00:01:50.07
I have been doing a search and nothing with that error number shows up in google. Any help will be greatly appreciated.
<msbuild>
<executable>C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>C:\PE\PE-DEV</workingDirectory>
<projectFile>Solution.sln</projectFile>
<buildArgs>/p:Configuration=DeployDev;BuildMode=DRYRUN;CreatePackage=true /fileLogger /verbosity:normal</buildArgs>
<targets>Build</targets>
<timeout>900</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
This task works fine in other projects... If i use command prompt and run msbuild it works fine as well.
If it works when you run it from the command prompt (runs using your user account and permissions) and fails when running under CC (runs under whatever service account cc is running) it might be a permission issue. Try changing the account that cc.net runs under to your own account and see what happens.
This one was a tricky one, i was able to make the project work. The issue was the deploy build xml file had a typo somewhere and i was able to find the bug and fix it and now the project is building as it should.

Regression Testing with Rational Robot

My initial tests have shown that Robot won't work without an active, visible desktop. For example, while a scheduled task (or executed command from the continuous integration server) may be able to start robot as a command-line process, Robot will actually fail to execute the recorded script.
Logging into the build machine to allow it an "active desktop" is not an acceptable solution.
Am I missing something? Is it possible to run a pre-recorded Rational Robot script on a continuous integration server in a manner that doesn't require the machine to be physically logged into?
Unfortunately, Robot does require that you are logged on to the machine and that the desktop is not locked.
So, no, you are not missing something.
Depending on your situation, though, you may be able to work around the issue. Can you clarify what type of application you are trying to test? If it is a web app, or a client app that is easily installed/copied, you might be able to have Robot run on a vmware image, rather than directly on the build server itself.
You can run Rational Robot from the command line, so you should be able to set up a scheduled task to run a .BAT file to do this for you. The command is something like:
[path to Rational Robot]\rtrobo [script file] /user "user name" /project [project file] /play /build "build name" /nolog /close
The Robot documentation will have other arguments you can pass in, depending on your situation.
If a simple scheduled task doesn't work, then you can try setting up a STAF (http://staf.sourceforge.net/index.php) environment and create a job to run this.
Good luck :)

Resources