Sign inSign up

smartbear/readyapi-security-testrunner

By smartbear

•Updated about 1 month ago

Image
1

8.4K

smartbear/readyapi-security-testrunner repository overview

⁠Running ReadyAPI Security Tests in Docker

⁠About

The readyapi-security-testrunner Docker image runs ReadyAPI security tests⁠ within containers.

⁠Required license

To use the image, you must have a ReadyAPI Test Floating license⁠. When you run a container, it connects to the specified license server and obtains the license. The license server must be available to the container and properly configured. For File-based licensing⁠, visit Configure License Server⁠ in ReadyAPI documentation. For SmartBear ID-based license⁠ assigned to you on manage.smartbear.com⁠ or converted and configured for on-premises use. Please go to this page⁠ for instructions.

⁠Docker command syntax

To run a ReadyAPI security test in a Docker container, use the following command line:

docker run -v="Project Folder":/project -v="Report Folder":/reports -v="Extensions Folder":/ext -e LICENSE_SERVER="License Server Address" -e COMMAND_LINE="Test Runner Arguments" -it smartbear/readyapi-security-testrunner:latest <br/>

If you have moved to the new SmartBear ID-based licenses that we’ve introduced in ReadyAPI 3.8.1, you must add the parameters shown below to your docker run command.

    docker run -v="C:\TestDocker\Projects":/project -e SLM_LICENSE_SERVER="<Address for SLM license server - online or onpremise>" -e API_KEY="<API key for floating SLM>" -e COMMAND_LINE="'-EDefault environment' -sTestSuite-Main -cTestCase-Main '/%project%/Project-func-test.xml'" -it smartbear/ready-api-soapui-testrunner:<tag><br/>
⁠Arguments
  • -v=Project Folder:/project
    Required. Specifies the path to the folder that contains the ReadyAPI project. When a container starts this folder is copied to the container.
    Usage: -v="C:\Work\ReadyAPI Project":/project
    Note: On some systems, you may need to change the path in the following way:
    _"C:\Work\ReadyAPI Project"_ -> _"/host\_mnt/C/Work/ReadyAPI Project"_

  • -v=Extensions Folder:/ext
    **Required.**Specifies the folder whose content should be copied to the /bin/ext folder of the ReadyAPI installation in the container. Use this argument if your project requires additional libraries, such as database drivers or plugins.
    Usage: -v="C:\Work\ReadyAPI Extensions":/ext
    Note: On some systems, you may need to change the path in the following way:
    "C:\Work\ReadyAPI Extensions" -> "/host_mnt/C/Work/ReadyAPI Extensions"

  • -v=Plugin Folder:/root/.soapui/plugins
    **Required.**Specifies the folder with plugins that should be installed to ReadyAPI in the container.
    Usage: -v="C:\Users\<User>\.soapui\plugins":/root/.soapui/plugins
    Note: On some systems, you may need to change the path in the following way:
    "C:\Users\<User>\.soapui\plugins" -> "/host_mnt/C/Users/<User>/.soapui/plugins"

  • v=Report Folder:/reports
    **Required.**Specifies the folder on a local machine to which the generated reports will be exported.
    Usage: -v="C:\Work\Reports":/reports
    Note: On some systems, you may need to change the path in the following way:
    "C:\Work\Reports" -> "/host_mnt/C/Work/Reports"

  • -e LICENSE_SERVER="License Server Address"
    Required. Specifies the address of the license server. When a container runs, it connects to the specified server to obtain a Floating ReadyAPI Test license.
    Usage: -e LICENSE_SERVER="10.0.21.14:443"
    Note:Make sure the container is able to connect to the license server using the IP you specify, regardless of whether you use a public or private IP address.

  • -e SLM_LICENSE_SERVER="https://api.slm.manage.smartbear.com:443⁠"
    Required. If you have moved to the new SmartBear ID-based licenses that we’ve introduced in ReadyAPI 3.8.1, you must add the parameters shown below to your docker run command. Specifies the address of the SmartBear license server for our new SmartBear License Management server. Make sure the container is able to connect to the following addresses:
    https://manage.smartbear.com:443⁠
    https://api.slm.manage.smartbear.com:443⁠
    -e API_KEY="9a######-####-####-####-##########97"
    Note: If you are using SLM on-premises, please refer to the instructions here⁠.

  • -e COMMAND_LINE="Test Runner Arguments"
    Required. Specifies arguments for the test runner. To refer to the project volume, use the %project% variable. To refer to the reports volume, use the %reports% variable.
    Usage: -e COMMAND_LINE="-f/%reports% '-RSecurity Issues Report' -FPDF '-EDefault environment' -nSecurityTest1 '/%project%/Sample-readyapi-project.xml'"

  • -it
    Required. This command enables an interactive command-line interface within the Docker container.

  • readyapi-security-testrunner:latest
    Required. Specifies the image to create a container from.

⁠Full command sample
docker run -v="C:\TestDocker\Projects":/project -e SLM_LICENSE_SERVER="<Address for onprem SLM license server>" -e API_KEY="<API key for floating SLM>" -e COMMAND_LINE="'-EDefault environment' -sTestSuite-Main -cTestCase-Main '/%project%/Project-func-test.xml'" -it smartbear/ready-api-soapui-testrunner:<tag>
⁠Exit codes

Besides the standard Docker exit codes (see the Docker documentation⁠) the readyapi-security-testrunner Docker image uses the following codes:

CodeDescription
101ReadyAPI running in a container cannot start due to a license issue. Make sure the license server is properly configured⁠ and the Docker image can access it. See information on other possible issues with a floating license⁠.
102The ReadyAPI project was not found. Make sure you specified the correct folder for the project volume, and this folder contains the specified project.
103An error occurred during the test run. See the test log for more information.
⁠Troubleshooting

If you cannot run Docker due to the Drive has not been shared error, perform the following steps:

  1. Right-click the Docker icon in the notification area and select Settings.
  2. On the Shared Drives page of the Settings dialog, select all the drives you use to run the Docker image.
  3. Click Apply. You may need to enter the credentials of your system account to apply the changes.

Note: If your drives have already been shared, but the error occurs anyway, turn off sharing. After you apply the changes, repeat these steps to share the drives again.

Tag summary

Content type

Image

Digest

sha256:95fdf0f4a…

Size

574.8 MB

Last updated

about 1 month ago

docker pull smartbear/readyapi-security-testrunner