Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot execute single test procedure that is inside context. #679

Closed
jgebal opened this issue May 23, 2018 · 1 comment
Closed

Cannot execute single test procedure that is inside context. #679

jgebal opened this issue May 23, 2018 · 1 comment
Labels
Milestone

Comments

@jgebal
Copy link
Member

@jgebal jgebal commented May 23, 2018

The ut.run allows for execution of individual test procedure
With the below example I would expect it to work.

create or replace package test_pckg as
  --%suite

  --%context(My context)
  
  --%test(Expect failure)
  procedure mytest;
  --%endcontext
end;
/

create or replace package body test_pckg as
  procedure mytest as
  begin
    ut.expect(1).to_equal(1);
  end;
end;
/

Running exec ut.run('test_pckg.mytest'); however raises:

ORA-20203: Suite not found
ORA-06512: at "UT3_LATEST_RELEASE.UT_RUNNER", line 133
ORA-06512: at "UT3_LATEST_RELEASE.UT", line 115
ORA-06512: at "UT3_LATEST_RELEASE.UT", line 306
ORA-06512: at "UT3_LATEST_RELEASE.UT", line 364
ORA-06512: at line 1

I would expect to be able to run single procedure from test package by simply passing package.procedure.

Another issue.
Accessing such procedure via suitepath is possible but undocumented, as suitepath is referencing context internal name context_1 rather than context description: My context.
Aith suitepath, accessing by context name would be except that the context name isn't visible to developer neither by looking at package spec nor when looking at test results.

exec ut.run(':test_pckg.context_1.mytest');

test_pckg
  My context
    Expect failure [.005 sec]
 
Finished in .007233 seconds
1 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)
@jgebal jgebal added the bug label May 23, 2018
@jgebal jgebal added this to the 3.1.2 milestone May 23, 2018
@nrogachev
Copy link

@nrogachev nrogachev commented May 24, 2018

Hi Jacek. Jfyi, this looks like the same problem i wrote a comment about in #674.

p.s. and thanks for the amazing framework!

jgebal added a commit that referenced this issue Jun 7, 2018
Changed context naming (context name can be now explicit)
Context description is now only set from `--%displayname` annotation
Resolves #679
Resolves #674

Fixed most of compiler-warnings
@jgebal jgebal closed this in #695 Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants