Loading ...
Sorry, an error occurred while loading the content.

Re: [junit] Running tests in a logical flow..

Expand Messages
  • Andrew McDonagh
    ... With this example though, one thing that strikes me is that Peel, Chop and Eat responsibilities don t naturally belong to the same object. I d expected a
    Message 1 of 10 , Apr 1, 2005
    • 0 Attachment
      Paul King wrote:

      >You might want to consider TestNG. It supports
      >dependent tests as well as isolated ones.
      >For a discussion on why dependent tests are
      >sometimes useful, see here:
      >
      >http://beust.com/weblog/archives/000259.html
      >
      >Summary, it lets you indicate dependencies
      >and create test sequences (quoting the example):
      >
      >"testPeel()
      >testChop()
      >testEat()
      >...
      >I'd like testChop() to run only if testPeel() succeeds, not have two failures."
      >
      >Cheers, Paul.
      >
      >Chris Dollin wrote:
      >
      >
      >>On Wednesday 30 March 2005 06:42, Arun J wrote:
      >>
      >>

      With this example though, one thing that strikes me is that Peel, Chop
      and Eat responsibilities don't naturally belong to the same object.

      I'd expected a Person to Use a Peeler when Peeling a (Fruit, veg, etc).
      I'd expect a Person to Use a Knife to Chop something
      I'd expect a Person to Eat the food.

      By separating out cleanly, we have isolated the behaviors and therefore
      can test each in isolation.

      Sometimes, we need to look at the current design from a different angle
      to see these responsibilities.

      Andrew
    • Arun J
      Lots of ideas..thanks folks.. No design cannot change for testing (can t expect new API for testing). Saying that these dependencies exists. Decision to be
      Message 2 of 10 , Apr 1, 2005
      • 0 Attachment
        Lots of ideas..thanks folks..

        No design cannot change for testing (can't expect new API for
        testing). Saying that these dependencies exists.

        Decision to be made between whether to keep it isolated by doing lots
        of redundant stuffs around each tests or maintain dependencies.

        I see that TestNG serves this purpose to a greater extent. Need to do
        more stuff before bringing them to practise.

        Anyone used this with deep(complex) dependencies..any
        suggestions..comparison with jUnit/Cactus/Coconot (apart from they
        serving specific purposes)

        ~JAK

        On Apr 1, 2005 2:36 PM, Andrew McDonagh <andrew.mcdonagh@...> wrote:
        > Paul King wrote:
        >
        > >You might want to consider TestNG. It supports
        > >dependent tests as well as isolated ones.
        > >For a discussion on why dependent tests are
        > >sometimes useful, see here:
        > >
        > >http://beust.com/weblog/archives/000259.html
        > >
        > >Summary, it lets you indicate dependencies
        > >and create test sequences (quoting the example):
        > >
        > >"testPeel()
        > >testChop()
        > >testEat()
        > >...
        > >I'd like testChop() to run only if testPeel() succeeds, not have two
        > failures."
        > >
        > >Cheers, Paul.
        > >
        > >Chris Dollin wrote:
        > >
        > >
        > >>On Wednesday 30 March 2005 06:42, Arun J wrote:
        > >>
        > >>
        >
        > With this example though, one thing that strikes me is that Peel, Chop
        > and Eat responsibilities don't naturally belong to the same object.
        >
        > I'd expected a Person to Use a Peeler when Peeling a (Fruit, veg, etc).
        > I'd expect a Person to Use a Knife to Chop something
        > I'd expect a Person to Eat the food.
        >
        > By separating out cleanly, we have isolated the behaviors and therefore
        > can test each in isolation.
        >
        > Sometimes, we need to look at the current design from a different angle
        > to see these responsibilities.
        >
        > Andrew
        >
        >
        >
        >
        > ________________________________
        > Yahoo! Groups Links
        >
        >
        > To visit your group on the web, go to:
        > http://groups.yahoo.com/group/junit/
        >
        > To unsubscribe from this group, send an email to:
        > junit-unsubscribe@yahoogroups.com
        >
        > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


        --
        ,,,,, Arunkumar Jayaraman
        ( ',') mail.jak@...
        <|"|> Work: +91-80-51988318
        _/"|_ Mobile: +91-9845283731
      Your message has been successfully submitted and would be delivered to recipients shortly.