-
Kernel Modules Unit Testing
Hello, I want to compile kernel code and unit test with Parasoft tool Please tell me how can i generate bdf and perform testing with parasoft tool I am using the below version of the tool: 1. Products: C/C++test 2. Platform: Linux 3. Version: 2021.2.1 4. Installer: C/C++test Professional for Linux x64(standalone) If i…
-
Unit Testing Loadable Kernel Module
I just wrote my first character device and wanted to write some unit test for it using parasoft c++test. I know how to use parasoft for my regular user c code but being searching the net and can't find any example for creating unit tests, stubs, etc for this kernel module that i have. Is it even possible in parasoft? can…
-
"No Projects Found" when trying to import IAR project to parasoft C/C++test
Hi, I am trying to import an IAR project into parasoft according to the instructions written here: https://docs.parasoft.com/display/CPPDESKE1033/Importing+Projects+with+IAR+Embedded+Workbench+Support I enter the path and click refresh and no project is found. I even tried selecting in the path the actual project files…
-
Parasoft C/C++ Test error: expected an identifier extern "C" {
When I tried to run unit test for a simple main program in C++: #include <iostream>int main(){ std::cout << "hello world" << std::endl; return 0;} it occurred the following problem: C++test analysis errors in /Demo_aCpp 1. Test execution: error preparing instrumentation / symbols data for…
-
How to switch between licenses that are on a DTP server?
Hi, I have Parasoft C/C++ test Professional version 2021.1.0 (10.5.1.20210505B1390) I also have DTP server installed on a local network server. On the DTP server we have two client licenses each with access to different features. Basically, the first license is for unit tests and the second license is for static analysis.…
-
Parasoft C/C++Test 9.4 , error: invalid type conversion
When I used Parasoft c/c++test9.4 with Cygwin gcc11.3 to run unit test, there is such a problem: C++test analysis errors in /example_debug 1. Test execution: error preparing instrumentation / symbols data for file."/usr/lib/gcc/x86_64-pc-cygwin/11/include/mmintrin.h", line 79: error: invalid type conversion return (__m64)…
-
Error reading test log for Test unit for xx.cpp.
I run "Run Unit Tests (File Scope)" configuration on eclipse base ide vs2013 ,then get a error :"Test execution: error reading test log for Test unit for xx.cpp". How can I Solve this problem?
-
Preconfiguration for cpptest Professional Eclipse Plugin custom compiler setting not working
In tried to preconfigure the eclipse Plugin settings with the parasoft.ini file. The documention https://docs.parasoft.com/display/CPPTESTPROVS20212/Configuring+Localsettings shows that i have to set the custom.compilers.dir=[Directory]. But it does not set anything in the Parasoft|Configuration|Customs Directories|Custom…
-
C/C++ Test Case Report Macros
Hi, I'm trying to include some logging into test cases using the CPPTEST_REPORT_* macros and I can't seem to find a way to view those log messages. When I generate a report, I can see messages included in a failure message with CPPTEST_FAIL("my failure") but nothing regarding from the CPPTEST_REPORT_* logs. Ideally, I'd…
-
cpptestcli: files to analyse not found
We are using cpptestcli from eclipse Plugin and on the terminal. Using from eclipse and the cpptestcli based on eclipse is working too. But we want to use cpptestcli in standard version for automation purpose. The cpptestcli is not working. Our Project is a makefile project with a lot of software modules.…
-
Exclude autogenerated code from coverage report
I have project with custom configurations for running and generation stubs/tests. My project contains autogenerated files that I want to exclude from coverage report as we are not interested in their coverage and it affects total coverage of the project. I use standalone version of C++ test and tried: * add them to…
-
Why Is Collect Stub Information Failing?
We are using ParaSoft with GreenHills development environment. When we try to collect stub information we get the following error in the console: "Could not preprocess source file" (See the attached file for full error description) Can someone tell us what is wrong?
-
Displaying Code Coverage Results on Jenkins
Hi, I've been trying to visually display code coverage results on Jenkins but can't seem to find a way to do it with the Parasoft Findings plugin. Currently I can only graph the number of tests that have passed/failed but I would like to have a visual of the coverage percentages. This is the plugin I've been trying to use…
-
Extension tool for supporting Parasoft C/C++ test
Hi, Our company is focusing on analyzing software requirements due to Parasoft features. We would like to use Parasoft to do static code analysis for C, C++ and also assembler code. There is one requirement that we have to check if all assembler code is documented in the code but it seems that this check is not included in…
-
License issue for the version 2021.2.1
We have a linux OS running the parasoft cpptestcli, the version is "Parasoft C/C++ test Professional 2021.2.1" and the machineId is given to the license server. But sometimes the cpptestcli program failed with ERROR: License: Main feature "C++test" status: No more tokens available.ERROR: Error: No valid license (MachineId:…
-
How to create a rule using RuleWizard to identify a comparison operator?
I am creating a Parasoft rule for C/C++test using RuleWizard that flags whenever a type std::string is used as an argument within certain function calls. For example, this line should be a violation since it uses the variable 'mytestString' without a call to .c_str() LOG_TRACE(7, "ParasoftTestProj::main() Some TRACE…
-
How to create a rule in RuleWizard to check if the filename contains the foldername?
I want to create a rule that checks if a filename contains the foldername at the beginning of the file, for example: I have a folder named "folder1" containing a folder named "folder2" which contains a c file. This file should be named: "folder1_folder2_myFile.c" Is it possible to create such a rule with the rule wizard?
-
Need a faster way to merge results from clog files
I am attempting to merge 20k clog and tlog files using the load archive test configuration but it is simply taking too long for this to be feasible. Merging 20 files alone takes 40mins. Is there a better way to do this?
-
Parasoft not using autogenerated stubs
Hello, I am currently trying to use Parasoft with a colleague and I am running into problems with the autogenerated stubs. I wrote a unit-test suite and let parasoft generate the stubs for them. I then gave the files to my colleague and when he tries to run the tests it doesn't work because it won't use the autogenerated…
-
How to properly set up a unit test with a data source?
I'm trying to set up a unit test that imports a file of inputs and outputs as a data source. I think i've got the columns mapped properly, but every line reports "Signal SIGSEGV caught: segmentation fault [CPPTEST_SIGSEGV]", coming from the suite .cpp file where the data source is declared:…
-
How to solve the "Invalid compiler config file error" in "Flow Analysis Standard" test
Hi I am using Flow Analysis Standard in parasoft 10. My c project has been compiled in keil without any error and I imported it to parasoft using uvision keil project file. Then I run the Flow Analysis Standard but it issued this error "Invalid compiler config file" for all source files. Two tipical error messages are as…
-
Setup Problem for Static Analysis: Invalid compiler config file
Hi I am using Flow Analysis Standard in parasoft 10. My c project has been compiled in keil without any error and I imported it to parasoft using uvision keil project file. Then I run the Flow Analysis Standard but it issued this error "Invalid compiler config file" for all source files. Two tipical error messages are as…
-
How do I configure cpptestcli to control what is included ?
I have problems with following error message: Test execution: error preparing instrumentation / symbols data for file. In file included from C:\BuildRoot\IO\FCI\CI846\MainTrack\Dev\Current\MCU\Workspace_UnitTests.cpptest\FCI_PROFINET\file-data\CCRC32.cppc160100f\bundled_CCRC32.cpp:4:…
-
Collect Stub Information does not add make_shared in Stubs view in Parasoft C/C++test 2021.1
I am trying to stub the make_shared which is an inline function, to get 100% decision coverage but the Collect Stub Information Test configuration is not adding it to the Stubs view. Here is how I use it in ATM example of Parasoft std::shared_ptr foo = std::make_shared (10); if(foo == null) { // error statements (not…
-
Configuration problems after source update
I had a project with some tests for embedded product. As we are on active development we have usually update our source files in C/C++ test. If the is any tutorial how to update sources I will be very pleased. After this update, I deleted my old generated stubs for this project as they were deprecated. When I tried to…
-
Licensing: Unstable/changing Machine-ID
Changes in the network environment may affect the interface that is used to compute your machine ID (used to identify your license) 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 C/C++ test not appearing on the VS toolbar
Is any experiencing an issue where Parasoft C/C++ test is not appearing on the VS 2019 toolbar? I can see that Parasoft is installed as it's showing in the VS About box. Also if I launch VS2019 without code, maybe one in every ten times Parasoft will appear in the toolbar. I can then load a project and successfully run…
-
Need a faster way to merge results from clog files
I am attempting to merge 20k clog and tlog files using the load archive test configuration but it is simply taking too long for this to be feasible. Merging 20 files alone takes 40mins. Is there a better way to do this?
-
Excluding resources from Unit Testing
Some users may not want certain resources or files included in the testing scope for their unit tests. These resources can be excluded to ensure that no extraneous data is present in the tests. To indicate which project resources should not be tested during Unit Test Execution follow the steps below for your Development…
-
CLI Fails to import project
I've got almost everything working - gui operation, licensing, bdf generation, but I'm failing at cpptestcli. cpptestcli" -data "/myWorkspace/" -config "myConfig.properties" -localsettings parasoft_CLI/parasoft_localsettings -appconsole stdout -showdetails -import "/myWorkspace/myProject/myDKM" -resource "MyDKM" -bdf…
-
Original function not called despite not registering for stub callback in test case
I had created a stub to test function B. The original function of the stub was used to test function A in the past. Now with this newly created stub, the test case made for function A has broken due to the original function no longer being called, despite not registering for the stub callback. Can someone explain why it is…
-
Keil uVision Unit Testing ITM Simulator Starter Guide
In this tutorial, we'll be going over how to get C++test to run Unit Tests on Keil uVision projects. * In this example, I will be using the following: * Keil uVision MDK-ARM 5.26 * C++test 10.4.2 * Windows 7 64-bit * If you are familiar on how to import your Keil project and/or create a bdf file for Keil skip to step 7. *…
-
Test execution:error reading test log for Test unit for selected sources error while mocking fopen
I'm new to parasoft tool. while writing unit test execution for cpp test I'm facing ****-Test execution:error reading test log for Test unit for selected sources error**** if I'm mocking fopen function in my test suite. Could anyone let me know is there a way to use fopen for writing unittest case for 100% coverage
-
How to use PARASOFT_CPPTEST macro in C/C++test Standard
By default the -DPARASOFT_CPPTEST is added in the project settings in Professional. But where is it defined in Standard Edition where there is no concept of eclipse project files? Here is the answer (thank you @Bogdan Czwartkowski for getting that info)! * Create a file called extras.psrc (name is arbitrary) * add the…
-
Using Parasoft with Lab windows CVI project
Hello, I am trying to configure Parasoft to work on a CVI prj project. I firstly create a .bdf file from my CVI project, then i imported it in Parasoft and tried to configure it. But when i trigger the Test; , i have the errors - Cannot launch process: clang.exe -cc1 "- and Access is denied ... And i can n ot figure where…
-
Disable rule for specific library function
Throughout our code we do not check the return code on memcpy and memset. This is causing rule violations to be reported. We can prevent the warning by adding "(void)" before each function or by adding a parasoft comment before each call but this is not an ideal solution. What we would like to do is disable the rule for…
-
Autogenerated stubs not getting included in build
I have a file with several undefined reference errors (the function definitions of these functions are within another file which is not part of my current module). To resolve these I generated auto stubs and rebuilt my project again. But the undefined reference errors are not going away. How do I resolve this? Thank you
-
metrics report with raw values for each C-function
At the end of my Parasoft C/C++test Report, there is a Metrics Summary section. It is an array with a line for each metric and 4 columns for statistic values (like average and Min & Max). I would like to get rid off such statistics. How could I please get the raw computed value for each item of my project/workspace? For…
-
Update bdf file for imported project via command line
Hi, I have parasoft professional version. I have imported a project using a bdf file. However, I have changed the project and would like to update the bdf file for the imported project. I can update the bdf file easily. But how do I update the already imported project? If I type: cpptestcli -bdf "cpptestscan.bdf" -data…
-
cpptestcli doesn't function properly
I recently received a license for parasoft and I set everything up on my machine. I even ran a flow analysis on my code with the desktop app together with the local parasoft rep. I am now trying to run parasoft using the command line using cpptestcli. I set things up as written here:…
-
Missing symbol definition
I have created project using .bdf file for KEIL project. I am able to generate Unit tests successfully. I am facing issue for "Build and Run test executable using uVesion Simulator". It gives me error for not able to find variable from startup file even though startup file is included in project folder. Is there specific…
-
How to test a persistence counter
I'm trying to write a test that runs through a C++ class that tests a persistence counter. Is there any way to set up a Data Source or Parameter block so that the class memory is not wiped between step calls? I've tried putting in multiple Call blocks, which does at least get me to the end of the logic, but doesn't allow…
-
dDuplicate definitions errors
Getting Error[Li006]: duplicate definitions for APIs in .o file. Help me out to resolve this.
-
Deferred initialization of Runtime Library
In some cases where runtime library during initialization needs to have some software/hardware components to be up and running and initialized prior to initialization. e.g.: RTOS. By default: When collecting application level coverage, runtime library is being initialized as early as fist instrumented line of code is being…
-
Running Application Monitoring on QT apps
Managed to build the Application however now i am stuck at this when i tried to run application monitoring on it Any ideas on how to solve this?
-
New User, errors running C/C++ Static Analysis for my chosen coding standard
Hi, When I build my project from within Eclipse, it finishes with: 07:39:00 Build Finished. 0 errors, 0 warnings. (took 14s.306ms) However, when I try to "Test using coding standard", I get the following error repeated for ~50 .c files in my project. Reporting Parasoft C/C++ Metrics Analyzer results... The following setup…
-
multiline parasoft tags to suppress violations
Hello, I'm working under open-source C project, that is not using // style comments/ In some cases, description in the tag is very long, and can't be placed into one line. I want to know will Parasoft Static analysis tools will detect multiline tags like: /* parasoft suppress item MISRAC2012-RULE_20_4-a * "Trick compiler…
-
Quick guide to setup C/C++test Professional (Static Analysis) on Jenkins
This guide will Comprise of 3 Major Parts: 1 - Initial Project Setup 2 - Running from a command line in Jenkins 3 - Setting up the license on the CI/CD (Jenkins) Machine Part 1 : Initial Project Setup Step 1.1 Creating your Build Data file (.bdf) This is the command I used to create the .bdf :…
-
slimboot bios code coverage
I am attempting to use parasoft code coverage for slimboot bios https://github.com/slimbootloader/slimbootloader it appears that code code coverage requires a test app to run on the target which makes use of a runtime library. Since slimboot is a bios. I do not know how to make that work. The slimboot build process…
-
Error collecting information about available definitions
I am trying to write unit tests for a STM32CubeIDE project. I have build the .bdf file and imported it to Parasoft C/C++Test (Standalone). I was able to generate some unit tests, however if I try to run the unit tests or collect stub information I get the following error: "C/C++test analysis errors in /project_folder 1.…