Rig.TUnit.Databases.Sql.Oracle 0.1.0-beta.2

This is a prerelease version of Rig.TUnit.Databases.Sql.Oracle.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rig.TUnit.Databases.Sql.Oracle" Version="0.1.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rig.TUnit.Databases.Sql.Oracle" Version="0.1.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="Rig.TUnit.Databases.Sql.Oracle" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
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"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rig.TUnit.Databases.Sql.Oracle@0.1.0-beta.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rig.TUnit.Databases.Sql.Oracle&version=0.1.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Rig.TUnit.Databases.Sql.Oracle&version=0.1.0-beta.2&prerelease
                    
Install as a Cake Tool

Rig.TUnit.Databases.Sql.Oracle

Testcontainers-backed Oracle fixture using gvenzl/oracle-free:23.5-slim-faststart and Oracle.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.EntityFrameworkCore transitively 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.OracleFixture
  • Rig.TUnit.Databases.Sql.Oracle.Options.OracleFixtureOptions
  • Rig.TUnit.Databases.Sql.Oracle.Builder.OracleRigBuilder
  • UseOracle(RigBuilder, …) extension
  • UseOracle(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 Iterations at 2–4 — more will exhaust Oracle's default processes limit (150).

Troubleshooting

  • ORA-00020: maximum number of processes exceeded — reduce Iterations in your ParallelIsolationContract subclass, or configure the container with -e ORACLE_PROCESSES=500.
  • Startup timeoutgvenzl/oracle-free:23.5-slim-faststart is the fastest variant; oracle-free:23.5-slim is 2× slower; the full oracle-free:23.5 is 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" vs orders distinctness.
  • Max identifier length 30 chars (23c extends to 128 but only when COMPATIBLE=12.2 is disabled; Free ships with it enabled).
  • NUMBER with no precision maps to decimal(38,0) by default — specify HasPrecision(…) in OnModelCreating to avoid silent truncation.
  • TIMESTAMP WITH LOCAL TIME ZONE behaviour differs from WITH 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.

License

MIT. See LICENSE.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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