Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6774337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:46:29+00:00 2026-05-26T15:46:29+00:00

Background – I have a client that has an Oracle database with many procedures

  • 0

Background –

I have a client that has an Oracle database with many procedures and functions that contain business logic. As a “good” developer, I like to have all my business logic have automated tests wrapped around it.

The procedure in question is very long with nested ifs. It hits many tables and views based on data passed in and data retrieved from the database.

My initial thought is to create a c# application containing only NUnit tests that will use data already in the database to test the procedure. Once I have 100% code coverage, I will modify those tests to insert/cleanup the test data. Once that is done, I can then refactor and modify the procedure as needed without worry of breaking something.

Is there a better/easier way to do automated testing for Oracle procedures/packages/functions?

EDIT: I cannot use something that needs to be installed on the server at this point.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:46:30+00:00Added an answer on May 26, 2026 at 3:46 pm

    You could use one of the already mentioned PL/SQL targeted testing frameworks – which is probably the easiest solution to your problem.

    If you really want to roll your own solution, PL/SQL procs/functions are easily callable from .NET, so you could just use xUnit as a runner:

    • The key really is to make sure you are able to setup a specific known input scenario for each test. You can roll your own approach to this solution (sql scripts, custom configuration files, create the data in code), or use an existing framework targeted at resetting your database to an initial known state specific for each test (something like NDbUnit).

    • Write a small wrapper library that allows you to call your procedures easily to make tests more readable and concise.

    • To make sure your tests do not leave traces behind and you get caught up in test dependencies and ordering problems, you can use transactions as part of your tests – start a transaction in the [SetUp] method, rollback on [TearDown].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I have a website that has been built with ASP.NET 2.0 and is
Background I am trying to create a copy of a business object I have
Background I have been asked by a client to create a picture of the
Background Given that 'most' developers are Business application developers, the features of our favorite
BACKGROUND: Co-worker Adam has been using Google refine to process database downloads with much
Background I have a pair of functions I want to use to animate some
Background This is only my second PyQt4 project. Developing a Windows app that has
Background I have a basic HTML page with an iframe that points to a
Background: I have a little video playing app with a UI inspired by the
Background: At my company we are developing a bunch applications that are using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.