Submit and vote on feature ideas.

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.

Logging Console to file

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
Is there a way to write to a file the output of a testcase that normally goes to the console? This way I can view this information (e.g. print statements) for debugging purposes without getting my output truncated by eclipse.
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Kevin,

    This can be done when running in CLI mode. You can append the following to existing CLI arguments: -appconsole stdout > C:\mylog.txt

    It will dump everything in the console to C:\mylog.txt. This means there'll be other "noise". In other words other things will be outputted to the console which is then redirected to the mylog.txt file. However, we do have an existing enhancement request to improve this.

    Alternatively, you can try and increase the buffer size for the console in case you notice some of it gets truncated after a number of test runs (Windows > Preferences > Run/Debug > Console). But this component belongs to Eclipse so I can't guarantee what the expected behavior will result in.

    Is there a way to write to a file the output of a testcase that normally goes to the console? This way I can view this information (e.g. print statements) for debugging purposes without getting my output truncated by eclipse.

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Both of your suggestions will address what I need. Thanks.
  • hpatel
    hpatel Posts: 16

    I know this posting is old but i would like to know is there new features to write the console output using SOATest rather CLI?

  • jakubiak
    jakubiak Posts: 798 admin

    There are no new features for this - from a CLI run you still need to capture the CLI output to get the information. Or if you are running in UI mode you can manually capture the output from the console. If you are using something like Jenkins then the console output will get captured automatically for you in the Jenkins job console.