Previous | Next
Topic: Setup and Teardown procedures
Conf: 538, Msg: 39082
From: Steven Feuerstein (steven@stevenfeuerstein.com)
Date: 10/30/00 06:30 AM

Setup and Teardown procedures Steven Feuerstein sfeuerstein steven@stevenfeuerstein.com On 10/30/00 1:47:00 AM, Steven Deneir wrote:
>utPLSQL is a great initiative
>!
>Still some questions / remarks
>
>
>Apparently the setup and
>teardown procedures are
>launched only at the beginning
>and at the end of the
>unit-test.
>This involves some problems :
>if the unit to test reads and
>manipulates data, the tester
>must take these changes into
>consideration for the
>following test, which isn't
>that easy.
>Some people will argue to use
>the Rollback statement. But
>what with functions that issue
>a commit statement and that
>are used in the unit that must
>be tested ?
>It would be nice to have the
>possibility to specify for
>each test whether or not the
>setup/teardown should be
>re-executed. In that way there
>is no performance loss when no
>data-manipulation takes place.

Added to enhancement list.

>
>Most of the time there are
>more procedures/functions to
>test within a package. But I
>only see 1 setup/teardown
>procedure. Does that mean that
>for all the routines to test
>in the package there is only 1
>setup/teardown procedure ?
>If this is the case, the
>tester must make sure that all
>necessary data is available
>for all procedures that will
>be tested...
>Maybe there should be a
>setup/teardown for each
>procedure/function within a
>package.

Added to enhancement list.

>
>In the doc 'Build Test
>Packages.htm' there is a line
>indicating :
>exec utgen.testpkg ('str',
>output_type_in =>
>utplsql.c_file)
>But utplsql.c_file does not
>exists, I think this should be
>:
>exec utgen.testpkg ('str',
>output_type_in =>
>utgen.c_file);

Whoops! Fixed...

>
>Is it possible not to use
>scripts (OS-files) where the
>source is stored ? I am always
>working with one or another
>tool, so I rarely use scripts.
>This goes for the
>recompilation of the packages
>and for the generation of the
>framework.

If the code is stored in the database (I assume this is what you mean by working with "a tool"), then it has already been recompiled. You can simply turn off autocompilation:

exec utplSQL.autocompile (FALSE)

or

exec utplSQL.autocompile (FALSE, 'SCHEMA')

and then it will not try to compile OS scripts.

Thanks! SF