-
[C++ unit test] undefined reference to the function that already stubbed
Environment: I'm working on Window system & C++test 9.4(eclipse) & gcc4.7 Procedure First, I evaluate the unit test with a very simple C++ code, just a main() and a simple function, I stub the function and run the unit test, everything is OK. Then I move to my real project code, and 3 steps as follows (same with the simple…
-
Parasoft DTP not receiving C++ coverage metrics
I am executing unit test from the cpptestcli and have configured the properties file to report metrics to the DTP server. I know the configuration is correct as Static Analysis and basic line coverage metrics are reported to the DTP. However, advanced coverage types such as MC/DC do not show any results. The test…
-
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.…
-
How do you stub a function to return a different value each time it's called in a single test
I've got a function with the following code: if (ext_test() == true) { ext_mod(); if (ext_test() == true) { ext_in(); } ext_out();} and I need to make a test that executes out_func() BUT NOT in_func() (the ext_test(), ext_mod(), ext_in() and ext_out() functions access data outside the function; I didn't design this BTW,…
-
Changing compiler options in settings
I'm trying to use cpptestcli for Unit Testing and I need to add the -DCPPTEST_THREADS=1 option during compilation. The documentation only describes how to add this option inside the IDE and for a single project, but by exporting its build settings and by locating the property to modify I managed to use it on the CLI by…
-
How can we generate a .properties file in desired location?
Using: Eclipse with parasoft plugin. I am using Data source as input for my test suite (test cases), while adding data source to test suite level a .properties file gets generated. Issue I am facing is: to generated Test Suite I am using a external folder which was initially not inside the project scope, I have added the…
-
Test execution: error preparing instrumentation / symbols data for file upon including glib header
**Test execution: error preparing instrumentation / symbols data for file. "/usr/include/glib-2.0/glib/gspawn.h", line 76: error: expected a "}" G_SPAWN_ERROR_2BIG __attribute__((__deprecated__("Use '" "G_SPAWN_ERROR_TOO_BIG" "' instead"))) = G_SPAWN_ERROR_TOO_BIG, ^* Test execution of my code fails in parasoft tool…
-
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:…
-
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. *…
-
dDuplicate definitions errors
Getting Error[Li006]: duplicate definitions for APIs in .o file. Help me out to resolve this.
-
Undefined Reference to Time: C/C++ testing
I am doing a cross platform testing to generate runtime executable with compiler TricoreGCC . I could generate the test cases but am not able to run them or to create the runtime executable. * I have also built the runtime library with the compiler which i am using and added it in to the linker options. * Added the include…
-
Unable to generate unit test coverage report
I am having issues to generate coverage report using Parasoft in eclipse Java. Eclipse display error, **No results were reported during the configuration run. Please check your settings and try again ** Setup Problem [ERROR]could not report coverage Could not find coverage files, probably instrumentation was not done. I am…
-
Structural code coverage with Code Composer Studio
I try to carry out structural code coverage with Parasoft code composer plugin I am using Code Composer Studio v8, My target has Flash memory (KB)=32 , RAM (KB)=12. Parasoft C/C++ makes static analsys very well (And also Visual studio plugin works very well) but when I try to carry out " Run TI CCS v4+ application with…
-
Unit test Generation method in Parasoft
hello every one.. it is my question...is unit test generation in parasoft based on decision path in function or not , only based on Input value of function? in the other word i want to know parasoft in unit testing consider the decision path and condition statements and generate test case or not only Input argument are…
-
Collect Stub Information Fails To Find Identifier
Hello, I am using Parasofts C/C++ Test in an embedded environment; * IDE: Code Composer Studio v8.2.0.00007 * Device: TMS320f28075 * Compiler: ti-cgt-c2000_18.1.3.LTS * Product: Parasoft C/C++ Test Professional 10.4.2 Whilst trying to run the built in "Collect Stub Information" operation Parasoft cannot find certain…
-
How do I define the execution sequence of the test cases in a test suite?
I need to run test cases in order. How do I do that? I have tried ordering the macros and the testcases in the testsuite source file but that didn't work.
-
Highlight "Not covered conditions" not working.
Having both covered and not covered selected shows no highlight at all. Having only not covered selected shows no highlight as well. Having only covered selected shows highlight. What is going on???
-
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?
-
how can i run unit test on xillinx SDk ?
hi , i want to generate and run unit test on a target based on Zynq 7000 chip(Zybo) with xillinx SDk tools. I know that this platform is not supported by parasoft c++ test by default, but i want to know how i can do it.please hep me. thanks a lot.
-
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…
-
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…
-
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,…
-
Jtest Unit Testing Offline Platform
Hi, How can I run unit test with jtestcli in offline platform?
-
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…
-
How to Save Test Suite
We're trying to save a Linux test suite (using git) so we can share it among developers. The existing suite contains several hidden files (.parasoft, .cproject, .project, .metadata) that contain absolute paths to the original suite locations, which breaks badly when we try to reuse the project elsewhere. How can we save…
-
Test execution: error linking test executable for Test unit for selected sources. Error
What is this error, what is the resolution for it? the error "Test execution: error linking test executable for Test unit for selected sources." comes while running the unit tests.
-
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…
-
Parasoft Jtest 10.4.2 Milestone 2 Build Available Now
Our development teams have been working diligently and have put together a milestone 2 release of Jtest 10.4.2. They have added many great features thus far and are continuing to make our next release even better. The items below are included in this milestone release. Static Analysis & Security Testing * Helps…
-
About Stub function
Hi everyone, I am a newbie here and I surfed lots of articles in 'help contents', but still got little sense about stub functions. Suppose that I have a source data library and use it in a Test Case writen by my own. And I want to know more information(for instance, the variable values calculated in one section inside the…
-
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…
-
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 +=…
-
Code Composer Unit Testing
Hello, Just looking for a clarification. Does "CCS4xConnector.js" or cpptest (in general) support the instrumentation flow required to run a unit test on a TMS320C6x target and generate code coverage metrics? Or is it specifically for runtime analysis of Code Composer 4.x projects. Im very confused as to what level of…
-
Unit test generation issue with #ifndef preprocessor directive
I am trying to generate unit tests of a module with a "#ifndef" preprocessor directive in the code. It looks like that the code within the "#ifndef" is excluded even if the symbol is not defined and the identifier unidentified error is displayed because type definitions and variables are not parsed. Am I missing something?…
-
Appling C++Test unit tests to library projects using Code Composer 7 embedded
Greetings, I'm trying to generate unit tests for a code base that implements a library for an embedded application built for Code composer. Unlike the Parasoft Visual Studio version, the CCS 7 system doesn't seem to understand how to run the linker for the TI compiler on a 'project' that only creates an library archive. Do…
-
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…
-
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…
-
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…
-
List of supported NUnit and MSUnit API
Support for NUnit and MSUnit are based on which API is supported, not which version of NUnit and MSUnit is supported. Please see the NUnitTests.pdf and the MSUnitTests.pdf files, located under the help folder of the dotTEST installation directory, to see a list of supported an unsupported API for your version of dotTEST,…
-
Links to test file locations
Following the paragraph "Executing Existing CppUnit Test Cases" from the C++_userguide I added test files into tests subdirectory of my project. The "Test suite file search patterns" is set to "${project_loc}/tests/*". The problem is that files in the tests directory which are linked to somewhere else are not executed.…
-
Running test executable on target device
Hello All, I have created a simple c application and test cases for that. Now i want to build test executable for that and run it on another machine through TCP/IP communication. Can anyone help me out with that as I am not able to generate test executable. Thanks
-
How to get .jtest projects to generate elsewhere?
How to get .jtest projects to generateAfter running JTest for a specific project in Eclipse, the .jtest folder is created within my workspace. Is there anyway that I can direct it to generate the files somewhere else? I know that the results can be generated elsewhere, but how can I specify the path that I want the actual…
-
How is .TEST different than NUnit?
NUnit provides only a framework for execution of tests that the developer prepared manually. .TEST embraces and extends NUnit to provide automated test case generation. .TEST's execution engine also provides many other important features, such as coverage reporting, automatic error assignment and distribution, tracking of…
-
Are private methods tested as part of the unit testing?
By default, tests are not generate for private methods. However, this setting can be changed in the Test Configuration.
-
Runtime exception in the test case generated!
Exceptions in QString in the test cases generated...Consider the following code Snippet!! - Its a Qt based application... In one of the generated test case, we have: CODE ... .... const ::QChar * _arg1_0 = 0 ; /* Initializing constructor argument 2 (unknown) */ int _arg2_0 = cpptestLimitsGetMaxInt(); ::QString _text…