🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3820

Re: Writing a script

#3820
From: Jody Zung
Date: Thu, 07 Dec 2000 00:00
48 lines
3034 bytes
Ok right, I do have this basic concept and understanding that you described
of how to do this but I suppose I need the specifics on doing it. Such as
what command outputs to a file.  I know i need to do some more homework and
read up on this but was hoping to find some quick easy answers.  Also if you
have experience using DejaGnu or Expect that would be great, its a test
automation tool but I don't understand how to use it and havn't found much
info on it.


Peter Roozemaal wrote:

> Jody Zung wrote:
> >
> > So basically it'll look like this.
> >
> > I have a process called OMC that I run on a file. There are options as
> > well, so a command from the unix prompt would look like this:
> >
> > omc  -dtmlckf -o <output dir> <filename.lib>
> >
> > Then the thing runs for a while and ouputs a huge amount of stuff.
> > After this I want to check the output directory for the correct files.
> >
> > So i'll cd to the output directory, do an ls, or ll and visually check
> > for the needed files.
> >
> > Is there a way i can do all of this in a script and output to a results
> > file??
> >
> Yes, it's easy, but details depend on details of the application. It
> looks like you're testing some batch application.
>
> First: define testcases. (A testcase consists of an initialisation step,
> followed by a sequence of program runs and validation of program
> behavior: init, run, test, run, test,...)
>
> Write a generic testcase driver that will perform
>  1. the initialisation of the environment (depending on the testcase)
>  in a loop
>    2. run the application with the test inputfile
>    3. check the correctness of the test output
>
> You can use "i/o redirection" to collect output from your programs and
> script in a file. For regressiontests it is convenient to have a set of
> files with correct output so you can just run cmp or diff to check
> whether anything has changed.
>
> Peter.
Technical Details
Message-ID: <3A3012FC.2C4A9B71@siliconmetrics.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3A2E6922.61778861@siliconmetrics.com> <3A2E790B.2E7997E0@xs4all.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc89c,447395ef176ca092
X-Google-Attributes: gidfc89c,public
X-Google-Thread: 1025b4,447395ef176ca092
X-Google-Attributes: gid1025b4,public
X-Google-Thread: 11035d,447395ef176ca092
X-Google-Attributes: gid11035d,public
From: Jody Zung <jzung.zung@siliconmetrics.com>
Subject: Re: Writing a script
Date: 2000/12/07
Message-ID: <3A3012FC.2C4A9B71@siliconmetrics.com>
X-Deja-AN: 702342613
Content-Transfer-Encoding: 7bit
References: <3A2E6922.61778861@siliconmetrics.com> <3A2E790B.2E7997E0@xs4all.nl>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
X-Complaints-To: abuse@GigaNews.Com
X-Trace: sv2-EB0WElmioZ8T35DQbXwD6WmjcggJs3PMrBmdw5fp3zchQqAmE2IiEaqqn1V5VjpuT/PIhXNvsj0AoTY!JOwzSRnnEtHWy1Ke+o/HThAQWkpq5RTym3z1
Organization: Giganews.Com - Premium News Outsourcing
MIME-Version: 1.0
NNTP-Posting-Date: Thu, 07 Dec 2000 16:45:26 CST
Newsgroups: comp.unix.programmer,comp.unix.solaris,gnu.misc.discuss