Writing automation programs

Started by
3 comments, last by tom76 22 years, 1 month ago
Hi How would one even begin to write a program that automates a task? For example if I wanted to install a lot of software on a computer, or wanted to test a lot of software on a computer but didn''t want to actually sit there and input variables. I know in the games industry junior developers write tools and things to automate boring repetitive tasks. How would they even begin? Everyone say wow. www.crisis51.com
if (witisism == !witty) return to_hole
Advertisement
Break task into steps.
Write code to represent each step.

Your question is incredibly generic. In the case of installing software on a bunch of computers, what is often done is to create a complete binary image of a fully confugured machine and copy that image onto all the other machines. It then becomes quite obvious how you might write such a tool, and make it operate over networks, etc. There are several sysadmin tools that do this sort of thing.

In short, the solution depends on the problem and its domain.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
Well ok I''ll pick an example. What if you created a wizard to install some software onto a computer, and wanted to test this wizard on different operating systems or differently configured PCs.

if (witisism == !witty) return to_hole
Find the common level of abstraction. Manipulating files (in a detailed fashion) is very platform-specific, so it''s not easy to write a "multi-OS" wizard. Say you wished to write it for different versions of Windows, the next question is which tool has the lowest cost in terms of time for identical yield. Scratch C and its derivatives; go with VB. On UNIX platforms, use Bourne shell (/bin/sh) scripts, because every UNIX platform is virtually guaranteed to have it installed.

The actual task list then looks like this:
1. Verify system meets minimum requirements.
2. Verify disk space.
3. Copy files.
4. Miscellaneous configuration.

The last step often includes fiddling with the registry on Windows machines, but that''s not a difficult task.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
quote:Original post by tom76
Well ok I''ll pick an example. What if you created a wizard to install some software onto a computer, and wanted to test this wizard on different operating systems or differently configured PCs.




Bigger companies that are doing a lot of testing purchase special products to do things like this. Programs like silktest http://www.segue.com/html/s_solutions/silk/s_family.htm are very useful for doing something like this.

People who have less cash to throw around just add command line interfaces to their installers (If you''re using an install technology like Wise or Installshield this is pretty trivial) Then you can write batch scripts that run the installer and check that all the files are were they should be.

This topic is closed to new replies.

Advertisement