Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working in a test environment where we need more than 10 machines, including VMs. The AUT is a Distributed Network type and uses Cassandra nosql DB. We are required to restart each of the Cassandra DBs running on each machine multiple times everyday. We are using Hudson for our build processing.

How would I create a python or batch script that can be used within Hudson to automatically perform these tasks?

Note: we have both Windows and Debian machines in network, so have to do both ssh and rdesktop.

share|improve this question
Do you use Hudson/Jenkins? Surely it has a way to do this. – user246 May 20 '11 at 2:05
Btwn does anyone use any python or batch script to do this. – Rakesh Prabhakaran May 20 '11 at 2:50
I wonder if this question should be reworded. First of all, the very question in the body asks for the opinion and best method to access the machines. That's subjective content. Secondly, it seems that Rakesh is not looking for "best" but for a specific python or batch script. The question might do best reworded as "How can I write a python or batch script to automatically reboot testing machines through Hudson"? – TristaanOgre May 20 '11 at 17:16
Tristaan I am interested in the best practice to do this, I would like to know all possibilities so that I can go forward with what is apt for my environment. – Rakesh Prabhakaran May 22 '11 at 3:11
user246 can u please explain me how you do with Hudson – Rakesh Prabhakaran May 22 '11 at 3:12
up vote 3 down vote accepted

I think what you are looking for is the SSH plugin for Hudson:

It let you run a shellscript before and/or after your build.

That's the best fit, in my opinion. But you can execute a shellscript on the Hudson server using the Post Build task plugin:

which could do the job if you need more conditions, but will probably be more complicated to get up and running: you will have to write a script able to restart another server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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