I have some hardware components I'm looking to test in a semi-automated fashion. This will involve procedural steps similar to:
- Prompt user to connect signal A to connector J1
- After user confirms this is in place, automatically check for successful signal detection
I have experience writing such tests using bash, python, etc. I have also used Jenkins to manage builds and automated tests. What I would like to do (if possible) is combine the two somehow and use Jenkins to manage running of an interactive script on a test computer. This would allow me to leverage Jenkins' ability to consistently spawn scripts on a test computer and archive artifacts and console output history indefinitely. The part I'm not sure about is how to allow a user to interact with a Jenkins job that is in progress. Does anyone have any experience with this or know if it is possible?
This is on a Linux system, so maybe I can run it in a 'screen' session that the user could attach to?
Is there a better tool to use for this that I haven't considered?
Edit 1:
I did hear about the "Remote Terminal Access Plugin", but that doesn't allow direct interaction with the Jenkins build.
The best potential solution I've found so far is to launch a 'screen' session with logging enabled and have the user interact with this session on the slave:
screen -S test -d -m -L ./myscript.sh
PID=`screen -list | grep test | awk '{print $1}' | sed 's/\..*//g'`
#This will show the output of the screen session in the jenkins console:
tail -f screenlog.0 --pid=$PID
Then at the slave, a user can attach to this screen like this:
screen -r test
The downside to this method is that Jenkins doesn't get feedback if something fails.