Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
Discussion List
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,…
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…
How to programmatically deploy a stub
Hello, I have an SoaTest with a stub simulator that I should deploy on Soa Server each time I want to run the Test. So I want to know, is there any solution to automate the deployment of the stub on the Soa Server with a jython script or java class ? Thanks,
Modify stub call parameters' values
Hello, I have a stub function like this: stub_func(uint8_t * data); (this is an output parameter). I need to modify the parameter in a unit test. I tried to set the value in this way: uint8_t ptrData[] = {0x1, 0x0, 0x1, 0x4}; CPPTEST_ON_CALL("stub_func")->Arg("data")->Assign()->UCharRef(ptrData); but I don't see the…
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…
File scope test with symbols in 2 .cpp files
I have the following: IWidget.h: class IWidget { virtual ~IWidget(); }; IWidget.cpp: #include "IWidget.h" IWidget::~IWidget {} Widget.h: #include "IWidget.h" class Widget : public IWidget { virtual ~Widget(); }; Widget.cpp: #include "Widget.h" Widget::~Widget() {} When I try to write a test for the Widget class, I get…
Can I test database connectivity with .TEST?
.TEST provides a powerful execution engine. You can use .TEST in the presence of code connecting to databases in different ways. If you prefer, you can connect directly to the database. If you do not want to connect to the database, then you can use the user level stubs feature that .TEST provides to run the tests in…