How to check the output of printf()

Modified on Thu, 02 Apr 2020 at 11:53 AM

You can use printf() if you want to check the value in progress in the source coded by the user, such as source code, user code, and stub in Controller Tester.

How to check the output of printf()



#include <stdio.h>


int main(void)


       printf("Hello World\n");


       return 0;



예제 test.c


1. Setting in Controller Tester

1) Right-click on 'Project' in the Test Navigator and selcet 'Properties'. 

2) Click 'Test' - 'Run Test' and check 'Redirect standard output or standard error'

3) Click [Apply and Close] button.



2. Check output in log file


After run the unit test, check the output result in the log file in the path below.


Log file path:


 ※ Note


** The method of checking the printf() output value of the source code and test code is the same.


** If the test is repeated, it is written after the existing log file. The log file is not created or overwritten.

** Each log file is created for each test case. The test case number is displayed after the log file name.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article