◐ Shell
clean mode source ↗

Ability to run expectations without test by jgebal · Pull Request #963 · utPLSQL/utPLSQL

> TODO - documentation updates

Added ability to run expectations without tests.
Expectation, when executed without test is reporter straight to dbms_output.
So it is now possible to execute:

`exec ut.expect(1).to_equal(0);`

And get result:

```
FAILURE
  Actual: 1 (number) was expected to equal: 0 (number)
```

Resolves #956

Additionally:
- utPLSQL is now cleaning up the application_info after run.
- utPLSQL is setting session context during run, making it possible to access some of utPLSQL info within the test procedures directly.

Resolves #781

The information is provided in sys_context(`UT3_INFO`,...).

Following attributes are getting populated:
- Always:
    - RUN_PATHS
    - SUITE_DESCRIPTION
    - SUITE_PACKAGE
    - SUITE_PATH
    - SUITE_START_TIME
    - CURRENT_EXECUTABLE_NAME
    - CURRENT_EXECUTABLE_TYPE

- When running in suite context
    - CONTEXT_NAME
    - CONTEXT_PATH
    - CONTEXT_START_TIME
- After first executable in suite
    - TIME_IN_SUITE
- After first executable in suite context
    - TIME_IN_CONTEXT
- When running a test or before/after each/test
    - TEST_DESCRIPTION
    - TEST_NAME
    - TEST_START_TIME
- After first executable in test
    - TIME_IN_TEST
…e of low value and could bing confusion.
- Changed how stack trace is reported on expectations to provide more information to the user.
- Fixed expectation messages for successful results
- moved `to_be_empty` / `not_to_be_empty` to base `ut_expectation` type as it's available for `clob`/`blob` types too.
- added-back grant on `ut_matcher` to allow for passing various matchers by users.
- fixed issue with misleading message: `All rows are different as the columns position is not matching` when comparing a null collection/cursor
{WIP] Updates to documentation for expectations.

@jgebal jgebal changed the title [WIP] Ability to run expectations without test Ability to run expectations without test

Jul 13, 2019

@jgebal jgebal deleted the featrure/add_session_context branch

July 14, 2019 23:07