-
Parasoft plugin 10.4.3 for visual studio skips all files
I was using 10.4.1 previously and had no issue with running static analysis. However, once I updated to 10.4.3, all the tests skips all the files, checking 0/0 files. Is there some incompatibility between the 2 versions or is there some necessary steps to be taken for updating from 10.4.1 to 10.4.3?
-
MISRAC2012-RULE_1_1 Compliance Pack settings for C99
Hi, There are two sets of rules for this Rule: two for C90 and two for C99. I am developing my program using C99 standard. Shall I unmark the two C90 rules and leave only C99 rules? (both 4 are marked by default) Thanks, Ritchie
-
Trouble executing with stubs
I've made a couple of stubs using the "Lesson 15: Configuring Stub Behavior in Source Code" chapter in "C++test Host-Based Unit Testing" guide. After running "Collect Stub Information" I created User Stubs for the functions I needed to stub. Trying to execute my test case give the error: function…
-
Memory test cases using Parasot C++test
I am looking for creating unit test cases for memory testing especially checkered box or galpat test. I did research in parasoft documentation however there is no such example. Did anyone got to create any tests using parasoft?
-
Adding more header files to be analysed by extension (.gen).
We are working with C/C++test Standard. A prospect was able to analyse header files (.h) by providing -module switch. (Feedback - not very intuitive to find this option in docs AND understand WHY "-module" would control the inclusions of headers into the analysis - but that is a separate discussion) . So - they have some…
-
Code composer studio unit tests fail to re-run
Hello, I have run into a problem using the embedded unit testing with c++ test. The sequence of events is; * Write some unit tests * Run TI CCS v4+ tests [C/C++ test console output] Target running... Interrupt to abort . . . * ~50 seconds after starting [C/C++ test console output] SUCCESS: Halted at correct location * All…
-
Error during parsing file (C++ static analysis)
Hello, this is my scenario: * Windows 7 platform * Parasoft C/C++ 9.6 Eclipse IDE * g++ inside Cygwin installation * Static analysis on C++ code (this code is compiled and executed on Linux platform) After run a CRules static analysis I got the following errors: size_t undefined, nullptr undefined, __int28 undefined and so…
-
Static analysis with preprocessor directives
I am running static analysis tool on C code and getting a MISRA2012 Rule 5.5b violation: The names of macros that exist prior to preprocessing should be distinct from the identifiers that exist after preprocessing (c99) [MISRAC2012-RULE_5_5-b]. It appears the cpptestcli is processing both the #ifdef clause and the #else…
-
Gmock integration
Have anyone tried to integrate Parasoft with GMock or other Mocking framework?
-
Running SA & UT to cover conditionally compiled code
I am trying to figure out the best solution for running static analysis and unit tests on all of our C++ code. There are 3 different pieces of hardware that our code runs on. We have sections of our code that are compiled out depending on name we pass in to the compiler, IE: “-DHW1”. This is the primary way our main…
-
Define Multiple Stub Callback Functions in a Single File?
Hello, I'm trying to use stubs with Dynamics Stubs Configuration enabled. All the stubs are created using "Create User Stub" option, and each are in Cpptest_Stub_(functionName).cpp files. The user manual stated that I should put Stub Callback functions in test suite files and define the stub logic there. However, instead…
-
Parasoft creation of .bdf file using bitbake.
I'm looking to setup c/c++ test to do static analysis, but my build uses bitbake to compile instead of a straight-up make command. Is there any trick to get this to create the .bdf with cpptestscan or cpptesttrace, or is there some way I can perform some level of static analysis without doing the build?
-
Error while doing static analysis with Parasoft C/C++test Professional 10.4.0 (Eclipse) in windows
Hello, Good Evening! This is my scenerio, I am doing static analysis for a make file based Project which uses arm-linux-androideabi-gcc compiler. While doing the static analysis I am getting the below mentioned error in the console window. Preparing options for MM_Version6.0 project... make -i CXX="cpptestscan.exe…
-
Programmatic Suppression
I am in need of a rule that detects ALL instances where the source code, regardless it's lines or blocks, has previously been suppressed from violation reporting ! Is any *.rule that fits above requirement already available in the download package?
-
Qt IDE with Parasoft Plugin
Hi, I use qt IDE. I want to add Parasoft to qt IDE. Is it possible for plug in Parasoft to qt ide?
-
Possible division by zero - fails to detect
Hello. I am running a static analysis checks with Parasoft C/C++ test. And I encountered the following issue: passing a zero parameter to a function which afterwards uses it to divide is not always detected/reported. For example: void some_function() { test_function(0); } void test_function(int parameter) { int var = 5 /…
-
C/C++ Test Does not start.
While starting CppTest , it hangs and does not start. Loading process stops while loading some svn or mylyn related plugins. This happens frequently. We have to uninstall and reinstall the software in order to work again.
-
Parasoft C++test and WindRiver integration
Hi, I have a one lisence for C++test. I use DS5 Eclipse IDE and Workbench 4 IDE on the same machine. I integrated with DS5 Eclipse with C++test via C++test professional eclipse plugin exe. And I want to rerun this exe it says that remove all or repair it means that this eclipse plugin just integrates with only one eclipse…
-
Is there way to report SLOCs for functions?
I was looking for a rule similar to "Report Cyclomatic Complexity [METRICS-29-5]", but for LOCs. Is there such a rule or some other way to report LOCs for the functions?
-
Is there a way to report names of global/static variables?
Is there a way to report names of namespace scope and translation unit static variables?
-
Parasoft support for [[fallthrough]]
Does Parasoft Static Analysis support standard [[fallthrough]] attribute or gcc attribute((fallthrough))? If not, are there plans to support them?
-
how to validate a reference argument on CPPTEST_ON_CALL?
I'm using gcc compiler MinGW version 6.3.0 with Parasoft 10.4 under eclipse. I have a C++ function which expects an argument passed as reference, I want to validate on my test that I'm not passing that argument as null. I tried several ways to use the .Equal() on the stub, but I always get errors. My simplified code is…
-
Parasoft unit test C/C++ test: How to use constant as variable in Unit test
Hello, vehicle software has many special constants which could be changed by test/calibration engineers during tests with calibration tools. While designing unit test cases, I would like to change the value of these test cases across test cases. But since these are defined as constants, one the software is compiled, I…
-
Saving Unit Test in VS 2017 using "Test Case using Editor"
Hello All, Am I missing something -- but in Visual Studio 2017 - when I attempt to create a new unit test using "Test Case using Editor" i do not see any dialog on save. I figured out a work around - by "x"ing out the tab I am prompted to save - -but that does not seem very graceful. Here is a screen shot (also…
-
COMMENT-04 Bug
Hey, As I was customizing a rule set I noticed a bug in COMMENT-04. It seems that if you run it on a directory with files, it works as indicated in the documentation. However, if you run it on a .sln, with multiple sub directories it flags many more (correctly commented) functions. I presume that it has to do with the way…
-
Launch cpptest with a specific workspace and modify PROJECT_LOC variable
Hello, I have two queries. 1). I wish to know how to launch the cpptest GUI and specify a workspace to open rather than the default (not sure where this is set either). 2). How to modify the PROJECT_LOC so that projects can be shared with multiple people. Parasoft is able to pick on the PARENT_LOC and WORKSPACE_LOC based…
-
Is there technical documentation
I'm using C++test in a custom way (embedded ST ARM MCU) and am fatigued by the lack of productivity and progress. The "owners manual" (Parasoft C/C++test Professional) doesn't begin to describe what's really happening with the code. I see how to turn the headlights on and off, but only one works. Now what? Is there any…
-
how to customize METRICS-39 ?
I am trying to create a version of METRICS-39 with a different threshold. I have duplicated the rule and modified the RULEMAP. However when I open the rule in the wizard there doesn't appear to be a way to modify the threshold like other rules. what am I missing?
-
best static analysis rule for arithmetic complexity?
Hello, I have found a few metrics that appear to address operator complexity. Halstead is the metric you find online. It looks like C++test supports several different Halstead complexity calculations but; a. they are not all enabled b. the ones that are enabled are not setup for violation detection. I also found VOCF which…
-
Suitability of Parasoft C/C++ for performing Static Code Analysis
Hi All , My necessity is to evaluate options to consider usage of Parasoft C/C++ for conducting Static code analysis ( i) whether Parasoft C/C++ integrates seamlessly into VS 2015(IDE) , GIT and Jenkins ii) does it involve C++/CLI (Managed C++) for static analysis in addition to languages used C, C++, MFC & C#, .NET iii)…
-
Keil unable to build unit test using library approach
Hello, I am using Keil for our application development. The objective is to create unit tests for our application that will run in the ARMCM4_FP emulator. For unit testing, I created a "UnitTest" build target that creates a library, verses an executable, of the application code and any non-hardware dependent library…
-
Need timeout == pass
Infinite loop timeoutI want C++Test to report a success if timeout is triggered. I have an infinitely looping task. I expect a timeout. I don't want the timeout reported as an error. Here is the basic setup of the function (which I am not free to change) ... void MyInfiniteTask(void) { while (TRUE) {…
-
"Scope Settings" Menu inside Parasoft Project Properties
I looked at your documentation to try to get more information into what these options in this menu do. I found a lot on how to use it, and what each of the options are for, but it did not explain what the impact would be on utilizing these settings? For example, I know that it doesn't run code coverage or static analysis,…
-
BDF working directory
Hi, I created my bdf and everything works as it should. However, i notice in the .bdf file the working directory has an absolute directory, eg working directory = /home/chris/workspace1/projname/ Is there are smart way to update the the .bdf file to have a relative path so if I open my project in a new workspace it will…
-
Unable to generate the Test Suite
Hi Team, I am trying to generate the TestSuite for a .cpp file present in the project. The projects builds fine without any errors. The .out file gets generated. Trying to create as - Right click on the .cpp-> Parasoft -> Test Using -> User Defined -> Unit Testing -> Generate Test Suites. The error displayed in the console…
-
C++test Cpptestcc Advanced Tutorial: Including Static Libraries Coverage
This is a second part to the following forum post: https://forums.parasoft.com/discussion/4423/c-test-latest-coverage-collecting-features#latest This post assumes that you understand how the basic of instrumenting source code for coverage collection via cpptestcc and how to use/build C++test Coverage Runtime libraries. We…
-
Cannot find function
When creating a test case for a function (without processing), the C++ test tool cannot find the target of the corresponding function in the Drop-down menu.
-
Build artifact deployment to AWS EC2
Hi, I am working on a .net application.Output of my msbuild is dll. I want to deploy these dll's from Jenkins to AWS EC2 windows machine using scripted pipeline.What is the better way to do it?I am looking for any suggestions/example docs on this. Thanks, Saisirisha
-
Static Analysis Rule
Hi, I analyse my code with recommended rule set but I noticed the following thing; I can easly detect array out of bound for example; int scores[] {100, 90, 80}; for (int i = 0; i <= scores.size() ; i++) // I take a violation about array out of bound error { ..... } But I have a method which takes transpose of matris. My…
-
C++test latest Coverage Collecting Features
C++test has introduced a new functionality that will allow users to combine all coverage findings from their Static Libraries and/or previous runs into one report. We have introduced a new wrapper executable used to collect coverage, cpptestcc, and introduced a new fully customizable Runtime Coverage Library. I have put…
-
Unable to find "stdlib.h" during stub generation
Hi all, I'm currently working on a modification to some Linux kernel code, and while I've been able to generate a BDF for the entire kernel and can perform static analysis on my new/changed files without a problem, I can't seem to either generate stubs or run unit tests on the affected files (in file scope). For instance,…
-
Working with Wind River Workbench in command line
Hi, We use. Parasoft with jenkins therefore we work in command line. For working with Wind River Workbench project how should we proceed?
-
Remote connections to C++Test and running multiple instances of it by the same user
Dear Sir/Madam I have installed a C++Test on a Windows server. I have one network license (1 licensed token) for this product. Please consider the following scenario: We have configured the windows server to permit multiple remote-connections to it by the same user name but with different sessions. Now, we connect remotely…
-
Static Analysis on isolated module (c-file)
Hello, I have an interest in simply open a module (c-file) into parasoft and executing one of the built-in Static Analysis sets, for example "Example Configurations". Is there any way to do this without creating a full build project and assigning a build system (CDT, microsoft, gcc, etc.) The module is part of a larger…
-
Execution problem for cppunit format tests
Hi, I try to run cppunit format unit test in cpptest standalone ide with armcc compiler. Then I take the attached error. How can I fix it? Then I run the example which is provided from you. Your cppunit test did not work also. Your example was ATM. I took again the same error. The error attached to discussion. And I…
-
Build id - character limit?
Do we have any character limit for the BUILD ID?
-
C++Test, no project import in Visual Studio plugin
Hello, I just installed VS 2017 and the C++Test plugin for visual studio. There appears to be some basic installation issues. * The new Visual Studio launcher to enable C++Test does not appear in my Start Menu * Visual Studio does display the ParaSoft menu * New/Project.../Import Keil Project is missing. Actually all of…
-
Keil uVision Static Analysis Problem
I worked with Keil uVision. For analysing Keil uVision code I followed instruction of the https://docs.parasoft.com/display/CPPDESKE1041/Keil+MDK-ARM+Support document. I create bdf file and I import my code and bdf file to standalone C++test ide. Then I tried to do static analysis for this code. In the parasoft document it…
-
How do you generate stubs for template class functions?
When collecting stub information in my test configuration I am not finding references to our functions in template classes. Is there a way to generate stubs for our template class functions? Here is an example of a template that we are using in another class that is under test. The function func_1 doesn't show up in when…
-
Stubs for variadic functions
Recently I had to stub out a Linux ioctl function for testing. I found that the stub doesn't pass the variadic arguments to the callback function. In order to pass the arguments I made a quick hack, and hijacked the __return pointer from within the auto-generated stub code to be able to see the arguments as shown below. Is…