Description
I would like to if there is a common way of setting up the input data required the test case to test the package/procedure I have written.
For example:
- If my procedure functionality is to check the balance of a bank account.
- Bank account number is input to the procedure.
For this functionality to work :
I need to have this bank account number already present in the database.
So ,prior to calling my procedure I need to call few other APIs/packages/procedures to create the account and corresponding data etc.
But this is not quite simple as it involves multiple functionalities to be called to setup the account.
And also it is time consuming process which impacts the test suit execution times.
So I have come up with an idea :
1.Create the account setup manually for the first time when I develop my test case. Probably reuse the existing data.
2.I know all the tables in which this data would go and I have a list of tables.
3.So ,I have created an xml for each table as <table_name>.xml file in an unix directory.
This directory is the directory_path for the oracle directory which be created automatially by a script when the first time test case developed.
4. Then from now onwards whenever I run my test case , in --%beforeeach annotation I would call a procedure which dumps(using DBMS_XMLSTORE.insertxml) the data into table.
This was working fine until we upgrade to 12c .
In 12c as a security compliance the oracle directory creation (create directory) facility was removed for individual schema/users.
My DBA is strict on this as it is security compliance issue.
I do not want to create a one time directory with help of DBA and use for all the test cases as I want to maintain the data in a better way for each test case.
I am maintaining my data in Unix box as /app/utPL/<suit_name>//<test_case>/input_data
So on high level
- I want to avoid calling multiple APIs/processes while setting up the data each time which are complex and time consuming.
- Want to use a pre-stored data ( kind of dump created by expdp or in xmls) which can be inserted into tables before each test case. This data will never be committed so no need of special clean up instructions.
Currently I am using the version V3.1.2
I have searched if same question already raised but only found this
#333
Understood that it is not a generic solution w.r.t framework that you guys could provide.
But what are the common practices, if you are aware ,that are being followed in similar cases as mine?
and also for the grants that are required by the test schema causing a clash between DBA and dev teams. Is there a suggestion on this?
Thanks!!