UnitTesting custom scripts and DBcompile

Hi,

Currently we are working on our unit tests for OneIdentity using the OneIdentity DLLs.

What we are trying to accomplish is to run daily UnitTesting on our custom scripts. We can create local objects by using "sessionSource.CreateNew(ADSAccount);" for example and set the attributes by using .PutValue.

But when running scripts the scripts make a connection to the actual database and does not look to the localy created object.

So we commited the objects to the database and remove them again afterwards, which works great.

Except that after we create test objects, run the script to test the functionality, remove the test objects from the database using  "sessionReload.MarkForDeletionWithoutDelay();" and "sessionReload.Save(Session);" the database needs to be compiled again which halts the rest of the processes because it's waiting for compile.

First of al, is this the right way to approach this? Or do we need to change some configuration which results in not even having to commit objects to the database.

Else, how do we make sure the DB is compiled after we run our Unit Tests so no processes are being halted.

If there are any questions feel free to ask.

Parents Reply
  • Hi Markus,

    Thanks for responding. Barry Jackson assisted me on this issue and we found out that another test that is creating objects in the DialogConfigParam table contained some attributes that should not be set by the unittest (.PutValue) and resulted in a compile of the DB.

    After removing these attributes and let let OI determine these itself the problem was solved and we no longer needed to compile the DB after that.

Children
No Data