Skip to content

TestNG should provide an Api which allow to find all dependent of a specific testΒ #893

Closed

Activity

  1. added this to the 7.6.0 milestone on Jan 7, 2022
  2. modified the milestones: 7.6.0, 7.7.0 on May 18, 2022
  3. krmahadevan commented on Nov 25, 2022

    @krmahadevan
    Member

    @juherr - What is the expectations of this issue. I would specifically like to know the following:

    1. How will the user invoke this? Should this be made available only when someone creates a TestNG instance ?
    2. What would the input for this api look like ?

    It would be good if you could please help add some additional context into this issue.

  4. removed this from the 7.7.0 milestone on Nov 25, 2022
  5. juherr commented on Nov 25, 2022

    @juherr
    MemberAuthor

    It is for the integrations. The need is to add the dependent TestMethods on TestMethod api

  6. krmahadevan commented on Nov 25, 2022

    @krmahadevan
    Member

    You mean something like public List<ITestNGMethod> getDownstreamDependencies() into ITestNGMethod interface right ?

  7. juherr commented on Nov 25, 2022

    @juherr
    MemberAuthor

    Yes, exactly. It exists in the model but not available by the api.

    About the naming, I think something closer the annotation attribute name will be better.

  8. added this to the milestone on Nov 26, 2022
  9. krmahadevan commented on Nov 26, 2022

    @krmahadevan
    Member

    @juherr

    About the naming, I think something closer the annotation attribute name will be better.

    What attribute are you referring to here? In TestNG, we only have a mapping from a child (Dependent method) to a parent (Independent method upon which the dependent method depends on)

    But here we are asking for all children, given a parent.

    public class TestClassSample {
    
      @Test
      public void independent() {}
    
      @Test(dependsOnMethods = "independent")
      public void dependent() {}
    
      @Test(dependsOnMethods = "independent")
      public void anotherDependent() {}
    }

    Here we are asking for an API, wherein if we give input as independent() it should return dependent() and anotherDependent(). Is this the right expectations?

    If yes, then I think the api should be called as getDownstreamDependencies(). WDYT ?

    For upstream dependencies ( which is what dependsOnMethods represents) we have this String[] getMethodsDependedUpon(); in the ITestNGMethod interface.

  10. juherr commented on Nov 26, 2022

    @juherr
    MemberAuthor

    I will check again. I thought the need was to have getMethodsDependedUpon() returning object instead of string

  11. added a commit that references this issue on Nov 28, 2022
    f9a288c
  12. krmahadevan commented on Nov 28, 2022

    @krmahadevan
    Member

    @juherr - I have raised a PR which now provides both upstream and downstream dependencies for a test method. Please check.

  13. added 4 commits that reference this issue on Nov 28, 2022
    88bb42b
    8d9a3e4
    201636d
    fd465c6
  14. added a commit that references this issue on Nov 29, 2022
    563bd6d
  15. modified the milestones: , 7.7.0 on Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependency: updateAutomated pull request updating a dependency

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions