Sign inSign up

parasoft/dottest

By parasoft

Updated 26 days ago

Image
0

6.2K

parasoft/dottest repository overview

Parasoft dotTEST @ DockerHub

Quick reference

What is Parasoft dotTEST?

Parasoft dotTEST is a unified, fully integrated testing solution for .NET software development. dotTEST uses a comprehensive set of analysis techniques, including pattern-based static analysis, dataflow analysis, metrics, code coverage, and more, to help you verify code quality and ensure compliance with industry standards, such as CWE and OWASP.

What is included in this image

This image is based on Windows OS and includes:

  • dotTEST (installed into c:/dottest)
  • Build Tools 2026 (NET 10.0 Runtime, NET Framework 4.8.1 SDK, NET Framework 4.8.1 targeting pack, NET SDK, Container development tools - Build tools, Web Deploy, NuGet targets and build tasks, Testing tools core features - Build Tools, TypeScript Server)
  • Git 2.51.0

How to use this image

Licensing
  • You must accept the Parasoft End User License Agreement (EULA) to use this product. To accept the EULA, change parasoft.eula.accepted from false to true in the examples below.
  • Be sure Parasoft License Server or Parasoft DTP is deployed in your organization.

To license Parasoft dotTEST, create a dottestcli.properties configuration file with the license settings:

# Accept the Parasoft EULA to use this product
parasoft.eula.accepted=false

# Specify the license edition or features
dottest.license.network.edition=server_compliance_edition

# For license retrieved from License Server:
license.network.host=<HOST>:<PORT>
license.network.enabled=true

# For license retrieved from DTP Server:
dtp.url=<SERVER:PORT>
dtp.user=<USER>
dtp.password=<PASSWORD>

The dottestcli.properties file should be placed in one of the following locations accessible inside the running container:

  • The dotTEST docker working directory (c:/dottest). See Licensing.
  • The pathOnPhysicalMachine (Example: c:\userPath\dottestcli.properties), which will be used with the dotTEST -settings option.
Basic commands
  • To run the dotTEST command line interface:

    $ docker run --rm dottest dottestcli -help
    
  • To log into the container:

    $ docker run --rm -it dottest cmd
    
Running static analysis for a solution located inside the container

In this example, a solution is located inside the container. The pathOnPhysicalMachine will be linked to the running container, so that the dottestcli.properties configuration file can be accessed by dotTEST. Also, the analysis report will be generated in the mounted pathOnPhysicalMachine\reports directory.

  1. Create and configure the dottestcli.properties configuration file in the pathOnPhysicalMachine directory (see Licensing).
  2. Run the analysis: $ docker run --rm --mount type=bind,source="pathOnPhysicalMachine",target="c:\dockerWorkdir" dottest dottestcli -solution "C:\dottest\examples\NET Framework\VS2022\SourceCode\BankExample\BankExample.sln" -config "builtin://Recommended Rules" -settings "C:\dockerWorkdir\dottestcli.properties" -report "c:\dockerWorkdir\reports"
  3. Review the analysis report in pathOnPhysicalMachine\reports.
Running static analysis for a solution located on the host

In this example, a solution, located in the pathOnPhysicalMachine directory, is linked to the docker. The directory will be mounted to the running container, so that all solution files and the dottestcli.properties configuration file can be accessed by dotTEST. Also, the analysis report will be generated in the mounted directory pathOnPhysicalMachine\reports.

  1. Create and configure the dottestcli.properties configuration file in the pathOnPhysicalMachine directory (see Licensing).
  2. Run the analysis using the docker container with the mounted pathOnPhysicalMachine directory:
    $ docker run --rm --mount type=bind,source="pathOnPhysicalMachine",target="c:\dockerWorkdir" dottest dottestcli -solution "C:\dockerWorkdir\NET Framework\VS2022\SourceCode\BankExample\BankExample.sln" -config "builtin://Recommended Rules" -settings "C:\dockerWorkdir\dottestcli.properties" -report "c:\dockerWorkdir\reports"
    
  3. Review the analysis report in pathOnPhysicalMachine\reports.
Performing VSTest tests with enabled code coverage analysis

In this example, a container will be created first and dotTEST will analyze the solution in it.

  1. Create and configure the dottestcli.properties configuration file in the pathOnPhysicalMachine directory (see Licensing).

  2. Run VSTest tests with coverage inside the container:

    $ docker run --rm --mount type=bind,source="pathOnPhysicalMachine",target="c:\dockerWorkdir" dottest dottestcli -solution "C:\dockerWorkdir\NET Framework\VS2022\SourceCode\BankExample\BankExampleWithTests.sln" -config "builtin://Run VSTest Tests with Coverage" -settings "C:\dockerWorkdir\dottestcli.properties" -report "c:\dockerWorkdir\reports"
    
  3. Review the analysis report in pathOnPhysicalMachine\reports.

Image customization

You can customize the Parasoft dotTEST image. The following example shows a Dockerfile for building a dotTEST image with the dottestcli.properties configuration file copied into the c:\dottest directory:

FROM parasoft/dottest

# install git-lfs
RUN Invoke-WebRequest 'https://github.com/git-lfs/git-lfs/releases/download/v3.0.2/git-lfs-windows-v3.0.2.exe' -OutFile git_lfs.exe; \
   c:/git_lfs.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES; \    
   $env:PATH = $env:PATH + ';C:/Program Files/Git LFS'; \
   Set-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\\' -Name Path -Value $env:PATH;
RUN del -Force git_lfs.exe

# pre-configure parasoft user environment together with dotTEST by copying dottestcli.properties into directory 
# dottest tool is in folder c:/dottest
COPY dottestcli.properties c:/dottest

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:e02da72ac

Size

5.2 GB

Last updated

26 days ago

docker pull parasoft/dottest