1

I am developing an application for automating the BVT process of our product. This product runs on a multitude of platforms and has sorta "submodules" which are installed separately; So it made a sense to automate the installation part of BVT (plus automating the actually Build verification tests)

Now, I have written java code to do the installations (basically fire a set of commands thru java runtime class).

Now I am working on the actual tests. Here, I have come across the following problem:

Once my installation program finishes its role, there is a time gap (typically 15-20 mins) in which the installation actually happens. Now, since my boss wishes for end to end automation, I cannot break up the process of installation and testing. So my question is:

How do I make the second part of the program (testing part) wait till the installation part has finished. I mean is there any way I could poll and make the second part active as soon as I find (say) the process responsible for installation has exited.

What do you guys suggest ? (That polling is probably a stupid idea .. and I am a noob .. so dont take it too seriously). I am just looking for a solution to this problem in any way possible. Yes, the problem has to be solved thru java and must be available on win + linux platforms.

EDIT

I think if you can help me with non java paradigms to solve the problem that will be fine as well, because once i understand what kind of construct can be used here, I can find try to find something similar in java.

2
  • Then do not "fire" installation. Multi-thread it and wait until the installers return. For example, in Ant, you can do this using <parallel> task with several nested <exec> or <sshexec> tasks, which will wait until the commands executed return.
    – Dante WWWW
    Feb 15, 2012 at 9:42
  • @coolcfan I understand. Thanks, But can you please you please suggest an alternative to using the Ant <parallel> ?
    – Chani
    Feb 15, 2012 at 9:47

1 Answer 1

1

return 0, I cant understand how you would apply polling .. but ,according to what i have understood ,i think ,you can do it using threads.. I mean,if you use threading, you can add wait() calls before the Test part starts executing..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.