← 输入框|github.com|刷新
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: utPLSQL/utPLSQL
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: develop
Choose a base ref
...
head repository: utPLSQL/utPLSQL
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feature/json_test_cases
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 35 files changed
  • 2 contributors

Commits on Nov 26, 2026

  1. Add parameterized tests: --%testcase and --%testcasesource

    Implements the design discussed in #1326: a --%test procedure with
    parameters runs once per test case.
    
    - --%testcase(<JSON>) runs a test once per annotation. A JSON array
      passes its values by position, a JSON object by parameter name (keys
      aren't case-sensitive). Values are literals; sysdate, constants etc.
      are provided by a --%testcasesource function.
    - --%testcasesource(<function>) runs a test once per test case returned
      by a function without required arguments: a json_array_t of JSON
      arrays and objects, or a sys_refcursor whose columns are matched to
      parameters by name. The function is called once, after beforeall; its
      test cases are kept until they have run.
    - Each test case is a separate test named <procedure>[n]; a --%testcase
      case can be run alone by path. The description can refer to values
      with {1} or {<name>}; without placeholders the values are appended.
    - JSON values are converted to the parameter types with json_value;
      date and time strings are ISO 8601, independent of NLS settings.
    
    Corner cases are reported with ORA-20220 and a message naming the value,
    column or parameter:
    - --%testcase arguments are checked when the suite is built (JSON array
      or object, number of values, keys, parameters without default); an
      invalid case gives a warning and is skipped.
    - JSON: unknown or duplicate keys, too many values, no value for a
      parameter without default, a value that isn't a JSON object or array
      for an object type or collection, unsupported parameter types and
      overloaded procedures.
    - Cursor: columns that are no parameter and aren't used in the
      description, parameters without default and without column, two
      columns for one parameter, object/collection/BOOLEAN columns that
      don't fit the parameter, overloaded procedures. Columns are passed by
      position only when no column is named like a parameter and their
      number equals the number of parameters.
    - A failing, missing or wrongly typed source function makes the test
      error; no test cases give a warning.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    WayneNani and claude committed Nov 26, 2026
    Configuration menu
    Copy the full SHA
    a3a9945 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2026

  1. Apply the review of #1326 to parameterized tests

    - A --%testcasesource function returns json_array_t only; the cursor
      path, the type ut_anydata_list and the ANYDATA call are removed.
    - Values and keys beyond the parameters are ignored, so one source can
      serve several tests and values can be shown in the description only.
      The generated call reads object values by the position of their key
      and never contains a key. Keys match parameter names not
      case-sensitive, also quoted ones.
    - Every --%testcase annotation and every element of a source is a test:
      an invalid one errors when it runs instead of being skipped with a
      warning, and never stops the run. Only an empty --%testcase gives a
      warning. Identical test cases each run.
    - Test cases of a procedure without parameters error.
    - A placeholder that refers to no value appends the values to the
      description, e.g. "Not existing {reference} (4, 2)"; placeholders are
      replaced in a single pass and by name not case-sensitive.
    - pkg.test[n] runs test case n of a --%testcasesource test: the path
      selects the test, the function is called and only case n runs. A
      number beyond the test cases gives a warning; a test that is also
      selected as a whole runs all its test cases.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    WayneNani and claude committed Nov 28, 2026
    Configuration menu
    Copy the full SHA
    103d006 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2026

  1. Test get_suites_info and is_test with test cases, document determinis…

    …tic sources
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    WayneNani and claude committed Nov 30, 2026
    Configuration menu
    Copy the full SHA
    aa2fd01 View commit details
    Browse the repository at this point in the history
Loading