SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Oct 2001
    Posts
    49
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Command line - using stdout/stderr

    I am prepping my test scripts to be called by an outside process (FitNesse automated test framework). The best option for letting the outside process consume the results is using stdout. I couldn't figure out a way to get those results to feed to stdout. I did find that err.raise would send the message back to the command window - works, but there are some side effects (like that shuts down a script).

    Has anyone else tried tackling an issue like this?
    Dave McNulla

  2. #2
    Member
    Join Date
    Oct 2001
    Posts
    49
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Command line - using stdout/stderr

    I am using a workaround to solve this. The scripts output to a file such as "c:\Temp\tp.out". I create a batch file that first runs the script then types the tp.out file to stdout.

    e.g.
    Logging code
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">public sub logit(strMessage as string)
    dim hFile as long
    const myLogFile = &quot;C:\Temp\stdout.log&quot;
    hFile = FreeFile
    open myLogFile for output as #hFile
    debug.print strMessage
    print #hFile, strMessage
    close #hFile
    end sub</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Batch File
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">tp -u tpuser -p tppassword -d tpdatabase -r tpproject -s %1
    type C:\Temp\stdout.log</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
    Dave McNulla

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:59 AM.

Copyright BetaSoft Inc.