测试脚本以测试包中的功能 [英] Test script to test functions in a package

查看:76
本文介绍了测试脚本以测试包中的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关如何编写测试脚本以测试程序包的任何建议。包中的一些函数是to_number_zero,CheckIfNumeric(STRING_IN IN VARCHAR2)。我需要为这些函数编写一些测试脚本。例如,to_number_zero测试应该传入一个字母字符串并检查结果,然后传入一个数字字符串并检查结果。

Any suggestions on how to write a test script to test a package. Some of the functions in the package are to_number_zero, CheckIfNumeric(STRING_IN IN VARCHAR2). I need to write some sort of test script for these functions. For example, the to_number_zero test should pass in an alphabetic string and check the result, then pass in a numeric string and check the result.

推荐答案

不完全确定是什么功能确实如此,但听起来很直接。写一个脚本,它将假脱机到一个文件(用于记录结果),设置echo和timing on以查看所有运行的内容,dbms_output将所有内容发送到假脱机文件以及所有答案。

使用异常处理程序在主块中创建块,以便您可以看到发生的所有错误。
not completely sure what all the functions do but it sounds straight forward enough. write a script that will spool to a file (for a record of the results), set echo and timing on to see all that is run and dbms_output everything to the spool file as well for all the answers.

make blocks within the main block with exception handlers so you can see all errors that occur.


从您的帖子中不清楚您的要求究竟是什么。请您更清楚地发帖。
From your post it is not clear what exactly is your requirment. Can you kindly post more clearly please.



有关如何编写测试脚本以测试包的任何建议。包中的一些函数是to_number_zero,CheckIfNumeric(STRING_IN IN VARCHAR2)。我需要为这些函数编写一些测试脚本。例如,to_number_zero测试应传入一个字母字符串并检查结果,然后传入一个数字字符串并检查结果。
Any suggestions on how to write a test script to test a package. Some of the functions in the package are to_number_zero, CheckIfNumeric(STRING_IN IN VARCHAR2). I need to write some sort of test script for these functions. For example, the to_number_zero test should pass in an alphabetic string and check the result, then pass in a numeric string and check the result.



您能在这里发布您的功能源代码以供参考吗?


Could you please post your functions soure code here for reference?


这篇关于测试脚本以测试包中的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