Up to this point there has been no compelling need to deal with Enterprise Library Unit Test Setup. Recently fate has shifted my view point, enlightening me to the pleasure of working with Enterprise Library 5.0. Sifting through the mud to get the unit tests setup and passing has been interesting and too much needless effort. In all the documentation for Enterprise Library why has setting up proper test environment gone neglected. At one point document EntLib Test Guide 2005 and EntLib Test Guide Download 2007 provide details and a few blog posts, Enterprise Library Unit Tests in 2005, Don’t Forget to run the Install Services script after installing the Enterprise Library back in 2005 spoke to a few gotchas.
- Oracle Client ( version )
- Oracle ODP.NET ( version )
- Install Oracle 11g XE or Oracle 11g Database ( version )
- SQL Developer or TOAD, etc.
- SQL Server 2008 Express or Server
- SQL Server Management Studio
Enterprise Library Test Solution Configuration:
Run Setup Oracle
Eanble SQL Autentication ( Mixed Mode )
- Use SQL Server Management Studio OR Run EnableSQLAuth.reg
Run SQL Server Setup ( Setups Northwind, Logging and Caching dbs )
Build Solution withiin IDE
Register the latest version for EL services The Steps below outline how to run \Scripts\InstallServices4.bat
- Open a cmd prompt as Admin
- Change directory to Scripts dir
- cd \EL5.0\Source\Mainline\Scripts
- Register services for new version targeting 4.0 runtime
- Run InstallServices4.bat ..\bin\Debug\ OR Run InstallServices4.bat ..\bin\Release\
- verify output for errors
Oracle Database Setup
Enterprise Library 5.0 leverages the northwind database for Oracle to run unit tests. To support the tests please run the outlined setup below.
Please make updates to gist version for others to benefit. https://gist.github.com/segilbert/5095533
Oracle Setup Northwind:
At this point the creation is not automated, instead for now, please follow the manually steps outlined below. Connect to SQLPLUS, SQL Developer or other tool of choice as SYSTEM.
Run the scripts in order. If the TESTUSER northwind oracle database exist run the 1st line in 1.northwind.oracle.schema.sql file.
1. Connect as SYSTEM then run scripts below 2. 1.northwind.oracle.schema.sql 3. Create a connection to the new Oracle Northwind database. USERANME - TESTUSER PWD - testuser 4. Connect as TESTUSER to Norhtwind and run scripts below 5. 2.northwind.oracle.tables.views.sql 6. 3.northwind.oracle.packages.sql 7. 4.northwind.oracle.sps.sql 8. 5.northwind.oracle.seed.sql 9. 6.northwind.oracle.constraints.sql
Importing Oracle Northwind Dump file.
- Run import.oracle.northwind.cmd file
Exporting Oracle Northwind Dump file.
- Run export.oracle.northwind.cmd file
Add the TNS Oracle connection entries outlined below to local tnsnames.ora file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- Enterprise Library 5.0
- Enterprise Library Nuget Packages
- Running the Enterprise Library Unit Tests
- EntLib Test Guide 2005
- EntLib Test Guide Download 2007
- Enterprise Library Unit Tests in 2005
- Don’t Forget to run the Install Services script after installing the Enterprise Library
- Pluralsight Enterprise Library Training