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 — Tags for tests and suites · Issue #66 · utPLSQL/utPLSQL

Tags for tests and suites #66

New issue
Copy link
New issue
Copy link
Closed
#906
Closed
Tags for tests and suites#66
#906
Copy link
Assignees
lwasylow
Labels
enhancement
Milestone
v3.1.7

Description

@Pazus
Pazus
opened on Oct 2, 2016
Issue body actions

Introduce annotations to tag tests and suites.
Implement filters on execution procedures to include/exclude suites/tests by tags.

We should discuss if "tag" should be assigned to a suite or "suite_type" with predetermined values fits bettet.

Reacted by Jacek Gębal and Philipp Salvisberg

Activity

  1. Pazus
    added
    discussion
    task
    on Oct 2, 2016
  2. Pazus
    added this to the This milestone has been deleted milestone on Oct 2, 2016
  3. Pazus
    modified the milestones: This milestone has been deleted, This milestone has been deleted on Dec 7, 2016
  4. jgebal
    added
    enhancement
    and removed
    discussion
    on May 15, 2017
  5. jgebal
    removed
    task
    on Aug 31, 2017
  6. jgebal
    removed this from the v3.1.0 milestone on Feb 8, 2018
  7. lwasylow
    self-assigned this
    on Mar 21, 2019
  8. pesse commented on Mar 22, 2019

    @pesse
    pesse
    on Mar 22, 2019
    Member
    More actions

    If we introduce tags we should probably also give a way to say "run all tests except tag 'x'".
    Use-case: "run all tests except tag 'very long-running integration test'"

    What do you think?

  9. jgebal commented on Mar 22, 2019

    @jgebal
    jgebal
    on Mar 22, 2019
    Member
    More actions

    Absolutely.
    With current implementation we can do negative for all:
    Run scema except path
    Run path except subpath
    That should be a seperate feature request probably

  10. lwasylow
    added
    in progress
    on Apr 4, 2019
  11. lwasylow commented on Apr 4, 2019

    @lwasylow
    lwasylow
    on Apr 4, 2019
    Member
    More actions

    How we would like to invoke it? New parameter? That's simplest option probably. As a path? But then we would need to include a keyword to differeniate between real database object etc.
    Maybe something like tag:batch

  12. jgebal commented on Apr 4, 2019

    @jgebal
    jgebal
    on Apr 4, 2019
    Member
    More actions

    We currently use:
    :path or name how about *tag or some other start character.
    I wouldn't want to have separate parameter for it.

    Reacted by Lukasz Wasylow
  13. jgebal commented on Apr 4, 2019

    @jgebal
    jgebal
    on Apr 4, 2019
    Member
    More actions

    Tags would be just amotjlher way of expressing suitepaths to include.
    We should have a separate issue for exclusions like:
    -name,-:path,-*tag

  14. Pazus commented on Apr 5, 2019

    @Pazus
    Pazus
    on Apr 5, 2019
    MemberAuthor
    More actions

    I vote for providing tags as a separate parameter. I think it’s ortogonal to the scope of tests to search and execute. With path we set a scope of tests, with tags we filter it further. So I vote for another overload with tags parameter accepting a single/list of values that are applied on provided path.

  15. lwasylow commented on Apr 5, 2019

    @lwasylow
    lwasylow
    on Apr 5, 2019
    Member
    More actions

    It's a valid point that address a name uniqueness domain as well.

  16. jgebal commented on Apr 5, 2019

    @jgebal
    jgebal
    on Apr 5, 2019
    Member
    More actions

    I was thonking a bit differently.
    Tags and suites are both used for inclusion of tests just lile we use paths and package/procedure names interchangeably today.

    Exclusion would come as a separate feature and would be applicable to all three patterns for specifying elements to run.

    Exclusuin could be applied by adding - to element that needs to be excluded.

    Tags could be identified in input list by special leading character % just like suitepaths are today :
    That way I can specify:

    • ut.run('%payment , -%slow');
    • ut.run(':org.utplsql.stuff, -org.utplsql.stuff.not_this, %utils, %clob');

    Maybe we should start by writing potential input param combinations and describe how it should behave before we make final decission on combining it into path parameter or making it separate parameter.

  17. lwasylow commented on Apr 5, 2019

    @lwasylow
    lwasylow
    on Apr 5, 2019
    Member
    More actions

    It's a great idea but I'm worried about complexity of syntax. New parameter is it extra option indeed but is easier to remember than a special keyword.

  18. lwasylow commented on Apr 13, 2019

    @lwasylow
    lwasylow
    on Apr 13, 2019
    Member
    More actions

    Happy with a special character I think the common one is hash so I'm thinking

    ut.run('#nightlybatch,#customer_services') run all tests with tag nighltybatch and customer_services

    ut.run(':core.batch,#nightlybatch') run all tests on suitepath core.batch with tag nightlybatch

    This however can lead to ambiguity when package start with hash.

  19. lwasylow commented on Apr 16, 2019

    @lwasylow
    lwasylow
    on Apr 16, 2019
    Member
    More actions

    Possible options to callout the tags are below.

    1.

    • ut.run('ut3$user#.test_expectations_cursor ,#contain')
    • ut.run('ut3$user#,#cursor')
    • ut.run('ut3$user#:utplsql.test_user.expectations,#cursor')

    2.

    • ut.run(a_path => 'ut3$user#.test_expectations_cursor',a_tags => 'contain')
    • ut.run(a_path =>'ut3$user#',a_tags =>'cursor')
    • ut.run(a_path =>'ut3$user#:utplsql.test_user.expectations',a_tags =>'cursor')

    Option 1

    Pros

    • No new parameter, easier call

    Cons

    • Complicated syntax, user require more education
    • Possible false positive when we using a schema or package that starts with # and interpretation as tag

    Option 2

    Pros

    • Simpler syntax and clear identification of option which means user with minimum knowledge can run it
    • Clear differentiate between tag and other objects

    Cons

    • Extra parameter , makes a call a bit more complex and require call by name

    Given that tags are treated as a way to filter down a execution path to certain area I'm leaning towards the option 2 as better one.

  20. Pazus commented on Apr 16, 2019

    @Pazus
    Pazus
    on Apr 16, 2019
    MemberAuthor
    More actions

    I also prefer the second one. It’s simpler and clearer for reading and we read code much more then we write it.
    Are there any issues with backwards compatibility for existing scripts?

    Just an idea: we have an increasing number of parameter combinations for ut.run procedure. Maybe we can creation ut.run_builder function which returns Object Type implementing a builder pattern with all the defaults set? I wonder how modern IDEs provide code completion for nested object type calls.

  21. jgebal commented on Apr 16, 2019

    @jgebal
    jgebal
    on Apr 16, 2019
    Member
    More actions

    After some thinking...
    Option 2 is best from my perspective too.

    Builder could be an option to go with but I would separate it from this issue.
    Change of invocation pattern will require change in every possible consumer. That is a major breaking change.

    We could embed the builder in ut_run type directly.
    Builder pattern will be however very unnatural to use for most db engineers.

  22. lwasylow
    added this to the v3.1.7 milestone on Apr 27, 2019
  23. jgebal
    closed this as completedin #906on Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lwasylow
    lwasylow

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    • v3.1.7

    Relationships

    None yet

    Development

    No branches or pull requests

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