Logging Console to file

LegacyForumLegacyForum Posts: 1,669 ✭✭
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

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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.

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Both of your suggestions will address what I need. Thanks.
  • hpatelhpatel 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?

  • jakubiakjakubiak Posts: 218 ✭✭✭

    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.

Sign In or Register to comment.