Sign inSign up

parasoft/soavirt

By parasoft

Updated 22 days ago

Parasoft SOAtest & Virtualize

Image
0

7.4K

parasoft/soavirt repository overview

Quick reference

What is Parasoft SOAtest & Virtualize?

Parasoft SOAtest delivers fully integrated API and web service testing capabilities that automate end-to-end functional API testing. Streamline automated testing with advanced codeless test creation for applications with multiple interfaces (REST & SOAP APIs, microservices, databases, and more). SOAtest reduces the risk of security breaches and performance outages by transforming functional testing artifacts into security and load equivalents. Such reuse, along with continuous monitoring of APIs for change, allows faster and more efficient testing.

Parasoft Virtualize, Parasoft's service virtualization tool, enables testers and developers to simulate services or data when access is limited or unreliable. The tool provides results that can be easily integrated with other testing teams and visualized for faster failure detection and debugging with an intuitive codeless interface.

How to use this image

Note: You must accept the Parasoft End User License Agreement (EULA) to use this product. Change ACCEPT_EULA from false to true in the examples below.

Run the Parasoft SOAtest command line interface:

$ docker run -it --rm -e ACCEPT_EULA=false parasoft/soavirt soatestcli

Run the Parasoft SOAtest & Virtualize User Interface (local X server):

$ docker run -it --rm --net=host --ipc=host -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY -e ACCEPT_EULA=false parasoft/soavirt soavirt

Run the Parasoft Load Test Server:

$ docker run -it --rm -p 8189:8189 -e ACCEPT_EULA=false parasoft/soavirt loadtest -loadtestserver

Run the Parasoft Load Test User Interface (local X server):

$ docker run -it --rm --net=host --ipc=host -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY -e ACCEPT_EULA=false parasoft/soavirt loadtest

Notes

Docker Desktop is not supported. If you run the Parasoft SOAtest and Virtualize container in Docker Desktop, the Parasoft machineId will be 0.

Upgrading docker may result in the Parasoft machineId changing.

Principles of operation

Licensing

You will need to use a Parasoft License Server to license SOAVirt applications launched from Docker. You can pass licensing information to soatestcli and virtualizecli in a settings file. For details see Licensing Settings.

Accepting the End User License Agreement (EULA)

For all applications, pass the following environment variable to the Docker container to accept End User License Agreement that you would otherwise accept during the SOAVirt product installation:

-e ACCEPT_EULA=true

View the EULA here: Parasoft End User License Agreement (EULA)

Passing data to and getting it from SOAVirt applications

You can pass SOAtest, Load Test, or Virtualize resources, such as SOAtest .tst files or the SOAtest workspace, to the application in Docker container by mapping the local directory to a file path in the container using the Docker -v command line option.

Examples

Run tests in a workspace:

docker run -it --rm \
    -e ACCEPT_EULA=false \
    -v /home/${USER}:/mnt/${USER} \
    parasoft/soavirt \
    soatestcli \
    -data /mnt/${USER}/temp/soatest_workspace \
    -resource /mytests \
    -config 'builtin://Demo Configuration' \
    -settings /mnt/${USER}/temp/soatestcli.properties \
    -report /mnt/${USER}/temp/report/

Import a project into a new workspace:

docker run -it --rm \ 
    -e ACCEPT_EULA=false \
    -v /home/${USER}:/mnt/${USER} \
    parasoft/soavirt \
    soatestcli \
    -settings /mnt/${USER}/temp/soatestcli.properties \
    -data /mnt/${USER}/temp/soatest_workspace \
    -import /mnt/${USER}/soavirt/mytests

Launching GUI applications

Linux

For running GUI applications, such as soavirt and loadtest, you must set the DISPLAY variable when running this image.

If your X server is running on a remote host then you can set your DISPLAY variable follows:

-e DISPLAY=<host:display_number>

If your X server is running on the Docker host then you can configure the container to connect over a Unix socket as follows:

--net=host --ipc=host -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix

If your X server has access control enabled then you must also configure X server authentication in the Docker container. To do this, fist run xuath list on the X server host to copy the authorization cookie:

$ xauth list
myhost/unix:11  MIT-MAGIC-COOKIE-1  01234567890123456789012345678901

The authorization cookie must be passed to xauth add when running this image.

Example 1

Start soavirt using remote X server:

docker run -it --rm \
    -e ACCEPT_EULA=false \
    -e DISPLAY=172.1.2.3:0 \
    parasoft/soavirt \
    soavirt
