Rig.TUnit.Databases.Sql.Oracle
0.1.0-beta.2
dotnet add package Rig.TUnit.Databases.Sql.Oracle --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Databases.Sql.Oracle -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Databases.Sql.Oracle" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Databases.Sql.Oracle" Version="0.1.0-beta.2" />
<PackageReference Include="Rig.TUnit.Databases.Sql.Oracle" />
paket add Rig.TUnit.Databases.Sql.Oracle --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Databases.Sql.Oracle, 0.1.0-beta.2"
#:package Rig.TUnit.Databases.Sql.Oracle@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Databases.Sql.Oracle&version=0.1.0-beta.2&prerelease
#tool nuget:?package=Rig.TUnit.Databases.Sql.Oracle&version=0.1.0-beta.2&prerelease
Rig.TUnit.Databases.Sql.Oracle
Testcontainers-backed Oracle fixture using
gvenzl/oracle-free:23.5-slim-faststartandOracle.EntityFrameworkCore.
What this package is
An Oracle Free integration fixture. OracleFixture spins the
gvenzl/oracle-free:23.5-slim-faststart image — the fastest-to-boot Oracle
container variant (~60–90 s warm, considerably more on first pull) — and
exposes a working connection string plus an EF Core extension
(UseOracle) for the Oracle.EntityFrameworkCore provider.
Integrates with Rig.TUnit.Databases.Sql's family contract so the same
semantic assertions run across MySql / Postgres / Oracle / SqlServer /
Sqlite.
When to use it
- Integration tests targeting Oracle-specific features (sequences, PL/SQL,
MERGE,RETURNING INTO). - Multi-engine parity testing where Oracle is a required cell.
- Verifying behaviour under the OCP licence — Oracle EF Core is free.
- Not for: unit tests. Oracle's session setup is the slowest in the family; prefer SQLite in-memory for fast feedback loops.
Prerequisites
- .NET 10 SDK
- Docker Desktop / Colima (first pull ~2 GB)
Oracle.EntityFrameworkCoretransitively included via this package.
Quick start
using Microsoft.EntityFrameworkCore;
using Rig.TUnit.Databases.Sql.Oracle.Extensions;
using Rig.TUnit.Databases.Sql.Oracle.Fixtures;
await using var fx = new OracleFixture();
await fx.InitializeAsync();
var opts = new DbContextOptionsBuilder<TestDb>()
.UseOracle(fx.ConnectionString)
.Options;
Options
| Property | Type | Default | Description |
|---|---|---|---|
Image |
string |
"gvenzl/oracle-free:23.5-slim-faststart" |
Container image |
StartupTimeoutSeconds |
int |
300 |
First pull can exceed 3 min |
Username |
string |
"rigtunit" |
Test schema user |
Password |
string |
"rigtunit" |
Test schema password |
Fixture + helper APIs
Rig.TUnit.Databases.Sql.Oracle.Fixtures.OracleFixtureRig.TUnit.Databases.Sql.Oracle.Options.OracleFixtureOptionsRig.TUnit.Databases.Sql.Oracle.Builder.OracleRigBuilderUseOracle(RigBuilder, …)extensionUseOracle(DbContextOptionsBuilder, string)— EF wiring
Per-test isolation
Oracle uses schema-per-test via IsolationKey-derived user names. Tests
create CREATE USER {iso} IDENTIFIED BY … in Arrange and DROP USER {iso} CASCADE in teardown. Because CREATE USER requires session privs,
the fixture pre-provisions a test-DBA schema.
Parallelism + performance
- First-run container pull: ~3–5 min (large image).
- Warm startup: ~60–90 s.
- Per-test schema create: ~1–2 s (Oracle's session setup is the slowest in the SQL family).
- Under parallel execution: cap
Iterationsat 2–4 — more will exhaust Oracle's defaultprocesseslimit (150).
Troubleshooting
ORA-00020: maximum number of processes exceeded— reduceIterationsin yourParallelIsolationContractsubclass, or configure the container with-e ORACLE_PROCESSES=500.- Startup timeout —
gvenzl/oracle-free:23.5-slim-faststartis the fastest variant;oracle-free:23.5-slimis 2× slower; the fulloracle-free:23.5is 5× slower.
See docs/troubleshooting.md#oracle.
Provider quirks + edge cases
- Oracle identifiers are case-sensitive ONLY when quoted. EF Core quotes by
default — expect
"Orders"vsordersdistinctness. - Max identifier length 30 chars (23c extends to 128 but only when
COMPATIBLE=12.2is disabled; Free ships with it enabled). NUMBERwith no precision maps todecimal(38,0)by default — specifyHasPrecision(…)inOnModelCreatingto avoid silent truncation.TIMESTAMP WITH LOCAL TIME ZONEbehaviour differs fromWITH TIME ZONE— Oracle stores UTC for the former, offset for the latter.
Benchmarks
See OracleBenchmarks.cs;
baseline in benchmarks/baseline-005.json. Oracle's per-test cost is the
largest in the SQL family — tracked closely.
Related docs
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Bogus (>= 35.6.1)
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- Microsoft.EntityFrameworkCore.InMemory (>= 10.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- Oracle.EntityFrameworkCore (>= 10.23.26200)
- Rig.TUnit.Databases.Sql (>= 0.1.0-beta.2)
- Testcontainers (>= 4.11.0)
- Testcontainers.Oracle (>= 4.11.0)
- TUnit.Core (>= 1.34.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Rig.TUnit.Databases.Sql.Oracle:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 52 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 60 | 4/26/2026 |