GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Provide more stack info on failed expectations · Issue #967 · utPLSQL/utPLSQL Closed Labels DescriptionCurrent stateWhen building reusable expectation procedures, the failure message doesn't provide sufficient in formation for identifying the lines where expectations have failures. So if I have few tests using the same procedure and each test has more than one expectation, it's really hard or maybe impossible to track which one has failed. Example: create or replace package check_stack is --%suite --%test procedure test_1; --%test procedure test_2; end; / create or replace package body check_stack is procedure do_check( p_actual varchar2, p_matcher ut_matcher ) is begin ut.expect(p_actual).to_( p_matcher ); end; function get_actual return varchar2 is begin return chr(ascii('a') + trunc(dbms_random.value(0,3))); end; procedure test_1 is begin do_check( get_actual(), equal('b')); do_check( get_actual(), equal('b')); do_check( get_actual(), equal('b')); end; procedure test_2 is begin do_check('ab'||get_actual()||'ef', be_like('%c%')); do_check('ab'||get_actual()||'ef', be_like('%c%')); do_check('ab'||get_actual()||'ef', be_like('%c%')); end; end; / exec ut.run('check_stack'); Can produce outputs as below: Proposed solutionOn failures, show full stack of calls within a test so that the outputs from below failures could look like this: With such addition, it will be much easier to navigate to the rig place in test code and identify the root cause of failure. @PhilippSalvisberg - would that impact SQLDeveloper plugin work you're doing? Would there be any additional rework needed on your end? ActivityMetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |