Hi, We have a software which can be installed on command line. So when you run the install script, based on the user environment it will ask few questions and then install the software. I am trying to automate the testing of the install script. The software is primariy installed on UNIX platforms. so what is the best way to automate this. Also if you know of any reference url please let me know
Regards, Satish
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Could you tell us what kind of things should the installation script do? If it's ok for the installation script test to actually alter the environment (by installing your software), it should be pretty easy to do assertions against the environment ("does that directory exist with these three files?", etc.)
Could you tell us what kind of things should the installation script do? If it's ok for the installation script test to actually alter the environment (by installing your software), it should be pretty easy to do assertions against the environment ("does that directory exist with these three files?", etc.)
When I run the install on the command line the script generates questions based on the software installed on the user paltform. My automated script should be able to provide answers to those questions and then verify if the installation is successfully. To verify if the installation is successfully I can just check for a process but what I need help is on how to provide the answers to the questions prompted by the install script?
What is the best programming/scripting language. Any reference to a website for more assistance would be good.
Regards, Satish
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
You can write this sort of a test quite well with Java but a shell scripting language such as Bash could be an even better match (unless you want to be able to run those tests within your IDE, for example, in which case a JUnit test would probably be your best option).
The installation script is apparently expecting the user input from stdin a.k.a. System.in, which means that you could do something like this: