Title: Allow before/after annotations to accept list of [[owner.]package.]procedure · Issue #649 · utPLSQL/utPLSQL · GitHub
Open Graph Title: Allow before/after annotations to accept list of [[owner.]package.]procedure · Issue #649 · utPLSQL/utPLSQL
X Title: Allow before/after annotations to accept list of [[owner.]package.]procedure · Issue #649 · utPLSQL/utPLSQL
Description: I'd like to suggest the following to the before..., after... annotations. add ability to reference procedures from other packages add ability to call multiple procedures Additionally, beforeall, afterall, beforeeach, aftereach, we could ...
Open Graph Description: I'd like to suggest the following to the before..., after... annotations. add ability to reference procedures from other packages add ability to call multiple procedures Additionally, beforeall, af...
X Description: I'd like to suggest the following to the before..., after... annotations. add ability to reference procedures from other packages add ability to call multiple procedures Additionally, beforeall...
Opengraph URL: https://github.com/utPLSQL/utPLSQL/issues/649
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow before/after annotations to accept list of [[owner.]package.]procedure","articleBody":"I'd like to suggest the following to the `before...`, `after...` annotations.\r\n- add ability to reference procedures from other packages\r\n- add ability to call multiple procedures\r\n\r\nAdditionally, `beforeall`, `afterall`, `beforeeach`, `aftereach`, we could be suite level annotations with similar syntax as `beforetest`/`aftertest`.\r\nExample below:\r\n```sql\r\npackage test_departments_api is\r\n\r\n --%suite(Departments API)\r\n --%beforeall(common_data_helper.data_setup, privileges_helper.setup)\r\n --%afterall(privileges_helper.cleanup, common_data_helper.data_cleanup)\r\n\r\n\r\n procedure setup_manager;\r\n\r\n --%test(Adds department)\r\n --%beforetest(some_package.add_employee, some_package.add_location, setup_manager)\r\n procedure successfully_add_department;\r\n\r\n --%test(Fails to add depatrment when no manager found)\r\n --%beforetest(common_employee_helper.setup_employee, common_location_helper.setup_location)\r\n procedure fail_to_add_department;\r\n\r\n --%test(Returns department by name)\r\n --%beforetest(common_department_helper.setup_depatment)\r\n procedure get_department_by_name;\r\n\r\nend;\r\n```\r\n\r\nThis way, we can allow for even better separation of common things.\r\nIt is still possible to achieve the same without `before`/`after` annotations referencing procedures outside of package, but it requires a lot of bolierplate code as below.\r\n\r\n```sql\r\npackage test_departments_api is\r\n\r\n --%suite(Departments API)\r\n\r\n --%beforeall\r\n procedure common_setup;\r\n \r\n --%afterall\r\n procedure common_cleanup;\r\n\r\n procedure setup_manager;\r\n\r\n --%test(Adds department)\r\n --%beforetest(some_package.add_employee, some_package.add_location, setup_manager)\r\n procedure successfully_add_department;\r\n\r\n --%test(Fails to add depatrment when no manager found)\r\n --%beforetest(common_employee_helper.setup_employee, common_location_helper.setup_location)\r\n procedure fail_to_add_department;\r\n\r\n --%test(Returns department by name)\r\n --%beforetest(common_department_helper.setup_depatment)\r\n procedure get_department_by_name;\r\n\r\nend;\r\n/\r\n...\r\npackage body test_departments_api is\r\n\r\n procedure common_setup is\r\n begin\r\n common_data_helper.data_setup;\r\n privileges_helper.setup;\r\n end;\r\n\r\n procedure common_cleanup is\r\n begin\r\n privileges_helper.cleanup;\r\n common_data_helper.data_cleanup;\r\n end;\r\n\r\n...\r\n```\r\nWould it make sence and add value to have this kind of flexibility in annotations?\r\n\r\nThe down side I see is that we would only know at **runtime** if the dependencies to other packages defined by before/after are valid.","author":{"url":"https://github.com/jgebal","@type":"Person","name":"jgebal"},"datePublished":"2018-04-23T00:02:11Z","url":"https://github.com/utPLSQL/utPLSQL/issues/649"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:07b35985-45d9-0aba-ff11-6bb50bc2f98b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA9E:16ED35:7A647D:A18C77:6B04CA2F |
| html-safe-nonce | bebe209a7ccd5e8542b90b482827f965213e47908f965e860fe11b66d6562954 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTlFOjE2RUQzNTo3QTY0N0Q6QTE4Qzc3OjZCMDRDQTJGIiwidmlzaXRvcl9pZCI6IjQyMzc0ODM5OTY2NzE2OTEzMTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8f1c2967a5d311940977af86e73d0f0254269446191f3032f90b6f03a5cfc838 |
| hovercard-subject-tag | issue:316625158 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/utPLSQL/utPLSQL/649/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d7f01bcb1511a2fb57d8287cb10af60f13aaf741bbb960f19044fcfad10532a9/utPLSQL/utPLSQL/issues/649 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d7f01bcb1511a2fb57d8287cb10af60f13aaf741bbb960f19044fcfad10532a9/utPLSQL/utPLSQL/issues/649 |
| og:image:alt | I'd like to suggest the following to the before..., after... annotations. add ability to reference procedures from other packages add ability to call multiple procedures Additionally, beforeall, af... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jgebal |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/utPLSQL/utPLSQL git https://github.com/utPLSQL/utPLSQL.git |
| octolytics-dimension-user_id | 15661281 |
| octolytics-dimension-user_login | utPLSQL |
| octolytics-dimension-repository_id | 50728220 |
| octolytics-dimension-repository_nwo | utPLSQL/utPLSQL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 50728220 |
| octolytics-dimension-repository_network_root_nwo | utPLSQL/utPLSQL |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width