GeezerVison is showing github.com — Feature/nested context by jgebal · Pull Request #1013 · utPLSQL/utPLSQL
Conversation
jgebal
commented
Oct 23, 2019
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Added ability to nest contexts in suites - Resolves #938
Added fix for invalid context name - Resolves #966
Changed approach for context naming - Resolves #1016
So now you can write tests like a Pro (see talk by Kevlin Henney)
create or replace package queue_spec as
-- %suite(Queue Spec)
-- %context(a_not_empty_queue)
-- %context(that_is_not_full)
-- %test
procedure becomes_longer_when_non_null_value_enqueued;
-- %test
procedure becomes_full_when_enqueued_up_to_capacity;
-- %endcontext
-- %context(that_is_full)
-- %test
procedure ignores_further_enqueued_values;
-- %test
procedure becomes_non_full_when_dequeued;
-- %endcontext
-- %test
procedure dequeues_values_in_order_enqueued;
-- %endcontext
end;
Leading to
Queue Spec
a_not_empty_queue
that_is_not_full
becomes_longer_when_non_null_value_enqueued [SUCCESS]
becomes_full_when_enqueued_up_to_capacity [SUCCESS]
that_is_full
ignores_further_enqueued_values [SUCCESS]
becomes_non_full_when_dequeued [SUCCESS]
dequeues_values_in_order_enqueued [SUCCESS]
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
TODO - review & update documentation & examples.
Uh oh!
There was an error while loading. Please reload this page.
…text
# Conflicts:
# test/ut3_tester/core/test_suite_builder.pkb
# test/ut3_tester/core/test_suite_builder.pks
Added validation of context name.
|
@pesse, @lwasylow, @Pazus - I'd like to get your feedback on my doubts around:
--%context(name) vs --%context(description) on SLACK before merging/altering this PR.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Changed behavior of ``--%context` annotation. The value f annotation now only indicates the context description.
Resolves #1016
|
@pesse, @lwasylow - the PR is ready for review.
I would definitely appreciate review of documentation changes.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I see that it's implemented but I think that nested context is misuse. I think it should be replaced by nested suites and context should be not nested and exists within a suite. I will look into code 👍
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I was of the same opinion from the moment we originally discussed contexts.
But users want it and there are situations where it is actually useful.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
lwasylow
lwasylow approved these changes
pesse
Awaiting requested review from pesse
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.