SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Oct 2001
    Location
    Dublin
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calling a python script from SilkTest

    hi
    I need to call a pyhton script from within my SilkTest script, to send back some result information. Does anyone have any idea how to go about this ?

    ------------------

  2. #2
    Senior Member
    Join Date
    Oct 2000
    Location
    Laurel, Maryland, USA
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling a python script from SilkTest


    You should be able to make a SysExecute () call to execute the script. I don't think there is a way to pass information directly back to Silk, but you can have the Python script write it's output to a text file. Silk can then parse the file for whatever output you need.

    I have never tried it, but you may also be able to invoke a command window and run the script on the command line (driven by Silk of course). You should be able to capture the output from the command window once the script has completed. This is probably a bit trickier, but it may work.

    ------------------
    Atlee
    Atlee

  3. #3
    Member
    Join Date
    Jul 2001
    Location
    Mission Viejo, CA, US
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling a python script from SilkTest

    SYS_Execute has an optional parameter lsOutput that will capture any information written to stdout.

    So, if your python script is writing its results to stdout this will be all you need.

    If not, then you could execute this via a command prompt and use >> to put all output to a file. Then you can use the SilkTest file commands to read the file.

    ------------------

  4. #4
    Member
    Join Date
    Oct 2001
    Location
    Dublin
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling a python script from SilkTest

    Hi
    Thanks for all the help.
    I got around this by getting SilkTest to call telnet and get into my Unix machine from there. I can then call the script using the TypeKeys methid. It's not very elegant but it works.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 04:16 PM.

Copyright BetaSoft Inc.