Example 2

Start soavirt using local X server with authorization cookie:

docker run -it --rm \
    -e ACCEPT_EULA=false \
    --net=host --ipc=host -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \
    parasoft/soavirt \
    bash -c "xauth add myhost/unix:11  MIT-MAGIC-COOKIE-1  01234567890123456789012345678901; soavirt"
Windows

The X Windowing System (also known as X11, or X) required for running GUI applications on Docker is not available by default on Windows. You can install and configure a custom X Window System Server for Windows such as Xming, or VcXsrv.

Image customization

This image can be customized by building a custom image. Below are some examples:

Example 1 - Run the image as the current user

This image runs with a pre-defined parasoft user. The user ID and group ID of the parasoft user may not match the user ID and group ID of the user on the host that is attempting to run this image as this can cause problems when mounting directories from the host. Files owned by the user on the host might not be accessible to the parasoft user and vice versa. In particular, the parasoft user may need to read SOAtest projects from the host's file system. Similarly, the parasoft user may need to write SOAtest report files back to the host's file system. To solve this problem, the user ID and group ID of the parasoft user can be modified to match the user on the host by building a custom image as follows:

Dockerfile:

FROM parasoft/soavirt

ARG HOST_UID=1000
ARG HOST_GID=1000

USER root:root

RUN rm -f /var/log/lastlog /var/log/faillog && \
    ln -s /dev/null /var/log/lastlog && \
    ln -s /dev/null /var/log/faillog && \
    groupmod -g ${HOST_GID} parasoft && \
    usermod -u ${HOST_UID} -g ${HOST_GID} parasoft && \
    chown -h -R ${HOST_UID}:${HOST_GID} /usr/local/parasoft && \
    touch /var/log/lastlog && \
    touch /var/log/faillog

USER parasoft:parasoft

Note: lastlog and faillog are "sparse files" that can be very large in total size. Certain commands like usermod touch those files. They are temporarily linked to /dev/null to prevent them from bloating the image.

Docker build command:

docker build --no-cache --tag soavirt-$(id -un) --build-arg HOST_UID=$(id -u) --build-arg HOST_GID=$(id -g) .

Example 2 - Install Google Chrome for browser playback

This image does not contain any web browsers. Google Chrome can be installed to support test scenarios that use Browser Playback tools.

Dockerfile:

FROM parasoft/soavirt

USER root:root

RUN rpm -ivh \
        https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-9.0-34.el9.noarch.rpm \
        https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-9.0-34.el9.noarch.rpm && \
    dnf install -y --nodocs --repo baseos --repo appstream \
        liberation-fonts \
        xdg-utils && \
    rpm -evh \
        centos-stream-repos \
        centos-gpg-keys && \
    rpm --import https://dl.google.com/linux/linux_signing_key.pub && \
    dnf install -y --nodocs \
        https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm && \
    dnf clean all && \
    rm -rf /var/cache/dnf

USER parasoft:parasoft

Note: soavirt uses Red Hat UBI as its base image. Google Chrome requires a few extra dependencies that are not available in Red Hat UBI. The Dockerfile pulls in the missing dependencies from CentOS Stream.

Docker build command:

docker build --no-cache --tag soavirt-chrome .

By default, Google Chrome crashes when run in a Docker container. To prevent this from happening, certain Chrome arguments must be enabled, including the argument to enable headless browser playback. For SOAtest Browser Playback tools, these Chrome arguments can be configured by setting the java system property com.parasoft.browser.BrowserPropertyOptions.CHROME_ARGUMENTS to the value headless,disable-gpu,no-sandbox,disable-dev-shm-usage. This java system property can be passed to soatestcli as follows:

docker run -it --rm -e ACCEPT_EULA=false soavirt-chrome soatestcli -J-Dcom.parasoft.browser.BrowserPropertyOptions.CHROME_ARGUMENTS=headless,disable-gpu,no-sandbox,disable-dev-shm-usage

Known limitations

  • The SOAVirt Welcome page will be blank.
  • Using Help > Help Contents will show an error dialog saying no browser is configured.
  • Browser testing functionality is not available in SOAtest by default as this image contains no web browser. See Install Google Chrome for Browser Playback for information regarding installing a web browser.

License

You need to view and agree to the Parasoft End User License Agreement (EULA) for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses. As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Tag summary

Content type

Image

Digest

sha256:a93b76e32

Size

1.8 GB

Last updated

22 days ago

docker pull parasoft/soavirt