• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Automating Command Line installation

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
Satish Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
reply
    Bookmark Topic Watch Topic
  • New Topic