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 — Consistent syntax for suite/test/context annotations · Issue #1016 · utPLSQL/utPLSQL Closed DescriptionCurrent state Currently This is inconsistent and leads to confusion when using the framework. Engineers expect simplicity and ease of use from the framework which isn't the case with Consider the below example: create or replace package queue_spec as --%suite(Queue specification) --%context(A new queue) --%test(Cannot be created with non positive bounding capacity) procedure non_positive_bounding_cap; --%endcontext end; With this package, current implementation of utPLSQL gives the following:
The above package spec is not really valid, as context name should not contain any whitespace or full stop characters. Context name rules should conform to naming rules for Oracle objects. utPLSQL does not give any warning on invalid context names too. The proper implementation of the above package following current framework behavior should be more like below. create or replace package queue_spec as --%suite(Queue specification) --%context(a_new_queue) --%displayname(A new queue) --%test(Cannot be created with non positive bounding capacity) procedure non_positive_bounding_cap; --%endcontext end; The above is confusing, hard to remember and easy to confuse engineers.
Describe the solution you'd like I suggest to change the current behavior so that the Framework would need to provide a way for giving an explicit name to a context as well as allow for implicit naming, if users don't care about context names. Rules:
Given the original example. create or replace package queue_spec as --%suite(Queue specification) --%context(A new queue) --%test(Cannot be created with non positive bounding capacity) procedure non_positive_bounding_cap; --%endcontext end; The new implementation would give the following results:
To give an explicit name to the context, users would use syntax: create or replace package queue_spec as --%suite(Queue specification) --%context(A new queue) --%name(a_new_queue) --%test(Cannot be created with non positive bounding capacity) procedure non_positive_bounding_cap; --%endcontext end; Describe alternatives you've considered An alternative would be to convert the description into context name by:
This could work pretty well for some many use-cases. create or replace package queue_spec as --%suite(Queue specification) --%context(A new queue) --%test(Cannot be created with non positive bounding capacity) procedure non_positive_bounding_cap; --%endcontext end; The alternative implementation would give the following results:
We would still need to use default context names if no description is provided. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue 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. |