In this section:
General
How can I get quick access to information about usage on the command line?
Use the -help
command line switch:
dottestcli.exe -help
How can I work with dotTEST via proxy?
Typically, if you connect through a proxy server, you need to configure the connection by passing protocol-specific system properties to the JVM – using the-D
command line option.To work with dotTEST, ensure that the system properties for the HTTPS protocol are configured. At a minimum, you must configure https.proxySet=true
, https.proxyHost=[hostname]
, and https.proxyPort=[port number]
. If your proxy server requires authentication, you can configure your credentials with the https.proxyUser
and https.proxyPassword
properties.
Your command line may resemble the following:
java -Dhttps.proxySet=true -Dhttps.proxyHost=myserver.example.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=user1 -Dhttps.proxyPassword=MyPassword
In addition, you can configure the https.nonProxyHosts
property to specify hosts where connection via proxy is not required.
The proxy mode is not supported for Visual Studio.
Installation
What if dotTEST does not work properly after installing from a ZIP distribution?
If you extract the installation package with the built-in Windows unzip utility, Windows may consider the .zip file to be untrusted and block access to the contents of the package. To prevent this, you can do one of the following:
- Ensure that the 'Unblock' option is enabled in the properties of the .zip file.
- Extract the contents of the installation package with unzip software other than the built-in Windows unzip utility.
How do I fix a failed installation while integrating dotTEST with Visual Studio with a registry key suffix specified?
Providing a long registry suffix may lead to installation failure due to the path length limitation on Windows. To ensure that dotTEST is successfully installed, specify a shorter registry suffix during installation.
How can I prevent my machine ID from floating?
Changes in the network environment may affect the interface that is used to compute your machine ID and result in machine ID instability. You can use the PARASOFT_SUPPORT_NET_INTERFACES environment variable to specify a stable interface and prevent the machine ID from floating.
- Set up the PARASOFT_SUPPORT_NET_INTERFACES environment variable.
Set the variable value to a stable Ethernet network interface. Do not use virtual, temporary or loopback interfaces.
- On Windows: Set the value to the MAC address of your network card. You can use theipconfig -all
command to obtain the address. For example:SET PARASOFT_SUPPORT_NET_INTERFACES=00-10-D9-27-AC-85
If the problem persists, you can obtain diagnostic information by setting up the environment variable PARASOFT_DEBUG_NET_INTERFACES and setting its value to true. This will print to the standard output the checking procedure that can be shared with technical support, as well as the interface that is used to compute your machine ID. The interface will be marked with the [SELECTED] prefix.
Testing and Analysis
What if dotTEST cannot collect coverage information?
- Ensure that appropriate PDB files are available when coverage is collected. Each analyzed assembly must have a corresponding PDB file generated during the same build.
- Some versions of .NET may have a bug that prevents dotTEST from collecting coverage data for .NET applications. To ensure that the application coverage is collected, copy the dottest.Hooks assembly shipped with dotTEST to the application folder where IIS is deployed. The assembly is shipped in
<INSTALL_DIR>/integration/coverage/agent/bin/dottest/dotnet
. If you are using .NET 6.0 or 7.0, add a reference to dotnet.Hooks.dll in the main project of your application in Visual Studio.
What if dotTEST fails to run analysis and generates an empty report?
Some machine setups may fail to provide dotTEST with the path to Visual Studio and its version, which prevents dotTEST from opening and analyzing projects. In such a case, you may need to manually set the following environment variables:
- SET VSINSTALLDIR=[path to your Visual Studio installation directory]
Example:SET VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional
SET VISUALSTUDIOVERSION=[version number of your Visual Studio]
Example:VISUALSTUDIOVERSION=15.0
Visual Studio Version Numbers
Product Name | Version Name |
---|---|
Visual Studio 2017 | 15.0 |
Visual Studio 2015 | 14.0 |
What if I get the api-ms-win-crt-runtime-l1-1-0.dll is missing error when trying to execute unit tests with VSTest?
Install update for Universal C Runtime in Windows (KB2999226). See https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows for information about the update and installation.
What if a file cannot be tested because its name is inconsistent between the source control and the testing input?
To correctly process and analyze a file, dotTEST must be able to match the file name you provided in the testing scope (i.e. the file name in your project) with the file name in the source control system. For this reason, if you are using a case-sensitive source control system, such a Git, you need to ensure that the file name capitalization is identical.
How can I analyze .NET 6.0 or 7.0 Razor and Blazor projects using IDE?
Use the following workaround to analyze .NET 6.0 or 7.0 Razor and Blazor projects using IDE:
- Use the
dotnet clean
command or manually clean thebin
andobj
folders of the project. - Run
dotnet build
command. - In the IDE, set the
dottest.build.nobuild
option totrue
. See General Configuration Settings. - Run the analysis.
What if my Razor or Blazor files are not analyzed when using CLI?
This issue occurs when the user project is targeting .NET 6.0 or 7.0 but additional metadata files have not been generated. To fix this issue:
- Use the
dotnet clean
command or manually clean thebin
andobj
folders of the project. - Run the analysis.
Reports
What if some characters fail to be properly displayed in dotTEST reports?
Reports generated by Parasoft products require a sans-serif font to be available in your environment. If your report fails to correctly display some characters, such as national characters, ensure that a sans-serif font is installed on your system.Working in the IDE
Why is dotTEST unable to find build artifacts in Visual Studio 2017 when Lightweight Solution Load is enabled?
By default, dotTEST attempts to build solutions and projects prior to analyzing them to obtain the required build artifacts, such as .exe or .dll files. If the Lightweight Solution Load option is enabled in Visual Studio 2017, it prevents dotTEST from building a solution. As a result, the required build artifacts are not available or are not up to date, and the analysis may not be performed or some rules may not be executed. You can prevent this in one of the following ways:
- Disable the Lightweight Solution Load option.
- Delegate the build to MSBuild by configuring the
dottest.build.builder_id
option and setting its value tomsbuild
; see Building Solutions and Projects for details. - Build the solution prior to analysis and configure dotTEST to skip the building phase by setting the
dottest.build.nobuild
option totrue
or passing the-nobuild
command line switch; see Building Solutions and Projects for details.
Why do I get notified that Parasoft Plugin or its components are slowing down Visual Studio 2017, 2019 or 2022 on startup?
In Visual Studio 2017, 2019, and 2022, performance management monitors and manages extensions that can affect startup time. As a result, a pop-up alert may appear when Parasoft Plugin is installed to indicate that Visual Studio startup time has increased. You can click the 'Manage performance' link in the pop-up window to review the startup times and disable displaying the alert.
What if dotTEST is unable to open an .aspx file associated with a finding in Visual Studio?
dotTEST allows you to automatically open the file associated with a finding and navigate to the relevant code line by double-clicking a finding in the 'Findings' view or using the 'Go to' option from the context menu.
However, if the code for which the finding is reported is in an .aspx file, dotTEST may be unable to open that file. Instead, it may open the corresponding .aspx.cs file. If this happens, you need to manually open the .aspx file associated with the finding and navigate to the code that triggered the rule.
Why does Visual Studio 2015 not display code markers?
If the Parasoft DTP Plugin for Visual Studio is reinstalled, Visual Studio 2015 may fail to display code markers that indicate analysis findings or code coverage in the editor. This is caused by a Visual Studio known issue (see MEFCache bug breaks text adornments in any package for details).
To ensure that code markers are properly shown, clear the Visual Studio MEF cache each time you reinstall or updated the Parasoft DTP Plugin. Use one of the following options:
- Use the Clear MEF Component Cache extension that will automatically clear the MEF cache (download here).
- Manually delete the cache directory. Depending on your installation details, the cache directory may be available in the following locations:
- If the Plugin has been installed with the default options: %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache
- If the Visual Studio registry suffix has been specified with the<SUFFIX>
parameter during installation: %localappdata%\Microsoft\VisualStudio\14.0<suffix_name>\ComponentModelCache
Can I use Parasoft dotTEST and Parasoft C/C++test in the same Visual Studio IDE?
You can analyze code with Parasoft dotTEST and Parasoft C/C++test in the same Visual Studio if you install the Parasoft Plugin by running installers shipped with both products.
- Go to the
[INSTALL_DIR]/integration/vstudio
directory of one product, run the Parasoft Plugin installer and follow the installation wizard. This will install the Parasof Plugin and enable the code analysis engine of the product. - Go to the
[INSTALL_DIR]/integration/vstudio
directory of the other product and run the Parasoft Plugin installer. The Parasoft Plugin is already installed, so the reinstallation/removal wizard will open. Select Reinstall and proceed with the wizard. This will enable the code analysis engine of the other product.
See Plugin for Visual Studio for details.