-
How set parameter vaules of a stub depend on test case
In my project I've a stub of a fread -function (ANSI C file raed). CppTest_Stub_fread (void * _MT_var52, size_t _MT_var53, size_t _MT_var54, FILE * _MT_var55); //stub declaration How to set the out put paramer _MT_var52 from the testcase body? CPPTEST_ON_CALL("foo")->Arg("__return").Assign()->Int(5);…
-
Error Precompiling File
Hi, I have a Eclipse C++ generated project which I want to use Parasoft C++ test to perform unit testing. However, I have linkage problem as C++ test is unable to find my files. If I go into my project's debug folder and run it builds perfectly with no linkage problems. so how do I set the paths/symbols to my references?…
-
Two erros "outside workspace & parasoft project is read only
Hello all there are some bsp files required by my test files i gave the path tried to include them it gave error: Access violation and outside workspace. Then i went to parasoft properties and tried to edit project refrences then i got error project is only readonly
-
Dependency Analysis for C/C++
Is there any C/C++ dependency analysis tool/extension that Parasoft offers? We currently using 10.3 C/C++ tests Automation (Command Line) Edition with DTP Engine for static analysis. We are looking for a dependency analysis tool that could either be standalone or integrated with C/C++ test.
-
Need a recomment
Hi all, Im a newbie, so in the C++, too Someone can give me some trick to learning code? Thanks, Jasper
-
Add .cpp file to static code analysis
Hello, We are using the Automation C/C++ test tool to run static code analysis on our make based project. Is there any way to add .cpp files to the static analysis run. We don't want to include these files in our makefile but just want to run it through static analysis.
-
Compiler Error on identifier "__builtin_addressof"
Hi, I am trying to run a unit test using Parasoft 10.3 plugin for Eclipse Neon and stumbling upon a compiler error. The project compiles successfully when just building the project through Eclipse so there are no compile errors. But, when I try to run a unit test in this project then it fails to compile with a compiler…
-
Setup Problem
* Test execution: error reading test log for Test unit for selected sources.
-
Announcing C/C++test 10.3.4
This week we release C/C++test 10.3.4 (available now on the customer portal). This is a service pack release including both new/enhanced static analysis rules as well as several bug fixes - for full details and a list of all updated rules please check out the release notes @…
-
How to clear temporary files in C++Test Desktop
There is a way to quickly clear the temporary files. This is expecially useful action to perform when debugging issues:
-
Header Files Not Getting Listed in report.html Files
Hello, I have a situation with v10.3 C++test where header files are not getting listed in the report.html files even though the Console output shows numerous entries of "Collecting header files for ...". I am utilizing the -module parameter. What could be causing this issue? Thanks.
-
One Test Suite - per - Project
Hello, I want to generate a Test Suite per project. Rather than per test function, source/header file, or source file as described in "Test Configurations>>Generate Unit Tests>>Generation>>Test Suite>>Test Suite output file and layout" . When I try to manually write these fields myself, I always get the error: "Test suite…
-
Working with Keil 5.x and the --Via option in batch file
-Open the Keil uVision project. -Go to Options for target and open the Output tab. -Check/activate the Create Batch File option. * Run the build from GUI. * The batch file will be generated. It will be named as project name. So let's assume the project name is "ProjectABC" The ProjectABC.bat is now can be executed from…
-
User Rule Management with C++test Desktop and DTP Test Configurations
I've had users asking about sharing User Rules between C++test installs, and visibility of new Rules in DTP. The attached document provides a Quick Start for setting this up.
-
Missing Code Coverage Results
Hello, Is there any way to debug missing code coverage analytics from a linux arm-distribution unit-test?Using the instrumentation flow included with Cpptest and some example QT code, I can see a clog file being generated on my target but Parasoft doesn't display any code coverage after the test is complete and the clog…
-
How to add the rule to MISRA 2012 rulemap?
Suppose I created a rule and I want that rule to behave (name and severity wise ) as a MISRA 2012 rule. Where do I add it to MISRA 2012 rulemap?
-
When Triggers Generation of *_dev1.html Reports
Hello, For C++test v10.3, What triggers the generation of *_dev1.html reports? Are they only generated when Severity 1 findings are detected?
-
Error occurred, while importing IAR EW 7.405 Projects into Parasoft C++test.
C++test parse error: Coding standard checker: errors occurred while parsing the file. #include "spi.h" ^ "C:\Users\yang\Desktop\DI_HWA_IAR7405\SpiPrintf\spiDebug.h",4 Error[Pe1696]: cannot open source file "spi.h" searched: "C:\Users\yang\Desktop\DI_HWA_IAR7405\SpiPrintf\" searched: "D:\Program…
-
Skipped Files Listing
This is probably obvious however I've had no luck locating a listing of the 'skipped' files.
-
Using Parasoft C++test with Wind River Workbench 4.x /VxWorks 7.x
While C++test does not "officially" support integration with Wind River Workbench at the current time, the procedures defined in the document below will allow the use of a large portion of C++test functionality within Wind River Workbench 4.x. The document provides solutions for known issues that enables installation and…
-
How to include header files into Static Analysis scan using the C/C++ DTP Engine?
Do I need to include them with "-module . " ? Is this the recommended approach?
-
How to use Parasoft Dynamic stubs #6
Hello Community, I am a first time user of Parasoft's dynamic stubs. I am evaluating this feature as an alternate to using Google mock. If I have several Eclipse projects all containing different code, but the code under test calls a common function and I want to create a stub for that function that can be used by all…
-
How to use Parasoft C++ Dynamic stubs
Hello Community, I am a first time user of Parasoft's dynamic stubs. I am evaluating this feature as an alternate to using Google mock. If I have a function: void Func3() { int b = 1; Func4(*b); Func5(b); } In my test case for testing 3 what is the appropriate Dynamic Stubs calls to have Func4 output the value of b to 5…
-
How to use Parasoft Dynamic stubs #4
On https://docs.parasoft.com/display/CPPDESKE1033/Working+with+Complex+Types, can you provide an example of the stub for Line moveLine(Line line, int xoff, int yoff); but using the “Basic Approach to Working with Complex Types”?
-
How to use Parasoft Dynamic stubs #5
Hello Community, I am a first time user of Parasoft's dynamic stubs. I am evaluating this feature as an alternate to using Google mock. Can stubs be created for functions in the same class (C++) or same the same file(C)?
-
How to use Parasoft Dynamic stubs #3
Hello Community, I am a first time user of Parasoft's dynamic stubs. I am evaluating this feature as an alternate to using Google mock. When generating stubs, does C++Test automatically generate the code inside the stub to support Dynamic Stubing or does have a human have to write the code for the dynamic stub? As an…
-
how to use Parasoft Dynamic stubs #1
Hello Community, I am a first time user of Parasoft's dynamic stubs. I am evaluating this feature as an alternate to using Google mock. If I have a function: void Func1() { int a = 1; Func2(a); a++; Func2(a); } In my test case for testing Func1, what is the appropriate Dynamic Stubs calls to validate the first time Func2…
-
localsettings.properties File Generation and Population
localsettings.properties files store important information regarding Parasoft tool's stored configurations as well as project parameters. A localsettings.properties file is required to utilize CLI integration, back up an installation, or transfer configurations from one installation to another. For 9.x dotTEST, C++test,…
-
"Invalid Configuration Location" after installing the tool
If the following window appears when a User is trying to launch the Parasoft tool: Invalid Configuration Location pop up. This message is reported by the Eclipse platform used by the Parasoft Tool when there are some problems with caching Eclipse internal data in the folder "configuration", usually located under…
-
Finding your Machine ID
Solution If you want to capture the machine ID, you can do so using one of the following methods: Method 1: if you are using the GUI. From the menu click on "Parasoft" and select "Preferences..." Then when the Preferences dialog appears be sure to expand the "Parasoft" tree on the left hand side and then select "License".…
-
Parasoft Findings plugin now supports Jenkins pipeline jobs
Starting with version 10.3.5 of the Parasoft Findings for Jenkins plugin, Jenkins pipeline jobs are now supported, in addition to Freestyle and Maven jobs. Static analysis, unit test, and functional test results can all get published using a pipeline script. For details on how to do this, please see the documentation for…
-
Defining custom metrics for C/C++ [Halstead and others]
We are migrating from version 9 to 10 of C/C++. One of the things we wanted to do was run more metrics on code. Discovered a short blog on how to export, modify and then import the properties file. In our case we want to try out Halstead metrics and any of the other metrics available for C/C++. When we do the export we see…
-
cpptest does not generate bugs report!
I am running cpptest with the command line using cpptesttrace and cpptestcli. I do have cmake build system. The analysis has never caught any bug and always shows that the number of files that have been checked to 0. Not sure what is the issue exactly. Here are the commands that I run cmake -G "Unix Makefiles" ..…
-
ERROR: Cannot launch process: Access is denied.
When you ran C++ Desktop you need to make sure C++Test you can execute your compiler. If you don't set it up properly, you will see a message like that: Error during process execution: Cannot launch process: "C:\gcc" "-IC:\Apps\Parasoft\C++test\10.3\engine\runtime\include" -I. -DPARASOFT_CPPTEST -v -E -dM -ffreestanding…
-
Is there a built-in method to measure runtime at file-level for Flow Analysis & CDD rules?
We were informed of a method called PSRC that we used to gather this data for Pattern-based rules, but we would like to know if there's also a built-in method for Flow Analysis & Code Duplication rules.
-
Static code analysis for microchip mplabX project
I'm using parasoft 10.3, What are the steps for running static code analysis for unsupported compiler, i'm using XC8 compiler for 8bit micro controllers. I would like to perform only "MISRA C 2004" Static analysis but Parasoft tries to perform compilation. Users guide on page 48 says: Microchip Windows-hosted: MPLAB C…
-
Accessing Private members of the class in CPP unit test
How to set the private variables which is defined in the different CPP file other than file under unit test using parasoft?
-
TestCase Generation in a Common path
Hi Guys, Can we create our test cases and run them from a common place out side of the project? Like If I have my VS solution in MainProject folder and it have 20 projects. Now I'm able to generate and run them from project's location. What I want is to create a Tests folder outside the MainProject, which contains folders…
-
How to set compiler path in cpptestcli?
I'm using Parasoft C++test 9.0. I've used "cpptestscan.exe" to create build data file(bdf), then I want to run my ruleset with "cpptestcli.exe". When I use "New Project -> C++ Test -> Create project from a build data file" in Parasoft IDE(Eclipse based), it allows me to configure compiler setting(family, c compiler, c++…
-
How to generate and run unit tests outside the project folder (in MS visual studio) ?
How to generate and run unit tests outside the project folder (in MS visual studio) ? Currently I am not able generate test cases using parasoft ,in a folder which is outside the CPP project. what are settings that needs to be done ? Please suggest.
-
Parsing error
I am trying to check "Coding Standarts" of our project with Parasoft. This is a C project which uses "gnu.cross.cortexm3". I open this project with Parasoft and try to test it with "Example Configurations" but it skips all the files in project and doesn't check any file. When I create a new simple makefile C project(Hello…
-
Issue running unit tests (cpptest) using C++Test (9.6) and Cygwin (GCC 6.4)
Disclaimer: I have not used C++Test in the past. I have installed Cygwin with GCC version 6.4.0 but the latest version of the GCC toolchain that C++Test version 9.6 seems to support is 4.9.x. I haven't figured out how to install an older version of GCC to match C++test requirements. I figured that I could run static…
-
C/C++ rule engine failure
I use C++test 9.0. I've created bdf files for 3 different projects with "cpptestscan" command. Then, I've used these bdf files to create new projects in Parasoft and tried to run "Example Configurations", then it works. It works for 2 of the projects but doesn't work properly for the other one. Firstly, these 3 projects…
-
Custom rule Python scripting interface
Hello, Could anyone tell me if there is there any documentation related to the python scripting interface, what are the node and context variables etc... ? Regards.
-
cppTest 10.x with VS2015 plugin
Hi, Is there any plugin for Visual Studio 2015 for the newer Parasoft cppTest 10.x to run static testing? If not, is there any plan to support the plugin and when can it be released? Thank you.
-
C/C++ test into VS2010 ?
does anyone know where I can download C/C++ test plugin for VS 2010? Thanks, Jack
-
Deep Analysis
When deep analysis is enabled the bug detective findings don't show up in the result as they do in 'standard' analysis. Is that to expected?
-
thorough & deep scans analysis activity status
Is there any way to verify activity during deep & through scans (watchdog report)? The app tends to sit at 43% for extended periods of time. The console gives a bit of feedback but there can be long stretches before any status is provided. I currently have a thorough scan that has been running nearly 24hrs that ‘appears’…
-
Error preprocessing file while static analysis
Hi, I`m new to the cpptest tool. My object is to handle static analysis in our project. cpptest is implemented on our linux machine. But when I execute it with cpptestcli with specific properties, error is occurred: [C++test] [xpusch_denc0_cmn.c] Error preprocessing file…
-
Setting Environment variables and supply arguments
Hi, I am currently using the cpptest plugin v9.5 for Eclipse Luna on a RHEL 7.2 environment. My c++ application requires some command line arguments to be supplied, as well as me setting an environment variable for loading of shared libraries. Where do I set them? In addition, somehow it is unable to find and read the test…