How to add values to "Application Configuration Tool" in RFT from command line - rft

I am using RFT. I got a requirement, I want to add the values to the "Application Configuration Tool" say "Name","kind","Path" etc., through command line in RFT tool.
I have used the following command to open the "Application configuration Tool" Dialog box and selected the Project, but i don't know how to give the values to the fields .
cmd>java -classpath
"C:\Program Files (x86)\IBM\SDP\FunctionalTester\bin\rational_ft.jar"
com.rational.test.ft.rational_ft -appconfig "workbench" .
Can any one please tell me how to add the values to the fields to the "Application Configuration tool" from command line in RFT?

Unfortunately, RFT does not currently support setting the Application Configuration fields you require via the command line. I was supprised to find this out, but I verfied this with IBM. However, you can add new application configurations programatially by modifying the configurations.rftcfg file.
On a Windows 7 machine, an example of where you can find this file is here:
C:\ProgramData\IBM\RFT\configuration
More information on how to do this can be found here:
http://www.ibm.com/developerworks/rational/library/configure-applications-programmatically-rational-functional-tester/index.html
Just an idea and I have not tried this, but possibly, since you run from the command line, your command line can run an RFT script that does nothing more add a new appliation to the configurations.rftcfg file, before you then run other scripts from the command line.

Related

Pipe console output of IntelliJ to a script

It is possible to pipe the console output of an intellij application to a bash command so I can pretty-print it on the console directly?
I know I can save the log output to a file, but I still want to keep it on the stout window only, but just parse it through a script.
Piping output is a feature of the terminal shell.
IntelliJ IDEA is not using a terminal to run your app, therefore it's not possible with the default Run/Debug configurations.
You could use an external tool that will open a command line shell and run your app there, but the shell has to be open in a separate window and it will not be possible to get the formatted output directly in the IDE.
There is a related feature request in YouTrack, but it's unlikely to be implemented soon.

CMD window Close automatically after Jenkins build is over

I trying to run Selenium grid and node using Jenkins but the CMD windows always closes after executing the steps
i am running the below code in Jenkins Window Batch Command
cd "C:\TapsiumACSS\Grid3.9"
start Hub.bat
I need the CMD window to be opened
You can create a shortcut of the bat file and under properties in the target section you have to add &PAUSE
This will pause the command prompt until an user input is done.
Just a opinion, Not a good idea to use Jenkins and ask the user to do something as that defeats the whole automation aspect... Instead copy the selenium results into a html or text file which can be viewed later :)
P.S. you will have to refer to this bat file location in Jenkins i.e. the shortcut location
Hope it helps :)

How to set intellij compile error output language to English?

