-
how to generate local variables in the test cases and test code dependent on local variables?
In one of the functions, one portion of code looks somewhat like below, somefun(){ int a=1; if(a!=1){ cout<<"this is executed"<<endl; } } how can i have the cout executed from the test suite.
-
How to add a stub for a Class member function?
For example, class A has a public function foo(). class A { public: int Foo(); } I add the stub like this: void CppTest_Stub_Foo() { CPPTEST_STUB_CALLED("A::Foo"); int __return = 0; if (CPPTEST_STUB_HAS_CALLBACK()) { CPPTEST_STUB_CALLBACK(int __return, const A __this); CPPTEST_STUB_INVOKE_CALLBACK(&__return, this); } } But…
-
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.
-
Data and Control Coupling
Hi parasoft family, Do you know whether or not parasoft c/c++ test encompass data and control coupling? Best Regards, -BA
-
error #10010: errors encountered during linking;
Hi great parasoft family First of all I wish good and health days, I really need help,the errors and warning as follows, C/C++test analysis errors in /deneme09042021 1. Test execution: error linking test executable for Test unit for selected sources. error #10198-D: no input section is linked in warning #10202-D: no…
-
C++ test Report: Could not build Analysis data
I have a C++ project that is built in Eclipse with GCC/G++ compiler. The project can be compiled successfully and run without problems, but when I try to perform static analysis via cpptestcli, the report generated show the following error: ........./ConfigMgr/Common/ConfigParser.cppBugDetective checker: could not build…
-
Setup error
hi, I am using c++ test 10.4.2 in VxWorks 7. in my project I am using atomic operations (using the #include <"atomic">, if I remove the atomic there is no issue) the project compiles in the VxWorks but once running the c++ test on the project I am receiving the following setup error:
-
How to access private function from a stub callback?
I have a private function that needs to be called normally or needs to be stubbed depending on the test case. So, I either need to be able to apply the stub of the private function only to specific test case or be able to call the original private function from within the stub callback. Anyone knows how to do either?
-
Test cases are not executed
Hello everybody, I have a problem when i want to execute unit test cases on a folder of resources. I generated the test cases and tried to execute them, parasoft tells me there are 32 files in scope of the tests, which is correct, but it does not execute any testcase. I copied the generate unit tests and run unit tests…
-
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?
-
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 support for [[fallthrough]]
Does Parasoft Static Analysis support standard [[fallthrough]] attribute or gcc attribute((fallthrough))? If not, are there plans to support them?
-
"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,…
-
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…
-
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…
-
Reset RunId inside Dynamic Stubs
I am running Unit Testing in the following environment: Eclipse: Kepler Parasoft: 10.3.4 I am using dynamic stubs to do unit testing. I am calling the same function multiple times inside a single test case, and that function calls additional sub-functions that are stubbed. I know that I can set the Run Ids to control the…
-
AUTOSAR C++14 release version?
Which AUTOSAR C++14 release version does the tool support?
-
DS-5 Unit Test Execution
I am working with Arm DS-5. I use Eclipse IDE for Arm DS-5 I use Arm C Compiler 5 and I use cortex A9. I easily generate unit test via generate unit test feature of Parasoft. I can reach generated test from Test case explorer. But I can not run these test. When I run the tests, the console part of IDE does not affect.…
-
Keil UVision Parasoft Plugin
I work with Keil uVision v5 ide and I want to plugin yhis ide to parasoft. But I think this ide is not eclipse based. Therefore when I run the installation about parasoft c++test eclipse plugin setup file and proccess ended parasoft view does not appear on toolbar of keil uvision ide. How can I plug Parasoft with Keil…
-
Misra rule violation shows up when not running static test on full project
Hi, when running static analysis with misra rules we get a lot of extra rule violations when running the analysis on a single module (single folder). The rule 20.9 "macro might not be defined" accounts for all of the extra violations. When the analysis is run on the full project, these do not show up. The project was…
-
Stubbing functions which are not declared in header file
Is there any way to stub a class member function which has been defined in CPP files completely. The code is very old and we cannot modify the structure of code for the sake of unit testing.
-
IAR Embedded Workbench Support - Details
Hi, Parasoft C/C++test Professional 10.4.1 . Regarding IAR support. I understand the support in compilers , but how it supports in environment , according to: https://docs.parasoft.com/display/CPPDESKE1041/About+EWARM Can the product support IAR IDE ? Thanks
-
How to upload new Test config properties files to DTP 5.4 server ?
Hi, using DTP 5.4 doTtest 10.4 c++Test 10.4. How to upload new Test config properties files to DTP 5.4 server ? Is it related to license ? Thanks Eldad
-
Ruining c++ from Eclipse - /usr/include/c++/5.4/string:38:28: fatal error: bits/c++config.h: No such
Hi, I created a simple C++ Hello world project under eclipse on Ubuntu 16. I run Parasoft from the GUI. Where should I update the path for parasoft ? Thanks
-
Stubbing Fails to Find Functions
I ran the "Collect Stub Information" Built-In test configuration on a project. Inside this project, there are a series of both static and non-static functions. However, when I run that test configuration, it fails to find any non-static symbols (functions). What, if anything in terms of code or project configurations,…
-
What specific functionality does the "Instrument Selected Source File(s)" Check Box have?
By default, when a file is imported into an Eclipse Project, this box is checked. I have looked in your documentation to try to get a specific idea on what "Instrumentation" means and what impact it will have on things like code coverage, static analysis, stubability, etc. For example, if I don't want a file included in…
-
Copy Constructors and Copy Assignment Operators Static Analysis Rule [MRM-49]
Rule: MRM-49-3 --> A copy constructor and a copy assignment operator shall be declared for classes that contain pointers to data items or nontrivial destructors. This Static Analysis rule requires that I have to adhere to the Rule of 3 (now rule of 5 if moves are included). We have a destructor defined, but not the copy…
-
Why Disable Parasoft extension doesn't operate on VS 2017
I am trying to disable Parasoft ext on my VS 2017 , Parasoft extension on VS 2017 doesn't disable . even after VS restart.
-
Rules on File Server are changed to invalid
Hi, My rules are located under shared File Server. In some cases I noticed that the files extension become changed to invalid. rulename.properties.invalid Any suggestions ? Thanks
-
cpptesttrace
Hi, I am running CLI command cpptesttrace and cpptestcli on a C++ project on Linux. I have a workspace that has many project dependencies. How can I set up the command line to run in one line command several projects. 1. Create bdf for all project. 2. Run cpptestcli on all bdf files for all projects in worksapce in one…
-
Test Execution error
Hi, I am using Parasoft C++ 9.5 with Eclipse Luna C++. My project have multiple build configurations, as I have multiple modules in the project, each with its own main class and functions. When I create and execute a unit test for project A, the unit test runs perfectly, flagging out failed test cases properly. However,…
-
Test Case Editor
Hi, I have some issues to create a test case with the editor of this function (which is a 1st order filter): _void Filter1stOrder ( T_1STORDFLT_VAL * p_ptVal, /*in out*/ const T_1STORDFLT_COEFF * p_ptCoeff, /*in*/ VCMS_real fIn, /*in*/ VCMS_real * p_fOut, /*in out*/ ) { *p_fOut = (p_ptCoeff -> fXiCoeff) * fIn; *p_fOut +=…
-
Enabling C++Test 10.3.4 Rules in DTP
The newest version of C++Test (10.3.4) contains new and updates rules that are not available in DTP 5.3.3. These rules and rule documentation must be added to the DTP server in order to make the new rules available in the Test Configuration GUI and to be able to view the rule documentation. The following method outlines…
-
Unit test problem with original method stub files
Hello to everybody. I encounter a problem during the unit test of a software developed in Tornado environment with Vxworks 5.5 for a PowerPC embedded system. I import the project in Parasoft cpp test (in Eclipse IDE) with the wizard and the project compiles correctly. When I create the Unit Test I encounter a problem by…