Waiting for application to finish...

Hi All,

I have an Eggplant Script that kicks off a script written in another
language (a propritary batch scripting language specific to our application)
that opens 1000's of files in a directory, saves them and closes them. Then
I need Eggplant to do some more things. The problem I'm running into is
telling eggplant to wait until our app is done. The external script's
runtime varies greatly and it's difficult to tell via bitmap when the app is
done processing. Is there some function of senseTalk or Eggplant that can
monitor an application's activity and wait until it settles down?

Thanks,

Allen

Comments

  • JonathanOSXJonathanOSX ForumAdmin admin
    I assume you are kicking this other script off with a shell function. It's likely that you can just modify the shell function to block until the script it's invoking is finished.

    If not, we can get the process number of the script and then write a simple routine to block until it's finished.

    If you could post your shell command that should help us come up with a solution.
  • I assume you are kicking this other script off with a shell function. It's likely that you can just modify the shell function to block until the script it's invoking is finished.

    If not, we can get the process number of the script and then write a simple routine to block until it's finished.

    If you could post your shell command that should help us come up with a solution.

    It would be nice if this scripting language had that capability but it doesn't. It all has to be run from within the GUI of our application, hence the problem.
    This is also on a Windows box, I left out that detail.

    I've since had some thoughts (I'll post my solution when I get it working...), and have a follow-up question. Is there a slick way to have Eggplant execute some DOS commands (including passing in a parameter or two), and then recieve the return value from that set of commands and do something with it?

    Same question with terminal on Mac OSX.

    thanks,

    Allen
  • JonathanOSXJonathanOSX ForumAdmin admin
    Ok so that script needs to be run directly on the SUT throught the GUI.
    That can be challenging if you don't get a clear visual indicator, like a 'results-line' in the log or something equivalent. You might consider having the proprietary script explicitly do something with an easy visual impact like create an "IMDONE" file on the desktop.

    For things like the DOS or OS X terminal you have a really two choices, you can of course script opening those applications, calling an existing function or pasting in (through the remote clipboard) a full script to run, and then clipboarding the result. It's doable but sometimes awkward.

    You might also consider trying to get SSH or TELNET access to the SUT and then executing a shell command which will automatically report the results. Here's just a simple example to get a file listing of the desktop of the SUT:
    put shell("ssh sutMachine 'cd Desktop;ls -l'")
    
Sign In or Register to comment.