my windows 7 os is in Chinese, and location is China. My javac output is in Chinese as well. However, I can add -J-Duser.language=en to javac to output english. I would like to know how to set this up in intellij?
I have tried to put -J-Duser.language=en in
File->Setting->Build,Execution,Deployment`->Java Compliler->Additional Command line parameters
But it did not work.
I had tried and confirmed that the Java Compiler / Additional command line parameters options didn't work
And so modified the idea.vmoptions (add one line) worked:
-Duser.language=en
Which's file located here for macOS
$HOME/Library/Preferences/$IDEA
on now $IDEA should be IntelliJIdea2017.2
After some googling, I found a way of doing it.
I can delete these two files from \lib\tools.jar
com\sun\tools\javac\resources\compiler_zh_CN.class
com\sun\tools\javac\resources\javac_zh_CN.class
However, I wonder if there is a less destructive way.
From the menu "help"->"Edit Custom VM Options", open the VM options,
add a line : -Duser.language=en
save, then restart the intellij

SpecRun.exe: run .feature or .playlist file from command line

Good day. I have a several .feature files:
1.feature
2.feature
1.playlist
2.playlist
etc.
I can run they separatelly in visual studio:
-any feature file in debug mode
-any playlist with Test Explorer.
But if i need to run one of they from command line, what i should do?
If i use SpecRun.exe run
SpecRun.exe run %profile%.srprofile "/baseFolder:%~dp0\bin\Debug" /log:specrun.log
this performs launch of ALL scenarios in ALL .feature files.
Have a look at the command line switches of the SpecRun.exe here http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Command-Line/
You are looking for /filter to filter your execution to a single scenario.
The format of it is documented here: http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Profiles/#Filter

I am trying to open Jmeter by the batch file but it gives me a Windows error

Here is the related error its showing:
java.exe is not a recognized file as an internal or external command,
operable or external command
errorlevel=9009
i was getting the same error on WIndows 8.1(64 bit) and checked java path but it was ok
so i just run my jmeter.bat with Run as Administrator and it worked for me
Many operating systems have an environment variable such as PATH that contains a list of directories (or folders) to be searched when looking for a command to execute. Commands that can be found via the PATH are commonly called external commands. The program that reads the command line or the batch file and invoked the commands may have a number of built in commands, these are commonly called internal commands.
I suggest you examine the PATH (or equivalent) set when your java command executes from the command line and also when execution is attempted from the batch file. Compare the two and make sure the directory containing your java.exe is in the PATH.
Does not work with Java 9 beta:
Running:
C:\java -version
Gives:
java version "9-ea"
Just go into command line and run:
java -jar ApacheJMeter.jar
Set the correct Java Path (installed in your system) in Computer -> Advanced System settings -> Environment Variables -> Ok -> System Variables -> Path
I got the same issue and resolved by following the above steps.
I tried everything, this eventually worked.
Within System Variables:
PATH = "C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_101\bin"
May help someone.
This error occurs due to the path has not been set properly.
Either you can set it in environmental varialables or right click jmeter .bat file,choose edit set the path their,for reference see the jmeter.apache.org user manuals.
For me, my Java path has a space in it and jmeter said it can't find Java
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
.. I looked at the jmeter.sh script and saw it got the path from "Plugin-Ins" .. onward. I tried just commenting out the exit command after that check in the script .. and then I was able to run jmeter.
So apparently the validation logic has a bug, where the error message about can't find java is in fact not true (if Java is indeed set up correctly), so it can be ignored.
For windows 8.1 Users:
Error when trying to run jmeter.bat
Error message:
Not able to find Java executable or version. Please check your Java installation. errorlevel=2
Press any Key to continue
Resolution:
Right Click jmeter.bat and Run as Administrator.
This worked for me, hope this helps. Good luck
Set the correct JM_LAUNCH variable to java.exe
For Windows XP users set Java environment by following the steps here:
http://www.tutorialspoint.com/jmeter/jmeter_environment.htm
Note the path depends on your installed JDK.
And download the file from:
https://svn.apache.org/repos/asf/jmeter/trunk/bin/jmeter.bat
Then replace your jmeter.bat with the downloaded file.
If you have installed Java and still you get this error, please set the java_home path to below using typing below command in terminal:
export JAVA_HOME="/Library/InternetPlugIns/JavaAppletPlugin.plugin/Contents/Home"
Since I run many versions of Java.. I modified jmeter.bat.
rem JM_START - set this to "start" to launch JMeter in a separate window
rem this is used by the jmeterw.cmd script.
rem
rem =====================================================
setlocal
rem Minimal version to run JMeter
set MINIMAL_VERSION=1.8.0
set PATH=%PATH%;C:\Program Files (x86)\IBM\Java80\jre\bin <<< add This line to jmeter.bat
Copied the JAVA executable from Installed version of Java from C:\Program FilesJava\jdk1.8.0_191\bin and pasted in the folder where the jmeter bat resides and it worked for me.
Not exactly the same issue but somebody might find it helpful
Do not double click jmeter.bat but instead ApacheJMeter.jar in the same directory
For me jmeter.bat run but for a brief moment closing almost immediately and not prompting any error. Above workaround allowed me to start working
if JAVA -version shows as blank or empty in the command prompt (CMD) then you need to clear the all java paths in environment variable and again add JAVA_HOME=C:\Program Files\Java\jdk-11.0.15.1
path= C:\Program Files\Java\jdk-11.0.15.1\bin;
if you see C:\Program Files\Common Files\Oracle\Java\javapath; like this remove this
and try in new CMD prompt then Java -version will work.