Installing SoapUI on Amazon AMI Linux command line - linux

I need to install and run SoapUI on linux OS (Amazon AMI linux).
This is a command line version (no GUI)
I was able to successfully download and unzip SoapUI tar using the below commands
Download SoapUI installation files
wget http://freefr.dl.sourceforge.net/project/soapui/soapui/5.0.0/SoapUI-5.0.0-linux-bin.tar.gz
Extract Contents
tar -xzf SoapUI-5.0.0-linux-bin.tar.gz -C /opt/
Install SoapUI
cd /opt/SoapUI-5.0.0/bin/
After this when i run the following command:
./soapui.sh
I get below exception
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:218)
at com.eviware.soapui.SoapUI.startSoapUI(SoapUI.java:842)
at com.eviware.soapui.SoapUI$SoapUIRunner.run(SoapUI.java:697)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.r...(EventDispatchThread.java:91)
Is there something missing here or any other commands needs to be called ?

SoapUI itself is a graphical tool, and the main application isn't going to like running without a graphics display.
When I've run the SoapUI stuff on a Linux server without X11, it's been the mock service facility that I'm after - I use it to provide substitute SOAP or REST services for automated testing etc.
The mock service runner runs well without an X11 server - you just have to tell java not to look for a graphical user interface.
So you add -Djava.awt.headless=true to the command line:
./mockservicerunner.sh -Djava.awt.headless=true
If you just to that it will give you a 'help' output, because this tool is designed to use an existing SoapUI project file to provide preconfigured responses, rather than for interactive use.
The alternative is to use X-Forwarding, so SoapUI runs on your server, but the UI is displayed on your local workstation. I've never done that (because, as I said, I'm after the standalone interaction for automated testing), but this page has some detail: http://blog.ashwani.co.in/blog/2013-01-10/soapui-mockservicerunner-on-linux-without-x-config/
(it also mentions the 'headless' option for mockservicerunner.sh.
This page has some detail about setting up a project in SoapUI first before using it for one of the automated tools (loadrunner in this case): http://www.soapui.org/load-testing/command-line-execution.html

I just installed and executed SoapUI in AWS (Red Hat) without using any graphical interface:
1.- Download SoapUI directly from soapui.org; search for the latest Linux version, copy the link address and download the software into any Linux directory using the wget command. This should have downloaded an installation script file (for example, SoapUI-x64--5.3.0.sh).
2.- Execute the previous installation script from command line and answer the installation prompts. Once you have finished go to the directory where you elected to install it and verify that you have all the folders and files (bin, lib, etc.).
3.- To run SoapUI from the command prompt, go to your SoapUI home directory and execute an instruction like this:
sh bin/testrunner.sh -s"Your Suite Name" -c"Your Test Case Name" -f/your/output/path/ /your/project/path/your-soapui-project.xml

Related

How to start "Xilinx SDK" from command line instead of from Vivado "File->Launch-SDK" Menu?

I'm wondering how to start "Xilinx SDK Eclipse GUI" (XSDK) directly from the command line?
Currently, I'm launching XSDK by first launching "vivado", and then going to the "File->Launch SDK" menu. However, this is a bit cumbersome to always open Vivado first, just to open "Xilinx SDK". What I want to do, is launch "Xilinx SDK" directly from my Git bash Shell under windows 10 and then open the previous project under "project_1.sdk" and to continue with what I was working on last time.
My Git Bash Setup:
#~/.bashrc:
export PATH=/c/Xilinx/Vivado/2017.3/bin:$PATH
export PATH=/c/Xilinx/SDK/2017.3/bin:$PATH
Then:
$ xsdk -workspace your_project_dir.sdk &
Also:
$ xsdk -h
Display Options:
-help
Help -- just display this message and quit.
-version
Display Version and quit.
-batch
SDK Tcl Batch Mode.
-wait
Wait for SDK to complete.
Options:
-workspace <Workspace location>
Specify the Workspace directory for SDK projects
-hwspec <hardware specification file>
Specify the XML file to load.
-bit <bitstream file>
Specify the Bitsteam file to use for programming FPGA
-bmm <bmm file>
Specify the BMM file to use for BRAM initialization
-batch -source <tcl script file>
Specify tcl Script file to executee all commands in SDK batch mode
{-lp <repository_path>}
Add <repository_path> to the list of Driver/OS/Library search directories.
-eclipseargs <eclipse arguments>
Any other arguments that should be passed to Eclipse.
This should follow all other SDK arguments.
-vmargs <java vm arguments>
Any other arguments that should be passed to Java VM.
This should follow all other SDK arguments.
Also useful:
SDK Command Line Batch Mode
The Eclipse/SDK can be launched in these two other ways
(1) Launch from the Vivado TCL Command Line:
Going from Vivado to SDK often has these steps
- File > Export (Hardware)
- File > Launch SDK
Each of these commands prints information in blue text in the Tcl Console.
Those commands can be copied into a tcl script and run from Tcl Console.
By default Tcl runs from this folder
C:\Users\WinUserName\AppData\Roaming\Xilinx\Vivado
If the script is placed there (e.g. zz1.tcl, or just zz1)
Then it can be run from the Tcl Console as
source zz1.tcl
That will execute the commands in zz1.tcl -> export hardware and launch the SDK
(2) Or, run Eclipse/SDK from Windows, then select the SDK folder:
The SDK can be run directly and can be found here:
C:\Xilinx\SDK\2019.1\bin\xsdk.bat
When it runs it will ask for a Workspace
Click [Browse] and navigate to the .SDK folder in the Vivado project
It will open and run as usual, without Vivado running, etc
Note: I have noticed that Vivado/SDK can be temperamental about how and when project folder contents are changed. Including if the SDK is launched and another SDK is already running in that folder. In some cases, the easiest recovery is to rename the ~corrupt SDK folder, create a new HelloWorld project, get HelloWorld running, and then update files into the new folder.

How to remotely control Trace32 via Terminal

I have an automated Linux agent (CentOS) with Bamboo to aid in building and deployment of new software onto a board. I want to be able to run .cmm files via Trace32 and a Lauterbach onto my locally located board using the remote Bamboo agent to trigger daily builds and deployment.
I am aware of the terminal command option: ./trace32 -s file.cmm to avoid using the GUI.
Is there anyway I can use this kind of thing for remote deployment, perhaps utilising ssh?
There is no SSH server in TRACE32. However you can control TRACE32 remotely via the TRACE32 remote API. See the document "api_remote.pdf" in the PDF folder of your TRACE32 installation.
To launch some scripts or execute some simple commands from a bash shell, you can use the command line tool t32rem from the <t32>/bin/linux folder.
This tool uses the TRACE32 remote API to send TRACE32 commands to open TRACE32 GUIs.
Do the following:
Enable the TRACE32 remote API to add the following two lines to your TRACE32 configuration file (usually "config.t32")RCL=NETASSIST
PORT=20000 You have to ensure that there is an empty line before and after these lines in your configuration file.
Launch TRACE32 and send a command to it with t32rem like that: t32rem localhost port=20000 <command> For <command> you can choose any TRACE32 command like DO file.cmm to execute your mentioned PRACTICE script.
For more complex remote control of TRACE32 (e.g. from a Python script) you should have a look at the previously mentioned "api_remote.pdf" and the examples at <t32>/demo/api.
When you already have a command to run, how about using a Script task in your plan, so that you can execute the command you wanted?

Running SoapUI and HermesJMS on headless Linux Server

I'm trying to get SoapUI and HermesJMS to work with each other on a headless Linux server. And by "headless" I do mean headless; the only account we are authorized to use that has any kind of admin privileges is unable to forward an X-server session.
First, the steps I've done so far:
Unpacked the tar.gz containing SoapUI 4.6.0 into a soapui directory.
Using my own account, which has X-server, I ran the HermesJMS installer.
Set 777 permissions so the admin user could work with the files.
I entered the soapui-config.xml and test.xml files and told them where to find the hermes-config.xml
Independently, they both work. I can run a generic SoapUI test and if I use my X-server to run Hermes, I can see the queues I need to be using.
However, when I try to use the testrunner.sh, I get a NullPointer exception on HermesUtils.addHermesJarsToClasspath.
An error occured [java.lang.NullPointerException], see error log for details java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.addHermesJarsToClasspath(HermesUtils.java:120)
Any ideas on what the issue is? I tried running soapui's GUI the same way I ran Hermes' but I run into a segmentation fault on startup.

Tomcat deploy: make included scripts executable

I'm devellopping a WebApplication (for Tomcat) using netbeans on Windows 7. For the Webapplication to run I need to run a insall-script once.
This script (*.bat for windows and *.sh for linux is included in my war-file (WEB_INF).
Now everytime I deploy the WAR-file and want to run the script on linux I have to call
chmod +x install.sh
first.
Is there a way that this script can be made executable by default? I don't want to have to execute some extra commands after the deploy to make the script executable.
For clarification:
I'm not new to Linux and I know how to set executable-rights on files. That's not the problem. My problem is: What do I have to do, so that this script is executable right after tomcat deployed my *.war-file (unpacked it). If I would be using Linux for development as well, I would try to set the rights according in my sources (maybe I'll try it when I have a little more spare time). But I am using Windows and netbeans.
Are there any attributes I can set to achive my goal, or is it possible to achive this using ant?
By the way: Are there security related issues with this approach? The script looks for java executable and calls a javabased GUI-installer...
Change permissions during initialization of the application, the following:
String [] command = {"/bin/chmod","+x",full_path_to_install.sh};
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec( command );
pr.waitFor();
allows your application to set executable permissions before using the script. It is not executable right after tomcat deployed your war file but just before your application uses it.
Assuming you are invoking the same "install.sh" everytime, you need to set the execute bit only once. Also, the executable bit need to be set only for the user (the command you have provided will set it for everyone).
chmod u+x install.sh

What is the best way to install a .bin file using default installer options?

I'm working on a small shell script to set up my development environment (eclipse + java + a bunch of other stuff) on linux. Installing .bin files is among them - these launch a GUI installer where user input is necessary - how do I simply use the default installer options and force the installation to complete?
You can try running them from a terminal passing the '-h', '--help' or '--usage' arguments to see if they handle it (and provide the listing of commands you can give it), but if it wasn't designed to receive any parameters there won't be much you can do for it.

Resources