GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Feature/nested context by jgebal · Pull Request #1013 · utPLSQL/utPLSQL

Conversation

@jgebal

@jgebal jgebal commented Oct 23, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
jgebal added 2 commits October 23, 2019 01:44
@jgebal
Added support for nested contexts.
eebfba0
TODO - review & update documentation & examples.
@jgebal
Fixing failing tests
c5f81eb
@jgebal jgebal added the enhancement label Oct 23, 2019
@jgebal jgebal added this to the 3.1.9 milestone Oct 23, 2019
jgebal
jgebal commented Oct 23, 2019
View reviewed changes
Comment thread source/core/ut_suite_builder.pkb Resolved

Uh oh!

There was an error while loading. Please reload this page.

jgebal added 3 commits October 23, 2019 22:13
@jgebal
Merge remote-tracking branch 'origin/develop' into feature/nested_con…
837bd47
…text

# Conflicts:
#	test/ut3_tester/core/test_suite_builder.pkb
#	test/ut3_tester/core/test_suite_builder.pks
@jgebal
Updated documentation.
e1dfd05
Added validation of context name.
@jgebal
changed hard stop to "full stop/period"
0070cf8
@jgebal
jgebal requested review from lwasylow and pesse October 23, 2019 23:10
@jgebal
Cleanup
8f0b267
@jgebal

jgebal commented Oct 23, 2019

Copy link
Copy Markdown
Member Author

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jgebal added 2 commits October 25, 2019 02:11
@jgebal
Merge remote-tracking branch 'origin/develop' into feature/nested_con…
2abd27e
…text
@jgebal
Added support for --%name annotation, to name the contexts.
be39586
Changed behavior of ``--%context` annotation. The value f annotation now only indicates the context description.
Resolves #1016
@jgebal

jgebal commented Oct 28, 2019

Copy link
Copy Markdown
Member Author

@pesse, @lwasylow - the PR is ready for review.
I would definitely appreciate review of documentation changes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lwasylow

lwasylow commented Oct 31, 2019

Copy link
Copy Markdown
Member

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 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jgebal

jgebal commented Oct 31, 2019

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lwasylow
lwasylow approved these changes Nov 1, 2019
View reviewed changes
@jgebal
jgebal merged commit 7740ec2 into develop Nov 1, 2019
@jgebal
jgebal deleted the feature/nested_context branch November 5, 2019 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lwasylow lwasylow lwasylow approved these changes
@pesse pesse Awaiting requested review from pesse

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement

Projects

None yet

Milestone

v3.1.9

Development

Successfully merging this pull request may close these issues.

Consistent syntax for suite/test/context annotations Use of fullstop character in --%context(<name>) Nested Contexts to allow easier hierarchical tests

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jgebal @lwasylow
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.
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.