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

Proposed change to Parameterized printing

Expand Messages
  • kentb
    All, Rapha has proposed the following change to the printing of parameterized tests. Rather than print the ordinal parameterizedTest()[1] he would like to
    Message 1 of 21 , Jun 8, 2009
    • 0 Attachment
      All,

      Rapha has proposed the following change to the printing of parameterized
      tests. Rather than print the ordinal "parameterizedTest()[1]" he would like
      to see the actual values: "parameterizedTest()[foo,5,bar]". Does anyone here
      (besides me in JUnit Max) have a dependency on parameterized test printing?
      Would the values you use print nicely in this format?

      Regards,

      Kent Beck
      Three Rivers Institute
    • David Saff
      Kent, This has been proposed many times, usually in terms of changing the actual name in the description. Originally, I backed off because I thought users
      Message 2 of 21 , Jun 8, 2009
      • 0 Attachment
        Kent,

        This has been proposed many times, usually in terms of changing the
        actual name in the description.

        Originally, I backed off because I thought users might want to load
        Parameterized values lazily, and having to eagerly grab them in the
        description phase would spoil that. I believe that this flexibility
        was used precisely as many times as there are chickens with lips, so
        the real world has spoken on that point.

        That said, there still is a concern that toStrings that produce very
        long, or oddly-formatted results, would make some third-party add-ons
        either unwieldy or directly broken (think about a toString() with a
        newline in it).

        So, I'm also curious in how other people answer this. Thanks,

        David Saff

        On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...> wrote:
        > All,
        >
        > Rapha has proposed the following change to the printing of parameterized
        > tests. Rather than print the ordinal "parameterizedTest()[1]" he would like
        > to see the actual values: "parameterizedTest()[foo,5,bar]". Does anyone here
        > (besides me in JUnit Max) have a dependency on parameterized test printing?
        > Would the values you use print nicely in this format?
        >
        > Regards,
        >
        > Kent Beck
        > Three Rivers Institute
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Nat Pryce
        Could an interceptor be used to override how a parameterised test is described? --Nat ... -- http://www.natpryce.com
        Message 3 of 21 , Jun 8, 2009
        • 0 Attachment
          Could an interceptor be used to override how a parameterised test is described?

          --Nat

          On 08/06/2009, David Saff <david@...> wrote:
          > Kent,
          >
          > This has been proposed many times, usually in terms of changing the
          > actual name in the description.
          >
          > Originally, I backed off because I thought users might want to load
          > Parameterized values lazily, and having to eagerly grab them in the
          > description phase would spoil that. I believe that this flexibility
          > was used precisely as many times as there are chickens with lips, so
          > the real world has spoken on that point.
          >
          > That said, there still is a concern that toStrings that produce very
          > long, or oddly-formatted results, would make some third-party add-ons
          > either unwieldy or directly broken (think about a toString() with a
          > newline in it).
          >
          > So, I'm also curious in how other people answer this. Thanks,
          >
          > David Saff
          >
          > On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...> wrote:
          >> All,
          >>
          >> Rapha has proposed the following change to the printing of parameterized
          >> tests. Rather than print the ordinal "parameterizedTest()[1]" he would
          >> like
          >> to see the actual values: "parameterizedTest()[foo,5,bar]". Does anyone
          >> here
          >> (besides me in JUnit Max) have a dependency on parameterized test
          >> printing?
          >> Would the values you use print nicely in this format?
          >>
          >> Regards,
          >>
          >> Kent Beck
          >> Three Rivers Institute
          >>
          >>
          >>
          >> ------------------------------------
          >>
          >> Yahoo! Groups Links
          >>
          >>
          >>
          >>
          >


          --
          http://www.natpryce.com
        • David Saff
          No. Interceptors don t exist at describe-time, just run-time. The feature would be a good one, but it would need to live elsewhere. David Saff
          Message 4 of 21 , Jun 8, 2009
          • 0 Attachment
            No. Interceptors don't exist at describe-time, just run-time.

            The feature would be a good one, but it would need to live elsewhere.

            David Saff

            On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...> wrote:
            > Could an interceptor be used to override how a parameterised test is described?
            >
            > --Nat
            >
            > On 08/06/2009, David Saff <david@...> wrote:
            >> Kent,
            >>
            >> This has been proposed many times, usually in terms of changing the
            >> actual name in the description.
            >>
            >> Originally, I backed off because I thought users might want to load
            >> Parameterized values lazily, and having to eagerly grab them in the
            >> description phase would spoil that.  I believe that this flexibility
            >> was used precisely as many times as there are chickens with lips, so
            >> the real world has spoken on that point.
            >>
            >> That said, there still is a concern that toStrings that produce very
            >> long, or oddly-formatted results, would make some third-party add-ons
            >> either unwieldy or directly broken (think about a toString() with a
            >> newline in it).
            >>
            >> So, I'm also curious in how other people answer this.  Thanks,
            >>
            >>    David Saff
            >>
            >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...> wrote:
            >>> All,
            >>>
            >>> Rapha has proposed the following change to the printing of parameterized
            >>> tests. Rather than print the ordinal "parameterizedTest()[1]" he would
            >>> like
            >>> to see the actual values: "parameterizedTest()[foo,5,bar]". Does anyone
            >>> here
            >>> (besides me in JUnit Max) have a dependency on parameterized test
            >>> printing?
            >>> Would the values you use print nicely in this format?
            >>>
            >>> Regards,
            >>>
            >>> Kent Beck
            >>> Three Rivers Institute
            >>>
            >>>
            >>>
            >>> ------------------------------------
            >>>
            >>> Yahoo! Groups Links
            >>>
            >>>
            >>>
            >>>
            >>
            >
            >
            > --
            > http://www.natpryce.com
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
          • Daniel Brolund
            Hi guys, Would it be possible that the description is built up in two phases . 1) before running the tests (as today) to create a skeleton 2) while running
            Message 5 of 21 , Jun 14, 2009
            • 0 Attachment
              Hi guys,

              Would it be possible that the description is built up in two "phases".
              1) before running the tests (as today) to create a "skeleton"
              2) while running the tests more "flesh" can be added, e.g. parameters.

              I haven't dug in this recently, but I notice that when I add to the
              description while running the tests, in Eclipse they are shown as
              "Unrooted tests".

              One possibility is that I've missed something obvious, and in that case,
              please tell me. :-)

              Cheers
              Daniel

              On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
              >
              >
              > No. Interceptors don't exist at describe-time, just run-time.
              >
              > The feature would be a good one, but it would need to live elsewhere.
              >
              > David Saff
              >
              > On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...> wrote:
              > > Could an interceptor be used to override how a parameterised test is
              > described?
              > >
              > > --Nat
              > >
              > > On 08/06/2009, David Saff <david@...> wrote:
              > >> Kent,
              > >>
              > >> This has been proposed many times, usually in terms of changing the
              > >> actual name in the description.
              > >>
              > >> Originally, I backed off because I thought users might want to load
              > >> Parameterized values lazily, and having to eagerly grab them in the
              > >> description phase would spoil that. I believe that this
              > flexibility
              > >> was used precisely as many times as there are chickens with lips,
              > so
              > >> the real world has spoken on that point.
              > >>
              > >> That said, there still is a concern that toStrings that produce
              > very
              > >> long, or oddly-formatted results, would make some third-party
              > add-ons
              > >> either unwieldy or directly broken (think about a toString() with a
              > >> newline in it).
              > >>
              > >> So, I'm also curious in how other people answer this. Thanks,
              > >>
              > >> David Saff
              > >>
              > >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...> wrote:
              > >>> All,
              > >>>
              > >>> Rapha has proposed the following change to the printing of
              > parameterized
              > >>> tests. Rather than print the ordinal "parameterizedTest()[1]" he
              > would
              > >>> like
              > >>> to see the actual values: "parameterizedTest()[foo,5,bar]". Does
              > anyone
              > >>> here
              > >>> (besides me in JUnit Max) have a dependency on parameterized test
              > >>> printing?
              > >>> Would the values you use print nicely in this format?
              > >>>
              > >>> Regards,
              > >>>
              > >>> Kent Beck
              > >>> Three Rivers Institute
              > >>>
              > >>>
              > >>>
              > >>> ------------------------------------
              > >>>
              > >>> Yahoo! Groups Links
              > >>>
              > >>>
              > >>>
              > >>>
              > >>
              > >
              > >
              > > --
              > > http://www.natpryce.com
              > >
              > >
              > > ------------------------------------
              > >
              > > Yahoo! Groups Links
              > >
              > >
              > >
              > >
              >
              >
              >
              >
              --
              ----------------------------------------------
              Daniel Brolund

              Agical AB
              Västerlånggatan 79, 2 tr
              111 29 Stockholm, SWEDEN
              http://www.agical.com

              mobile: +46 708 754 002
              e-mail: daniel.brolund@...
              blog: http://danielbrolund.wordpress.com
              twitter: danielbrolund
            • Joakim Ohlrogge
              The unrooted test-problem is exactly that: the description when running the test differs from the description when prelisting the tests . Perhaps it s a bit
              Message 6 of 21 , Jun 15, 2009
              • 0 Attachment
                The unrooted test-problem is exactly that: the description when
                running the test differs from the description when "prelisting the
                tests". Perhaps it's a bit of a flawed model that the description is
                the key to identify a test. On the other hand it keeps things simple
                (until you run into the parameterized test problem :))

                On Mon, Jun 15, 2009 at 7:45 AM, Daniel
                Brolund<daniel.brolund@...> wrote:
                >
                >
                > Hi guys,
                >
                > Would it be possible that the description is built up in two "phases".
                > 1) before running the tests (as today) to create a "skeleton"
                > 2) while running the tests more "flesh" can be added, e.g. parameters.
                >
                > I haven't dug in this recently, but I notice that when I add to the
                > description while running the tests, in Eclipse they are shown as
                > "Unrooted tests".
                >
                > One possibility is that I've missed something obvious, and in that case,
                > please tell me. :-)
                >
                > Cheers
                > Daniel
                >
                > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                >>
                >>
                >> No. Interceptors don't exist at describe-time, just run-time.
                >>
                >> The feature would be a good one, but it would need to live elsewhere.
                >>
                >> David Saff
                >>
                >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...> wrote:
                >> > Could an interceptor be used to override how a parameterised test is
                >> described?
                >> >
                >> > --Nat
                >> >
                >> > On 08/06/2009, David Saff <david@...> wrote:
                >> >> Kent,
                >> >>
                >> >> This has been proposed many times, usually in terms of changing the
                >> >> actual name in the description.
                >> >>
                >> >> Originally, I backed off because I thought users might want to load
                >> >> Parameterized values lazily, and having to eagerly grab them in the
                >> >> description phase would spoil that. I believe that this
                >> flexibility
                >> >> was used precisely as many times as there are chickens with lips,
                >> so
                >> >> the real world has spoken on that point.
                >> >>
                >> >> That said, there still is a concern that toStrings that produce
                >> very
                >> >> long, or oddly-formatted results, would make some third-party
                >> add-ons
                >> >> either unwieldy or directly broken (think about a toString() with a
                >> >> newline in it).
                >> >>
                >> >> So, I'm also curious in how other people answer this. Thanks,
                >> >>
                >> >> David Saff
                >> >>
                >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...> wrote:
                >> >>> All,
                >> >>>
                >> >>> Rapha has proposed the following change to the printing of
                >> parameterized
                >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]" he
                >> would
                >> >>> like
                >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]". Does
                >> anyone
                >> >>> here
                >> >>> (besides me in JUnit Max) have a dependency on parameterized test
                >> >>> printing?
                >> >>> Would the values you use print nicely in this format?
                >> >>>
                >> >>> Regards,
                >> >>>
                >> >>> Kent Beck
                >> >>> Three Rivers Institute
                >> >>>
                >> >>>
                >> >>>
                >> >>> ------------------------------------
                >> >>>
                >> >>> Yahoo! Groups Links
                >> >>>
                >> >>>
                >> >>>
                >> >>>
                >> >>
                >> >
                >> >
                >> > --
                >> > http://www.natpryce.com
                >> >
                >> >
                >> > ------------------------------------
                >> >
                >> > Yahoo! Groups Links
                >> >
                >> >
                >> >
                >> >
                >>
                >>
                >>
                >>
                > --
                > ----------------------------------------------
                > Daniel Brolund
                >
                > Agical AB
                > Västerlånggatan 79, 2 tr
                > 111 29 Stockholm, SWEDEN
                > http://www.agical.com
                >
                > mobile: +46 708 754 002
                > e-mail: daniel.brolund@...
                > blog: http://danielbrolund.wordpress.com
                > twitter: danielbrolund
                >
                >



                --
                -----------------------------------------------------
                Joakim Ohlrogge
                Agical AB
                Västerlånggatan 79, 2 tr
                111 29 Stockholm, SWEDEN

                Mobile: +46-708-754004
                Blog: johlrogge.wordpress.com
                E-mail: joakim.ohlrogge@...
              • David Saff
                Daniel, Can you explain the motivation behind such a change? If it s simply a desire to use Interceptors to influence test descriptions, I d rather introduce
                Message 7 of 21 , Jun 15, 2009
                • 0 Attachment
                  Daniel,

                  Can you explain the motivation behind such a change? If it's simply a
                  desire to use Interceptors to influence test descriptions, I'd rather
                  introduce a new, describe-time extension.

                  David Saff

                  On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                  Brolund<daniel.brolund@...> wrote:
                  > Hi guys,
                  >
                  > Would it be possible that the description is built up in two "phases".
                  > 1) before running the tests (as today) to create a "skeleton"
                  > 2) while running the tests more "flesh" can be added, e.g. parameters.
                  >
                  > I haven't dug in this recently, but I notice that when I add to the
                  > description while running the tests, in Eclipse they are shown as
                  > "Unrooted tests".
                  >
                  > One possibility is that I've missed something obvious, and in that case,
                  > please tell me. :-)
                  >
                  > Cheers
                  > Daniel
                  >
                  > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                  >>
                  >>
                  >> No. Interceptors don't exist at describe-time, just run-time.
                  >>
                  >> The feature would be a good one, but it would need to live elsewhere.
                  >>
                  >> David Saff
                  >>
                  >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...> wrote:
                  >> > Could an interceptor be used to override how a parameterised test is
                  >> described?
                  >> >
                  >> > --Nat
                  >> >
                  >> > On 08/06/2009, David Saff <david@...> wrote:
                  >> >> Kent,
                  >> >>
                  >> >> This has been proposed many times, usually in terms of changing the
                  >> >> actual name in the description.
                  >> >>
                  >> >> Originally, I backed off because I thought users might want to load
                  >> >> Parameterized values lazily, and having to eagerly grab them in the
                  >> >> description phase would spoil that.  I believe that this
                  >> flexibility
                  >> >> was used precisely as many times as there are chickens with lips,
                  >> so
                  >> >> the real world has spoken on that point.
                  >> >>
                  >> >> That said, there still is a concern that toStrings that produce
                  >> very
                  >> >> long, or oddly-formatted results, would make some third-party
                  >> add-ons
                  >> >> either unwieldy or directly broken (think about a toString() with a
                  >> >> newline in it).
                  >> >>
                  >> >> So, I'm also curious in how other people answer this.  Thanks,
                  >> >>
                  >> >>    David Saff
                  >> >>
                  >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...> wrote:
                  >> >>> All,
                  >> >>>
                  >> >>> Rapha has proposed the following change to the printing of
                  >> parameterized
                  >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]" he
                  >> would
                  >> >>> like
                  >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]". Does
                  >> anyone
                  >> >>> here
                  >> >>> (besides me in JUnit Max) have a dependency on parameterized test
                  >> >>> printing?
                  >> >>> Would the values you use print nicely in this format?
                  >> >>>
                  >> >>> Regards,
                  >> >>>
                  >> >>> Kent Beck
                  >> >>> Three Rivers Institute
                  >> >>>
                  >> >>>
                  >> >>>
                  >> >>> ------------------------------------
                  >> >>>
                  >> >>> Yahoo! Groups Links
                  >> >>>
                  >> >>>
                  >> >>>
                  >> >>>
                  >> >>
                  >> >
                  >> >
                  >> > --
                  >> > http://www.natpryce.com
                  >> >
                  >> >
                  >> > ------------------------------------
                  >> >
                  >> > Yahoo! Groups Links
                  >> >
                  >> >
                  >> >
                  >> >
                  >>
                  >>
                  >>
                  >>
                  > --
                  > ----------------------------------------------
                  > Daniel Brolund
                  >
                  > Agical AB
                  > Västerlånggatan 79, 2 tr
                  > 111 29 Stockholm, SWEDEN
                  > http://www.agical.com
                  >
                  > mobile:  +46 708 754 002
                  > e-mail:  daniel.brolund@...
                  > blog:    http://danielbrolund.wordpress.com
                  > twitter: danielbrolund
                  >
                  >
                  >
                  >
                  > ------------------------------------
                  >
                  > Yahoo! Groups Links
                  >
                  >
                  >
                  >
                • David Saff
                  On Mon, Jun 15, 2009 at 3:26 AM, Joakim ... The Description is, no more and no less, the identity of a test. Now, I can imagine a desire to attach information
                  Message 8 of 21 , Jun 15, 2009
                  • 0 Attachment
                    On Mon, Jun 15, 2009 at 3:26 AM, Joakim
                    Ohlrogge<joakim.ohlrogge@...> wrote:
                    > The unrooted test-problem is exactly that: the description when
                    > running the test differs from the description when "prelisting the
                    > tests". Perhaps it's a bit of a flawed model that the description is
                    > the key to identify a test. On the other hand it keeps things simple
                    > (until you run into the parameterized test problem :))

                    The Description is, no more and no less, the identity of a test. Now,
                    I can imagine a desire to attach information outside of identity and
                    failed/succeeded (such as the parameters used on a parameterized
                    test), to help understand what's happened and what you might want to
                    re-run. That is, Eclipse might say:

                    + AllBrowsersTest
                    + AllBrowsersTest[0] (b = "IE6")
                    + AllBrowsersTest[1] (b = "Firefox3")
                    + AllBrowsersTest[2] (b = "Safari4")
                    + etc...

                    In this case, the Descriptions would still just have [0], [1], etc.,
                    but advanced runners expecting the additional info could output the
                    additional, helpful information. Old runners that depend on the
                    textual representation of the Descriptions would be none the wiser.

                    Not sure that's the answer--would it address your concern?

                    David Saff

                    >
                    > On Mon, Jun 15, 2009 at 7:45 AM, Daniel
                    > Brolund<daniel.brolund@...> wrote:
                    >>
                    >>
                    >> Hi guys,
                    >>
                    >> Would it be possible that the description is built up in two "phases".
                    >> 1) before running the tests (as today) to create a "skeleton"
                    >> 2) while running the tests more "flesh" can be added, e.g. parameters.
                    >>
                    >> I haven't dug in this recently, but I notice that when I add to the
                    >> description while running the tests, in Eclipse they are shown as
                    >> "Unrooted tests".
                    >>
                    >> One possibility is that I've missed something obvious, and in that case,
                    >> please tell me. :-)
                    >>
                    >> Cheers
                    >> Daniel
                    >>
                    >> On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                    >>>
                    >>>
                    >>> No. Interceptors don't exist at describe-time, just run-time.
                    >>>
                    >>> The feature would be a good one, but it would need to live elsewhere.
                    >>>
                    >>> David Saff
                    >>>
                    >>> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...> wrote:
                    >>> > Could an interceptor be used to override how a parameterised test is
                    >>> described?
                    >>> >
                    >>> > --Nat
                    >>> >
                    >>> > On 08/06/2009, David Saff <david@...> wrote:
                    >>> >> Kent,
                    >>> >>
                    >>> >> This has been proposed many times, usually in terms of changing the
                    >>> >> actual name in the description.
                    >>> >>
                    >>> >> Originally, I backed off because I thought users might want to load
                    >>> >> Parameterized values lazily, and having to eagerly grab them in the
                    >>> >> description phase would spoil that. I believe that this
                    >>> flexibility
                    >>> >> was used precisely as many times as there are chickens with lips,
                    >>> so
                    >>> >> the real world has spoken on that point.
                    >>> >>
                    >>> >> That said, there still is a concern that toStrings that produce
                    >>> very
                    >>> >> long, or oddly-formatted results, would make some third-party
                    >>> add-ons
                    >>> >> either unwieldy or directly broken (think about a toString() with a
                    >>> >> newline in it).
                    >>> >>
                    >>> >> So, I'm also curious in how other people answer this. Thanks,
                    >>> >>
                    >>> >> David Saff
                    >>> >>
                    >>> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...> wrote:
                    >>> >>> All,
                    >>> >>>
                    >>> >>> Rapha has proposed the following change to the printing of
                    >>> parameterized
                    >>> >>> tests. Rather than print the ordinal "parameterizedTest()[1]" he
                    >>> would
                    >>> >>> like
                    >>> >>> to see the actual values: "parameterizedTest()[foo,5,bar]". Does
                    >>> anyone
                    >>> >>> here
                    >>> >>> (besides me in JUnit Max) have a dependency on parameterized test
                    >>> >>> printing?
                    >>> >>> Would the values you use print nicely in this format?
                    >>> >>>
                    >>> >>> Regards,
                    >>> >>>
                    >>> >>> Kent Beck
                    >>> >>> Three Rivers Institute
                    >>> >>>
                    >>> >>>
                    >>> >>>
                    >>> >>> ------------------------------------
                    >>> >>>
                    >>> >>> Yahoo! Groups Links
                    >>> >>>
                    >>> >>>
                    >>> >>>
                    >>> >>>
                    >>> >>
                    >>> >
                    >>> >
                    >>> > --
                    >>> > http://www.natpryce.com
                    >>> >
                    >>> >
                    >>> > ------------------------------------
                    >>> >
                    >>> > Yahoo! Groups Links
                    >>> >
                    >>> >
                    >>> >
                    >>> >
                    >>>
                    >>>
                    >>>
                    >>>
                    >> --
                    >> ----------------------------------------------
                    >> Daniel Brolund
                    >>
                    >> Agical AB
                    >> Västerlånggatan 79, 2 tr
                    >> 111 29 Stockholm, SWEDEN
                    >> http://www.agical.com
                    >>
                    >> mobile: +46 708 754 002
                    >> e-mail: daniel.brolund@...
                    >> blog: http://danielbrolund.wordpress.com
                    >> twitter: danielbrolund
                    >>
                    >>
                    >
                    >
                    >
                    > --
                    > -----------------------------------------------------
                    > Joakim Ohlrogge
                    > Agical AB
                    > Västerlånggatan 79, 2 tr
                    > 111 29 Stockholm, SWEDEN
                    >
                    > Mobile: +46-708-754004
                    > Blog: johlrogge.wordpress.com
                    > E-mail: joakim.ohlrogge@...
                    >
                    >
                    > ------------------------------------
                    >
                    > Yahoo! Groups Links
                    >
                    >
                    >
                    >
                  • Daniel Brolund
                    Hi David, The motivation would be when you want to decorate with runtime data, especially lazily loaded data, like for Parameterized. If you look a bit
                    Message 9 of 21 , Jun 15, 2009
                    • 0 Attachment
                      Hi David,

                      The motivation would be when you want to decorate with runtime data,
                      especially lazily loaded data, like for Parameterized.

                      If you look a bit broader, you could decorate with assertions,
                      assumptions and more as sub-test information. That might not be a good
                      idea, but it is a thought.

                      I'm not sure how to do it with an Interceptor (I'm not up to speed there
                      yet). Could you make a sketch on your thoughts?

                      Cheers
                      Daniel


                      On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                      >
                      >
                      > Daniel,
                      >
                      > Can you explain the motivation behind such a change? If it's simply a
                      > desire to use Interceptors to influence test descriptions, I'd rather
                      > introduce a new, describe-time extension.
                      >
                      > David Saff
                      >
                      > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                      > Brolund<daniel.brolund@...> wrote:
                      > > Hi guys,
                      > >
                      > > Would it be possible that the description is built up in two
                      > "phases".
                      > > 1) before running the tests (as today) to create a "skeleton"
                      > > 2) while running the tests more "flesh" can be added, e.g.
                      > parameters.
                      > >
                      > > I haven't dug in this recently, but I notice that when I add to the
                      > > description while running the tests, in Eclipse they are shown as
                      > > "Unrooted tests".
                      > >
                      > > One possibility is that I've missed something obvious, and in that
                      > case,
                      > > please tell me. :-)
                      > >
                      > > Cheers
                      > > Daniel
                      > >
                      > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                      > >>
                      > >>
                      > >> No. Interceptors don't exist at describe-time, just run-time.
                      > >>
                      > >> The feature would be a good one, but it would need to live
                      > elsewhere.
                      > >>
                      > >> David Saff
                      > >>
                      > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...>
                      > wrote:
                      > >> > Could an interceptor be used to override how a parameterised test
                      > is
                      > >> described?
                      > >> >
                      > >> > --Nat
                      > >> >
                      > >> > On 08/06/2009, David Saff <david@...> wrote:
                      > >> >> Kent,
                      > >> >>
                      > >> >> This has been proposed many times, usually in terms of changing
                      > the
                      > >> >> actual name in the description.
                      > >> >>
                      > >> >> Originally, I backed off because I thought users might want to
                      > load
                      > >> >> Parameterized values lazily, and having to eagerly grab them in
                      > the
                      > >> >> description phase would spoil that. I believe that this
                      > >> flexibility
                      > >> >> was used precisely as many times as there are chickens with
                      > lips,
                      > >> so
                      > >> >> the real world has spoken on that point.
                      > >> >>
                      > >> >> That said, there still is a concern that toStrings that produce
                      > >> very
                      > >> >> long, or oddly-formatted results, would make some third-party
                      > >> add-ons
                      > >> >> either unwieldy or directly broken (think about a toString()
                      > with a
                      > >> >> newline in it).
                      > >> >>
                      > >> >> So, I'm also curious in how other people answer this. Thanks,
                      > >> >>
                      > >> >> David Saff
                      > >> >>
                      > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...>
                      > wrote:
                      > >> >>> All,
                      > >> >>>
                      > >> >>> Rapha has proposed the following change to the printing of
                      > >> parameterized
                      > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                      > he
                      > >> would
                      > >> >>> like
                      > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                      > Does
                      > >> anyone
                      > >> >>> here
                      > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                      > test
                      > >> >>> printing?
                      > >> >>> Would the values you use print nicely in this format?
                      > >> >>>
                      > >> >>> Regards,
                      > >> >>>
                      > >> >>> Kent Beck
                      > >> >>> Three Rivers Institute
                      > >> >>>
                      > >> >>>
                      > >> >>>
                      > >> >>> ------------------------------------
                      > >> >>>
                      > >> >>> Yahoo! Groups Links
                      > >> >>>
                      > >> >>>
                      > >> >>>
                      > >> >>>
                      > >> >>
                      > >> >
                      > >> >
                      > >> > --
                      > >> > http://www.natpryce.com
                      > >> >
                      > >> >
                      > >> > ------------------------------------
                      > >> >
                      > >> > Yahoo! Groups Links
                      > >> >
                      > >> >
                      > >> >
                      > >> >
                      > >>
                      > >>
                      > >>
                      > >>
                      > > --
                      > > ----------------------------------------------
                      > > Daniel Brolund
                      > >
                      > > Agical AB
                      > > Västerlånggatan 79, 2 tr
                      > > 111 29 Stockholm, SWEDEN
                      > > http://www.agical.com
                      > >
                      > > mobile: +46 708 754 002
                      > > e-mail: daniel.brolund@...
                      > > blog: http://danielbrolund.wordpress.com
                      > > twitter: danielbrolund
                      > >
                      > >
                      > >
                      > >
                      > > ------------------------------------
                      > >
                      > > Yahoo! Groups Links
                      > >
                      > >
                      > >
                      > >
                      >
                      >
                      >
                      >
                      --
                      ----------------------------------------------
                      Daniel Brolund

                      Agical AB
                      Västerlånggatan 79, 2 tr
                      111 29 Stockholm, SWEDEN
                      http://www.agical.com

                      mobile: +46 708 754 002
                      e-mail: daniel.brolund@...
                      blog: http://danielbrolund.wordpress.com
                      twitter: danielbrolund
                    • P Baker
                      As this situation has recently effected our used of JUnit, what is the reasoning behind using the test name as a primary key? Coming from a database
                      Message 10 of 21 , Jun 15, 2009
                      • 0 Attachment
                        As this situation has recently effected our used of JUnit, what is the
                        reasoning behind using the test name as a primary key? Coming from a
                        database background, folks usually recommend using artificial keys.

                        In addition to allowing lazy loading, the added complexity might allow
                        future flexibility and as Daniel mentioned, arbitrary attributes to be
                        added. I'm particularly interested in lazy loading, however, what are your
                        thoughts on incorporating that functionality in JUnit4's architecture?

                        Phill

                        On 6/15/09, Daniel Brolund <daniel.brolund@...> wrote:
                        >
                        >
                        >
                        > Hi David,
                        >
                        > The motivation would be when you want to decorate with runtime data,
                        > especially lazily loaded data, like for Parameterized.
                        >
                        > If you look a bit broader, you could decorate with assertions,
                        > assumptions and more as sub-test information. That might not be a good
                        > idea, but it is a thought.
                        >
                        > I'm not sure how to do it with an Interceptor (I'm not up to speed there
                        > yet). Could you make a sketch on your thoughts?
                        >
                        > Cheers
                        > Daniel
                        >
                        >
                        > On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                        > >
                        > >
                        > > Daniel,
                        > >
                        > > Can you explain the motivation behind such a change? If it's simply a
                        > > desire to use Interceptors to influence test descriptions, I'd rather
                        > > introduce a new, describe-time extension.
                        > >
                        > > David Saff
                        > >
                        > > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                        > > Brolund<daniel.brolund@... <daniel.brolund%40agical.com>> wrote:
                        > > > Hi guys,
                        > > >
                        > > > Would it be possible that the description is built up in two
                        > > "phases".
                        > > > 1) before running the tests (as today) to create a "skeleton"
                        > > > 2) while running the tests more "flesh" can be added, e.g.
                        > > parameters.
                        > > >
                        > > > I haven't dug in this recently, but I notice that when I add to the
                        > > > description while running the tests, in Eclipse they are shown as
                        > > > "Unrooted tests".
                        > > >
                        > > > One possibility is that I've missed something obvious, and in that
                        > > case,
                        > > > please tell me. :-)
                        > > >
                        > > > Cheers
                        > > > Daniel
                        > > >
                        > > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                        > > >>
                        > > >>
                        > > >> No. Interceptors don't exist at describe-time, just run-time.
                        > > >>
                        > > >> The feature would be a good one, but it would need to live
                        > > elsewhere.
                        > > >>
                        > > >> David Saff
                        > > >>
                        > > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...<nat.pryce%40gmail.com>
                        > >
                        > > wrote:
                        > > >> > Could an interceptor be used to override how a parameterised test
                        > > is
                        > > >> described?
                        > > >> >
                        > > >> > --Nat
                        > > >> >
                        > > >> > On 08/06/2009, David Saff <david@... <david%40saff.net>>
                        > wrote:
                        > > >> >> Kent,
                        > > >> >>
                        > > >> >> This has been proposed many times, usually in terms of changing
                        > > the
                        > > >> >> actual name in the description.
                        > > >> >>
                        > > >> >> Originally, I backed off because I thought users might want to
                        > > load
                        > > >> >> Parameterized values lazily, and having to eagerly grab them in
                        > > the
                        > > >> >> description phase would spoil that. I believe that this
                        > > >> flexibility
                        > > >> >> was used precisely as many times as there are chickens with
                        > > lips,
                        > > >> so
                        > > >> >> the real world has spoken on that point.
                        > > >> >>
                        > > >> >> That said, there still is a concern that toStrings that produce
                        > > >> very
                        > > >> >> long, or oddly-formatted results, would make some third-party
                        > > >> add-ons
                        > > >> >> either unwieldy or directly broken (think about a toString()
                        > > with a
                        > > >> >> newline in it).
                        > > >> >>
                        > > >> >> So, I'm also curious in how other people answer this. Thanks,
                        > > >> >>
                        > > >> >> David Saff
                        > > >> >>
                        > > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...<kentb%40earthlink.net>
                        > >
                        > > wrote:
                        > > >> >>> All,
                        > > >> >>>
                        > > >> >>> Rapha has proposed the following change to the printing of
                        > > >> parameterized
                        > > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                        > > he
                        > > >> would
                        > > >> >>> like
                        > > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                        > > Does
                        > > >> anyone
                        > > >> >>> here
                        > > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                        > > test
                        > > >> >>> printing?
                        > > >> >>> Would the values you use print nicely in this format?
                        > > >> >>>
                        > > >> >>> Regards,
                        > > >> >>>
                        > > >> >>> Kent Beck
                        > > >> >>> Three Rivers Institute
                        > > >> >>>
                        > > >> >>>
                        > > >> >>>
                        > > >> >>> ------------------------------------
                        > > >> >>>
                        > > >> >>> Yahoo! Groups Links
                        > > >> >>>
                        > > >> >>>
                        > > >> >>>
                        > > >> >>>
                        > > >> >>
                        > > >> >
                        > > >> >
                        > > >> > --
                        > > >> > http://www.natpryce.com
                        > > >> >
                        > > >> >
                        > > >> > ------------------------------------
                        > > >> >
                        > > >> > Yahoo! Groups Links
                        > > >> >
                        > > >> >
                        > > >> >
                        > > >> >
                        > > >>
                        > > >>
                        > > >>
                        > > >>
                        > > > --
                        > > > ----------------------------------------------
                        > > > Daniel Brolund
                        > > >
                        > > > Agical AB
                        > > > Västerlånggatan 79, 2 tr
                        > > > 111 29 Stockholm, SWEDEN
                        > > > http://www.agical.com
                        > > >
                        > > > mobile: +46 708 754 002
                        > > > e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                        > > > blog: http://danielbrolund.wordpress.com
                        > > > twitter: danielbrolund
                        > > >
                        > > >
                        > > >
                        > > >
                        > > > ------------------------------------
                        > > >
                        > > > Yahoo! Groups Links
                        > > >
                        > > >
                        > > >
                        > > >
                        > >
                        > >
                        > >
                        > >
                        > --
                        > ----------------------------------------------
                        > Daniel Brolund
                        >
                        > Agical AB
                        > Västerlånggatan 79, 2 tr
                        > 111 29 Stockholm, SWEDEN
                        > http://www.agical.com
                        >
                        > mobile: +46 708 754 002
                        > e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                        > blog: http://danielbrolund.wordpress.com
                        > twitter: danielbrolund
                        >
                        >
                        >


                        [Non-text portions of this message have been removed]
                      • P Baker
                        David, in looking at the architecture for @BeforeClass, @AfterClass and @Parameters, and the patches on github for @BeforeParameterize and @AfterParameterize,
                        Message 11 of 21 , Jun 17, 2009
                        • 0 Attachment
                          David, in looking at the architecture for @BeforeClass, @AfterClass and
                          @Parameters, and the patches on github for @BeforeParameterize and
                          @AfterParameterize, I'm curious why the before and after class methods are
                          run as part of the class block?

                          After struggling with finding a way to put @Paramerize after the
                          @BeforeClass calls, can you explain the reasoning behind putting those
                          annotations calls in the test. In fact, they seem extraneous to the test
                          itself, and rather like overhead to the test case. Why aren't they run in a
                          fashion similar to @Parameterize, in methods outside of the class block in
                          ParentRunner? It seems like with the introduction of interceptors, and the
                          addition of their permutations of the testing chain, it might be a good idea
                          to run those methods calls right in Parent Runner?

                          Any comments would be appreciated. Thanks,
                          Phill Baker

                          On 6/15/09, P Baker <me@...> wrote:
                          >
                          > As this situation has recently effected our used of JUnit, what is the
                          > reasoning behind using the test name as a primary key? Coming from a
                          > database background, folks usually recommend using artificial keys.
                          >
                          > In addition to allowing lazy loading, the added complexity might allow
                          > future flexibility and as Daniel mentioned, arbitrary attributes to be
                          > added. I'm particularly interested in lazy loading, however, what are your
                          > thoughts on incorporating that functionality in JUnit4's architecture?
                          >
                          > Phill
                          >
                          > On 6/15/09, Daniel Brolund <daniel.brolund@...> wrote:
                          >>
                          >>
                          >>
                          >> Hi David,
                          >>
                          >> The motivation would be when you want to decorate with runtime data,
                          >> especially lazily loaded data, like for Parameterized.
                          >>
                          >> If you look a bit broader, you could decorate with assertions,
                          >> assumptions and more as sub-test information. That might not be a good
                          >> idea, but it is a thought.
                          >>
                          >> I'm not sure how to do it with an Interceptor (I'm not up to speed there
                          >> yet). Could you make a sketch on your thoughts?
                          >>
                          >> Cheers
                          >> Daniel
                          >>
                          >>
                          >> On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                          >> >
                          >> >
                          >> > Daniel,
                          >> >
                          >> > Can you explain the motivation behind such a change? If it's simply a
                          >> > desire to use Interceptors to influence test descriptions, I'd rather
                          >> > introduce a new, describe-time extension.
                          >> >
                          >> > David Saff
                          >> >
                          >> > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                          >> > Brolund<daniel.brolund@... <daniel.brolund%40agical.com>> wrote:
                          >> > > Hi guys,
                          >> > >
                          >> > > Would it be possible that the description is built up in two
                          >> > "phases".
                          >> > > 1) before running the tests (as today) to create a "skeleton"
                          >> > > 2) while running the tests more "flesh" can be added, e.g.
                          >> > parameters.
                          >> > >
                          >> > > I haven't dug in this recently, but I notice that when I add to the
                          >> > > description while running the tests, in Eclipse they are shown as
                          >> > > "Unrooted tests".
                          >> > >
                          >> > > One possibility is that I've missed something obvious, and in that
                          >> > case,
                          >> > > please tell me. :-)
                          >> > >
                          >> > > Cheers
                          >> > > Daniel
                          >> > >
                          >> > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                          >> > >>
                          >> > >>
                          >> > >> No. Interceptors don't exist at describe-time, just run-time.
                          >> > >>
                          >> > >> The feature would be a good one, but it would need to live
                          >> > elsewhere.
                          >> > >>
                          >> > >> David Saff
                          >> > >>
                          >> > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...<nat.pryce%40gmail.com>
                          >> >
                          >> > wrote:
                          >> > >> > Could an interceptor be used to override how a parameterised test
                          >> > is
                          >> > >> described?
                          >> > >> >
                          >> > >> > --Nat
                          >> > >> >
                          >> > >> > On 08/06/2009, David Saff <david@... <david%40saff.net>>
                          >> wrote:
                          >> > >> >> Kent,
                          >> > >> >>
                          >> > >> >> This has been proposed many times, usually in terms of changing
                          >> > the
                          >> > >> >> actual name in the description.
                          >> > >> >>
                          >> > >> >> Originally, I backed off because I thought users might want to
                          >> > load
                          >> > >> >> Parameterized values lazily, and having to eagerly grab them in
                          >> > the
                          >> > >> >> description phase would spoil that. I believe that this
                          >> > >> flexibility
                          >> > >> >> was used precisely as many times as there are chickens with
                          >> > lips,
                          >> > >> so
                          >> > >> >> the real world has spoken on that point.
                          >> > >> >>
                          >> > >> >> That said, there still is a concern that toStrings that produce
                          >> > >> very
                          >> > >> >> long, or oddly-formatted results, would make some third-party
                          >> > >> add-ons
                          >> > >> >> either unwieldy or directly broken (think about a toString()
                          >> > with a
                          >> > >> >> newline in it).
                          >> > >> >>
                          >> > >> >> So, I'm also curious in how other people answer this. Thanks,
                          >> > >> >>
                          >> > >> >> David Saff
                          >> > >> >>
                          >> > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...<kentb%40earthlink.net>
                          >> >
                          >> > wrote:
                          >> > >> >>> All,
                          >> > >> >>>
                          >> > >> >>> Rapha has proposed the following change to the printing of
                          >> > >> parameterized
                          >> > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                          >> > he
                          >> > >> would
                          >> > >> >>> like
                          >> > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                          >> > Does
                          >> > >> anyone
                          >> > >> >>> here
                          >> > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                          >> > test
                          >> > >> >>> printing?
                          >> > >> >>> Would the values you use print nicely in this format?
                          >> > >> >>>
                          >> > >> >>> Regards,
                          >> > >> >>>
                          >> > >> >>> Kent Beck
                          >> > >> >>> Three Rivers Institute
                          >> > >> >>>
                          >> > >> >>>
                          >> > >> >>>
                          >> > >> >>> ------------------------------------
                          >> > >> >>>
                          >> > >> >>> Yahoo! Groups Links
                          >> > >> >>>
                          >> > >> >>>
                          >> > >> >>>
                          >> > >> >>>
                          >> > >> >>
                          >> > >> >
                          >> > >> >
                          >> > >> > --
                          >> > >> > http://www.natpryce.com
                          >> > >> >
                          >> > >> >
                          >> > >> > ------------------------------------
                          >> > >> >
                          >> > >> > Yahoo! Groups Links
                          >> > >> >
                          >> > >> >
                          >> > >> >
                          >> > >> >
                          >> > >>
                          >> > >>
                          >> > >>
                          >> > >>
                          >> > > --
                          >> > > ----------------------------------------------
                          >> > > Daniel Brolund
                          >> > >
                          >> > > Agical AB
                          >> > > Västerlånggatan 79, 2 tr
                          >> > > 111 29 Stockholm, SWEDEN
                          >> > > http://www.agical.com
                          >> > >
                          >> > > mobile: +46 708 754 002
                          >> > > e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                          >> > > blog: http://danielbrolund.wordpress.com
                          >> > > twitter: danielbrolund
                          >> > >
                          >> > >
                          >> > >
                          >> > >
                          >> > > ------------------------------------
                          >> > >
                          >> > > Yahoo! Groups Links
                          >> > >
                          >> > >
                          >> > >
                          >> > >
                          >> >
                          >> >
                          >> >
                          >> >
                          >> --
                          >> ----------------------------------------------
                          >> Daniel Brolund
                          >>
                          >> Agical AB
                          >> Västerlånggatan 79, 2 tr
                          >> 111 29 Stockholm, SWEDEN
                          >> http://www.agical.com
                          >>
                          >> mobile: +46 708 754 002
                          >> e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                          >> blog: http://danielbrolund.wordpress.com
                          >> twitter: danielbrolund
                          >>
                          >>
                          >>
                          >
                          >


                          [Non-text portions of this message have been removed]
                        • Forsberg, Mike
                          So when I wrote the @BeforeParameterize and @AfterParameterize blocks, I followed the @BeforeClass and @AfterClass pattern. I haven’t had time to make a
                          Message 12 of 21 , Jun 18, 2009
                          • 0 Attachment
                            So when I wrote the @BeforeParameterize and @AfterParameterize blocks, I followed the @BeforeClass and @AfterClass pattern. I haven’t had time to make a “universal” solution. (In addition, I’ve been told that my company _might_ own any ideas that I come up with on this front, so I’ve halted my development.)



                            I’m very willing to supply any background information about what I did to aid in further research, but until I get an okay from high up here, I’m gonna hold off on the ideas front.



                            Sorry, I gotta eat and I’m a big guy that likes to eat.



                            Big Mike





                            From: junit@yahoogroups.com [mailto:junit@yahoogroups.com] On Behalf Of P Baker
                            Sent: Wednesday, June 17, 2009 11:07 PM
                            To: junit@yahoogroups.com
                            Subject: Re: [junit] Proposed change to Parameterized printing








                            David, in looking at the architecture for @BeforeClass, @AfterClass and
                            @Parameters, and the patches on github for @BeforeParameterize and
                            @AfterParameterize, I'm curious why the before and after class methods are
                            run as part of the class block?

                            After struggling with finding a way to put @Paramerize after the
                            @BeforeClass calls, can you explain the reasoning behind putting those
                            annotations calls in the test. In fact, they seem extraneous to the test
                            itself, and rather like overhead to the test case. Why aren't they run in a
                            fashion similar to @Parameterize, in methods outside of the class block in
                            ParentRunner? It seems like with the introduction of interceptors, and the
                            addition of their permutations of the testing chain, it might be a good idea
                            to run those methods calls right in Parent Runner?

                            Any comments would be appreciated. Thanks,
                            Phill Baker

                            On 6/15/09, P Baker <me@... <mailto:me%40retrodict.com> > wrote:
                            >
                            > As this situation has recently effected our used of JUnit, what is the
                            > reasoning behind using the test name as a primary key? Coming from a
                            > database background, folks usually recommend using artificial keys.
                            >
                            > In addition to allowing lazy loading, the added complexity might allow
                            > future flexibility and as Daniel mentioned, arbitrary attributes to be
                            > added. I'm particularly interested in lazy loading, however, what are your
                            > thoughts on incorporating that functionality in JUnit4's architecture?
                            >
                            > Phill
                            >
                            > On 6/15/09, Daniel Brolund <daniel.brolund@... <mailto:daniel.brolund%40agical.com> > wrote:
                            >>
                            >>
                            >>
                            >> Hi David,
                            >>
                            >> The motivation would be when you want to decorate with runtime data,
                            >> especially lazily loaded data, like for Parameterized.
                            >>
                            >> If you look a bit broader, you could decorate with assertions,
                            >> assumptions and more as sub-test information. That might not be a good
                            >> idea, but it is a thought.
                            >>
                            >> I'm not sure how to do it with an Interceptor (I'm not up to speed there
                            >> yet). Could you make a sketch on your thoughts?
                            >>
                            >> Cheers
                            >> Daniel
                            >>
                            >>
                            >> On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                            >> >
                            >> >
                            >> > Daniel,
                            >> >
                            >> > Can you explain the motivation behind such a change? If it's simply a
                            >> > desire to use Interceptors to influence test descriptions, I'd rather
                            >> > introduce a new, describe-time extension.
                            >> >
                            >> > David Saff
                            >> >
                            >> > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                            >> > Brolund<daniel.brolund@... <mailto:daniel.brolund%40agical.com> <daniel.brolund%40agical.com>> wrote:
                            >> > > Hi guys,
                            >> > >
                            >> > > Would it be possible that the description is built up in two
                            >> > "phases".
                            >> > > 1) before running the tests (as today) to create a "skeleton"
                            >> > > 2) while running the tests more "flesh" can be added, e.g.
                            >> > parameters.
                            >> > >
                            >> > > I haven't dug in this recently, but I notice that when I add to the
                            >> > > description while running the tests, in Eclipse they are shown as
                            >> > > "Unrooted tests".
                            >> > >
                            >> > > One possibility is that I've missed something obvious, and in that
                            >> > case,
                            >> > > please tell me. :-)
                            >> > >
                            >> > > Cheers
                            >> > > Daniel
                            >> > >
                            >> > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                            >> > >>
                            >> > >>
                            >> > >> No. Interceptors don't exist at describe-time, just run-time.
                            >> > >>
                            >> > >> The feature would be a good one, but it would need to live
                            >> > elsewhere.
                            >> > >>
                            >> > >> David Saff
                            >> > >>
                            >> > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@... <mailto:nat.pryce%40gmail.com> <nat.pryce%40gmail.com>
                            >> >
                            >> > wrote:
                            >> > >> > Could an interceptor be used to override how a parameterised test
                            >> > is
                            >> > >> described?
                            >> > >> >
                            >> > >> > --Nat
                            >> > >> >
                            >> > >> > On 08/06/2009, David Saff <david@... <mailto:david%40saff.net> <david%40saff.net>>
                            >> wrote:
                            >> > >> >> Kent,
                            >> > >> >>
                            >> > >> >> This has been proposed many times, usually in terms of changing
                            >> > the
                            >> > >> >> actual name in the description.
                            >> > >> >>
                            >> > >> >> Originally, I backed off because I thought users might want to
                            >> > load
                            >> > >> >> Parameterized values lazily, and having to eagerly grab them in
                            >> > the
                            >> > >> >> description phase would spoil that. I believe that this
                            >> > >> flexibility
                            >> > >> >> was used precisely as many times as there are chickens with
                            >> > lips,
                            >> > >> so
                            >> > >> >> the real world has spoken on that point.
                            >> > >> >>
                            >> > >> >> That said, there still is a concern that toStrings that produce
                            >> > >> very
                            >> > >> >> long, or oddly-formatted results, would make some third-party
                            >> > >> add-ons
                            >> > >> >> either unwieldy or directly broken (think about a toString()
                            >> > with a
                            >> > >> >> newline in it).
                            >> > >> >>
                            >> > >> >> So, I'm also curious in how other people answer this. Thanks,
                            >> > >> >>
                            >> > >> >> David Saff
                            >> > >> >>
                            >> > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@... <mailto:kentb%40earthlink.net> <kentb%40earthlink.net>
                            >> >
                            >> > wrote:
                            >> > >> >>> All,
                            >> > >> >>>
                            >> > >> >>> Rapha has proposed the following change to the printing of
                            >> > >> parameterized
                            >> > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                            >> > he
                            >> > >> would
                            >> > >> >>> like
                            >> > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                            >> > Does
                            >> > >> anyone
                            >> > >> >>> here
                            >> > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                            >> > test
                            >> > >> >>> printing?
                            >> > >> >>> Would the values you use print nicely in this format?
                            >> > >> >>>
                            >> > >> >>> Regards,
                            >> > >> >>>
                            >> > >> >>> Kent Beck
                            >> > >> >>> Three Rivers Institute
                            >> > >> >>>
                            >> > >> >>>
                            >> > >> >>>
                            >> > >> >>> ------------------------------------
                            >> > >> >>>
                            >> > >> >>> Yahoo! Groups Links
                            >> > >> >>>
                            >> > >> >>>
                            >> > >> >>>
                            >> > >> >>>
                            >> > >> >>
                            >> > >> >
                            >> > >> >
                            >> > >> > --
                            >> > >> > http://www.natpryce.com
                            >> > >> >
                            >> > >> >
                            >> > >> > ------------------------------------
                            >> > >> >
                            >> > >> > Yahoo! Groups Links
                            >> > >> >
                            >> > >> >
                            >> > >> >
                            >> > >> >
                            >> > >>
                            >> > >>
                            >> > >>
                            >> > >>
                            >> > > --
                            >> > > ----------------------------------------------
                            >> > > Daniel Brolund
                            >> > >
                            >> > > Agical AB
                            >> > > Västerlånggatan 79, 2 tr
                            >> > > 111 29 Stockholm, SWEDEN
                            >> > > http://www.agical.com
                            >> > >
                            >> > > mobile: +46 708 754 002
                            >> > > e-mail: daniel.brolund@... <mailto:daniel.brolund%40agical.com> <daniel.brolund%40agical.com>
                            >> > > blog: http://danielbrolund.wordpress.com
                            >> > > twitter: danielbrolund
                            >> > >
                            >> > >
                            >> > >
                            >> > >
                            >> > > ------------------------------------
                            >> > >
                            >> > > Yahoo! Groups Links
                            >> > >
                            >> > >
                            >> > >
                            >> > >
                            >> >
                            >> >
                            >> >
                            >> >
                            >> --
                            >> ----------------------------------------------
                            >> Daniel Brolund
                            >>
                            >> Agical AB
                            >> Västerlånggatan 79, 2 tr
                            >> 111 29 Stockholm, SWEDEN
                            >> http://www.agical.com
                            >>
                            >> mobile: +46 708 754 002
                            >> e-mail: daniel.brolund@... <mailto:daniel.brolund%40agical.com> <daniel.brolund%40agical.com>
                            >> blog: http://danielbrolund.wordpress.com
                            >> twitter: danielbrolund
                            >>
                            >>
                            >>
                            >
                            >

                            [Non-text portions of this message have been removed]





                            [Non-text portions of this message have been removed]
                          • David Saff
                            Daniel, I think that an idea of gathering additional information makes sense as a feature request, but I also think that mutating the Description name, whose
                            Message 13 of 21 , Jun 18, 2009
                            • 0 Attachment
                              Daniel,

                              I think that an idea of gathering additional information makes sense
                              as a feature request, but I also think that mutating the Description
                              name, whose primary role is identifying tests, isn't the way to go.
                              Does that make sense?

                              I'd still love a concrete use case from your head. Are you suggesting
                              a design just for the Parameterized issue with lazy loading, because
                              the lazy-loading feature of Parameters is important to you, or is
                              there another feature you'd like to see that such a design would
                              enable?

                              David

                              On Mon, Jun 15, 2009 at 1:39 PM, Daniel
                              Brolund<daniel.brolund@...> wrote:
                              > Hi David,
                              >
                              > The motivation would be when you want to decorate with runtime data,
                              > especially lazily loaded data, like for Parameterized.
                              >
                              > If you look a bit broader, you could decorate with assertions,
                              > assumptions and more as sub-test information. That might not be a good
                              > idea, but it is a thought.
                              >
                              > I'm not sure how to do it with an Interceptor (I'm not up to speed there
                              > yet). Could you make a sketch on your thoughts?
                              >
                              > Cheers
                              > Daniel
                              >
                              >
                              > On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                              >>
                              >>
                              >> Daniel,
                              >>
                              >> Can you explain the motivation behind such a change? If it's simply a
                              >> desire to use Interceptors to influence test descriptions, I'd rather
                              >> introduce a new, describe-time extension.
                              >>
                              >> David Saff
                              >>
                              >> On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                              >> Brolund<daniel.brolund@...> wrote:
                              >> > Hi guys,
                              >> >
                              >> > Would it be possible that the description is built up in two
                              >> "phases".
                              >> > 1) before running the tests (as today) to create a "skeleton"
                              >> > 2) while running the tests more "flesh" can be added, e.g.
                              >> parameters.
                              >> >
                              >> > I haven't dug in this recently, but I notice that when I add to the
                              >> > description while running the tests, in Eclipse they are shown as
                              >> > "Unrooted tests".
                              >> >
                              >> > One possibility is that I've missed something obvious, and in that
                              >> case,
                              >> > please tell me. :-)
                              >> >
                              >> > Cheers
                              >> > Daniel
                              >> >
                              >> > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                              >> >>
                              >> >>
                              >> >> No. Interceptors don't exist at describe-time, just run-time.
                              >> >>
                              >> >> The feature would be a good one, but it would need to live
                              >> elsewhere.
                              >> >>
                              >> >> David Saff
                              >> >>
                              >> >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...>
                              >> wrote:
                              >> >> > Could an interceptor be used to override how a parameterised test
                              >> is
                              >> >> described?
                              >> >> >
                              >> >> > --Nat
                              >> >> >
                              >> >> > On 08/06/2009, David Saff <david@...> wrote:
                              >> >> >> Kent,
                              >> >> >>
                              >> >> >> This has been proposed many times, usually in terms of changing
                              >> the
                              >> >> >> actual name in the description.
                              >> >> >>
                              >> >> >> Originally, I backed off because I thought users might want to
                              >> load
                              >> >> >> Parameterized values lazily, and having to eagerly grab them in
                              >> the
                              >> >> >> description phase would spoil that.  I believe that this
                              >> >> flexibility
                              >> >> >> was used precisely as many times as there are chickens with
                              >> lips,
                              >> >> so
                              >> >> >> the real world has spoken on that point.
                              >> >> >>
                              >> >> >> That said, there still is a concern that toStrings that produce
                              >> >> very
                              >> >> >> long, or oddly-formatted results, would make some third-party
                              >> >> add-ons
                              >> >> >> either unwieldy or directly broken (think about a toString()
                              >> with a
                              >> >> >> newline in it).
                              >> >> >>
                              >> >> >> So, I'm also curious in how other people answer this.  Thanks,
                              >> >> >>
                              >> >> >>    David Saff
                              >> >> >>
                              >> >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...>
                              >> wrote:
                              >> >> >>> All,
                              >> >> >>>
                              >> >> >>> Rapha has proposed the following change to the printing of
                              >> >> parameterized
                              >> >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                              >> he
                              >> >> would
                              >> >> >>> like
                              >> >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                              >> Does
                              >> >> anyone
                              >> >> >>> here
                              >> >> >>> (besides me in JUnit Max) have a dependency on parameterized
                              >> test
                              >> >> >>> printing?
                              >> >> >>> Would the values you use print nicely in this format?
                              >> >> >>>
                              >> >> >>> Regards,
                              >> >> >>>
                              >> >> >>> Kent Beck
                              >> >> >>> Three Rivers Institute
                              >> >> >>>
                              >> >> >>>
                              >> >> >>>
                              >> >> >>> ------------------------------------
                              >> >> >>>
                              >> >> >>> Yahoo! Groups Links
                              >> >> >>>
                              >> >> >>>
                              >> >> >>>
                              >> >> >>>
                              >> >> >>
                              >> >> >
                              >> >> >
                              >> >> > --
                              >> >> > http://www.natpryce.com
                              >> >> >
                              >> >> >
                              >> >> > ------------------------------------
                              >> >> >
                              >> >> > Yahoo! Groups Links
                              >> >> >
                              >> >> >
                              >> >> >
                              >> >> >
                              >> >>
                              >> >>
                              >> >>
                              >> >>
                              >> > --
                              >> > ----------------------------------------------
                              >> > Daniel Brolund
                              >> >
                              >> > Agical AB
                              >> > Västerlånggatan 79, 2 tr
                              >> > 111 29 Stockholm, SWEDEN
                              >> > http://www.agical.com
                              >> >
                              >> > mobile:  +46 708 754 002
                              >> > e-mail:  daniel.brolund@...
                              >> > blog:    http://danielbrolund.wordpress.com
                              >> > twitter: danielbrolund
                              >> >
                              >> >
                              >> >
                              >> >
                              >> > ------------------------------------
                              >> >
                              >> > Yahoo! Groups Links
                              >> >
                              >> >
                              >> >
                              >> >
                              >>
                              >>
                              >>
                              >>
                              > --
                              > ----------------------------------------------
                              > Daniel Brolund
                              >
                              > Agical AB
                              > Västerlånggatan 79, 2 tr
                              > 111 29 Stockholm, SWEDEN
                              > http://www.agical.com
                              >
                              > mobile:  +46 708 754 002
                              > e-mail:  daniel.brolund@...
                              > blog:    http://danielbrolund.wordpress.com
                              > twitter: danielbrolund
                              >
                              >
                              >
                              >
                              > ------------------------------------
                              >
                              > Yahoo! Groups Links
                              >
                              >
                              >
                              >
                            • David Saff
                              ... The reasoning is that since these are runtime objects found through reflection, we really don t have anything better to connect a test in the last run to a
                              Message 14 of 21 , Jun 18, 2009
                              • 0 Attachment
                                On Mon, Jun 15, 2009 at 7:23 PM, P Baker<me@...> wrote:
                                > As this situation has recently effected our used of JUnit, what is the
                                > reasoning behind using the test name as a primary key? Coming from a
                                > database background, folks usually recommend using artificial keys.

                                The reasoning is that since these are runtime objects found through
                                reflection, we really don't have anything better to connect a test in
                                the last run to a test in this run. Does another solution come to
                                mind?

                                > In addition to allowing lazy loading, the added complexity might allow
                                > future flexibility and as Daniel mentioned, arbitrary attributes to be
                                > added. I'm particularly interested in lazy loading, however, what are your
                                > thoughts on incorporating that functionality in JUnit4's architecture?

                                Can you be more specific what lazy loading would mean for you?

                                David Saff

                                >
                                > Phill
                                >
                                > On 6/15/09, Daniel Brolund <daniel.brolund@...> wrote:
                                >>
                                >>
                                >>
                                >> Hi David,
                                >>
                                >> The motivation would be when you want to decorate with runtime data,
                                >> especially lazily loaded data, like for Parameterized.
                                >>
                                >> If you look a bit broader, you could decorate with assertions,
                                >> assumptions and more as sub-test information. That might not be a good
                                >> idea, but it is a thought.
                                >>
                                >> I'm not sure how to do it with an Interceptor (I'm not up to speed there
                                >> yet). Could you make a sketch on your thoughts?
                                >>
                                >> Cheers
                                >> Daniel
                                >>
                                >>
                                >> On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                                >> >
                                >> >
                                >> > Daniel,
                                >> >
                                >> > Can you explain the motivation behind such a change? If it's simply a
                                >> > desire to use Interceptors to influence test descriptions, I'd rather
                                >> > introduce a new, describe-time extension.
                                >> >
                                >> > David Saff
                                >> >
                                >> > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                                >> > Brolund<daniel.brolund@... <daniel.brolund%40agical.com>> wrote:
                                >> > > Hi guys,
                                >> > >
                                >> > > Would it be possible that the description is built up in two
                                >> > "phases".
                                >> > > 1) before running the tests (as today) to create a "skeleton"
                                >> > > 2) while running the tests more "flesh" can be added, e.g.
                                >> > parameters.
                                >> > >
                                >> > > I haven't dug in this recently, but I notice that when I add to the
                                >> > > description while running the tests, in Eclipse they are shown as
                                >> > > "Unrooted tests".
                                >> > >
                                >> > > One possibility is that I've missed something obvious, and in that
                                >> > case,
                                >> > > please tell me. :-)
                                >> > >
                                >> > > Cheers
                                >> > > Daniel
                                >> > >
                                >> > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                                >> > >>
                                >> > >>
                                >> > >> No. Interceptors don't exist at describe-time, just run-time.
                                >> > >>
                                >> > >> The feature would be a good one, but it would need to live
                                >> > elsewhere.
                                >> > >>
                                >> > >> David Saff
                                >> > >>
                                >> > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...<nat.pryce%40gmail.com>
                                >> >
                                >> > wrote:
                                >> > >> > Could an interceptor be used to override how a parameterised test
                                >> > is
                                >> > >> described?
                                >> > >> >
                                >> > >> > --Nat
                                >> > >> >
                                >> > >> > On 08/06/2009, David Saff <david@... <david%40saff.net>>
                                >> wrote:
                                >> > >> >> Kent,
                                >> > >> >>
                                >> > >> >> This has been proposed many times, usually in terms of changing
                                >> > the
                                >> > >> >> actual name in the description.
                                >> > >> >>
                                >> > >> >> Originally, I backed off because I thought users might want to
                                >> > load
                                >> > >> >> Parameterized values lazily, and having to eagerly grab them in
                                >> > the
                                >> > >> >> description phase would spoil that. I believe that this
                                >> > >> flexibility
                                >> > >> >> was used precisely as many times as there are chickens with
                                >> > lips,
                                >> > >> so
                                >> > >> >> the real world has spoken on that point.
                                >> > >> >>
                                >> > >> >> That said, there still is a concern that toStrings that produce
                                >> > >> very
                                >> > >> >> long, or oddly-formatted results, would make some third-party
                                >> > >> add-ons
                                >> > >> >> either unwieldy or directly broken (think about a toString()
                                >> > with a
                                >> > >> >> newline in it).
                                >> > >> >>
                                >> > >> >> So, I'm also curious in how other people answer this. Thanks,
                                >> > >> >>
                                >> > >> >> David Saff
                                >> > >> >>
                                >> > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...<kentb%40earthlink.net>
                                >> >
                                >> > wrote:
                                >> > >> >>> All,
                                >> > >> >>>
                                >> > >> >>> Rapha has proposed the following change to the printing of
                                >> > >> parameterized
                                >> > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                                >> > he
                                >> > >> would
                                >> > >> >>> like
                                >> > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                                >> > Does
                                >> > >> anyone
                                >> > >> >>> here
                                >> > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                                >> > test
                                >> > >> >>> printing?
                                >> > >> >>> Would the values you use print nicely in this format?
                                >> > >> >>>
                                >> > >> >>> Regards,
                                >> > >> >>>
                                >> > >> >>> Kent Beck
                                >> > >> >>> Three Rivers Institute
                                >> > >> >>>
                                >> > >> >>>
                                >> > >> >>>
                                >> > >> >>> ------------------------------------
                                >> > >> >>>
                                >> > >> >>> Yahoo! Groups Links
                                >> > >> >>>
                                >> > >> >>>
                                >> > >> >>>
                                >> > >> >>>
                                >> > >> >>
                                >> > >> >
                                >> > >> >
                                >> > >> > --
                                >> > >> > http://www.natpryce.com
                                >> > >> >
                                >> > >> >
                                >> > >> > ------------------------------------
                                >> > >> >
                                >> > >> > Yahoo! Groups Links
                                >> > >> >
                                >> > >> >
                                >> > >> >
                                >> > >> >
                                >> > >>
                                >> > >>
                                >> > >>
                                >> > >>
                                >> > > --
                                >> > > ----------------------------------------------
                                >> > > Daniel Brolund
                                >> > >
                                >> > > Agical AB
                                >> > > Västerlånggatan 79, 2 tr
                                >> > > 111 29 Stockholm, SWEDEN
                                >> > > http://www.agical.com
                                >> > >
                                >> > > mobile: +46 708 754 002
                                >> > > e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                >> > > blog: http://danielbrolund.wordpress.com
                                >> > > twitter: danielbrolund
                                >> > >
                                >> > >
                                >> > >
                                >> > >
                                >> > > ------------------------------------
                                >> > >
                                >> > > Yahoo! Groups Links
                                >> > >
                                >> > >
                                >> > >
                                >> > >
                                >> >
                                >> >
                                >> >
                                >> >
                                >> --
                                >> ----------------------------------------------
                                >> Daniel Brolund
                                >>
                                >> Agical AB
                                >> Västerlånggatan 79, 2 tr
                                >> 111 29 Stockholm, SWEDEN
                                >> http://www.agical.com
                                >>
                                >> mobile: +46 708 754 002
                                >> e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                >> blog: http://danielbrolund.wordpress.com
                                >> twitter: danielbrolund
                                >>
                                >>
                                >>
                                >
                                >
                                > [Non-text portions of this message have been removed]
                                >
                                >
                                >
                                > ------------------------------------
                                >
                                > Yahoo! Groups Links
                                >
                                >
                                >
                                >
                              • David Saff
                                Phil, Can you explain what you want to do from a feature perspective? David Saff
                                Message 15 of 21 , Jun 18, 2009
                                • 0 Attachment
                                  Phil,

                                  Can you explain what you want to do from a feature perspective?

                                  David Saff

                                  On Wed, Jun 17, 2009 at 9:06 PM, P Baker<me@...> wrote:
                                  > David, in looking at the architecture for @BeforeClass, @AfterClass and
                                  > @Parameters, and the patches on github for @BeforeParameterize and
                                  > @AfterParameterize, I'm curious why the before and after class methods are
                                  > run as part of the class block?
                                  >
                                  > After struggling with finding a way to put @Paramerize after the
                                  > @BeforeClass calls, can you explain the reasoning behind putting those
                                  > annotations calls in the test. In fact, they seem extraneous to the test
                                  > itself, and rather like overhead to the test case. Why aren't they run in a
                                  > fashion similar to @Parameterize, in methods outside of the class block in
                                  > ParentRunner? It seems like with the introduction of interceptors, and the
                                  > addition of their permutations of the testing chain, it might be a good idea
                                  > to run those methods calls right in Parent Runner?
                                  >
                                  > Any comments would be appreciated. Thanks,
                                  > Phill Baker
                                  >
                                  > On 6/15/09, P Baker <me@...> wrote:
                                  >>
                                  >> As this situation has recently effected our used of JUnit, what is the
                                  >> reasoning behind using the test name as a primary key? Coming from a
                                  >> database background, folks usually recommend using artificial keys.
                                  >>
                                  >> In addition to allowing lazy loading, the added complexity might allow
                                  >> future flexibility and as Daniel mentioned, arbitrary attributes to be
                                  >> added. I'm particularly interested in lazy loading, however, what are your
                                  >> thoughts on incorporating that functionality in JUnit4's architecture?
                                  >>
                                  >> Phill
                                  >>
                                  >> On 6/15/09, Daniel Brolund <daniel.brolund@...> wrote:
                                  >>>
                                  >>>
                                  >>>
                                  >>> Hi David,
                                  >>>
                                  >>> The motivation would be when you want to decorate with runtime data,
                                  >>> especially lazily loaded data, like for Parameterized.
                                  >>>
                                  >>> If you look a bit broader, you could decorate with assertions,
                                  >>> assumptions and more as sub-test information. That might not be a good
                                  >>> idea, but it is a thought.
                                  >>>
                                  >>> I'm not sure how to do it with an Interceptor (I'm not up to speed there
                                  >>> yet). Could you make a sketch on your thoughts?
                                  >>>
                                  >>> Cheers
                                  >>> Daniel
                                  >>>
                                  >>>
                                  >>> On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                                  >>> >
                                  >>> >
                                  >>> > Daniel,
                                  >>> >
                                  >>> > Can you explain the motivation behind such a change? If it's simply a
                                  >>> > desire to use Interceptors to influence test descriptions, I'd rather
                                  >>> > introduce a new, describe-time extension.
                                  >>> >
                                  >>> > David Saff
                                  >>> >
                                  >>> > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                                  >>> > Brolund<daniel.brolund@... <daniel.brolund%40agical.com>> wrote:
                                  >>> > > Hi guys,
                                  >>> > >
                                  >>> > > Would it be possible that the description is built up in two
                                  >>> > "phases".
                                  >>> > > 1) before running the tests (as today) to create a "skeleton"
                                  >>> > > 2) while running the tests more "flesh" can be added, e.g.
                                  >>> > parameters.
                                  >>> > >
                                  >>> > > I haven't dug in this recently, but I notice that when I add to the
                                  >>> > > description while running the tests, in Eclipse they are shown as
                                  >>> > > "Unrooted tests".
                                  >>> > >
                                  >>> > > One possibility is that I've missed something obvious, and in that
                                  >>> > case,
                                  >>> > > please tell me. :-)
                                  >>> > >
                                  >>> > > Cheers
                                  >>> > > Daniel
                                  >>> > >
                                  >>> > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                                  >>> > >>
                                  >>> > >>
                                  >>> > >> No. Interceptors don't exist at describe-time, just run-time.
                                  >>> > >>
                                  >>> > >> The feature would be a good one, but it would need to live
                                  >>> > elsewhere.
                                  >>> > >>
                                  >>> > >> David Saff
                                  >>> > >>
                                  >>> > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...<nat.pryce%40gmail.com>
                                  >>> >
                                  >>> > wrote:
                                  >>> > >> > Could an interceptor be used to override how a parameterised test
                                  >>> > is
                                  >>> > >> described?
                                  >>> > >> >
                                  >>> > >> > --Nat
                                  >>> > >> >
                                  >>> > >> > On 08/06/2009, David Saff <david@... <david%40saff.net>>
                                  >>> wrote:
                                  >>> > >> >> Kent,
                                  >>> > >> >>
                                  >>> > >> >> This has been proposed many times, usually in terms of changing
                                  >>> > the
                                  >>> > >> >> actual name in the description.
                                  >>> > >> >>
                                  >>> > >> >> Originally, I backed off because I thought users might want to
                                  >>> > load
                                  >>> > >> >> Parameterized values lazily, and having to eagerly grab them in
                                  >>> > the
                                  >>> > >> >> description phase would spoil that. I believe that this
                                  >>> > >> flexibility
                                  >>> > >> >> was used precisely as many times as there are chickens with
                                  >>> > lips,
                                  >>> > >> so
                                  >>> > >> >> the real world has spoken on that point.
                                  >>> > >> >>
                                  >>> > >> >> That said, there still is a concern that toStrings that produce
                                  >>> > >> very
                                  >>> > >> >> long, or oddly-formatted results, would make some third-party
                                  >>> > >> add-ons
                                  >>> > >> >> either unwieldy or directly broken (think about a toString()
                                  >>> > with a
                                  >>> > >> >> newline in it).
                                  >>> > >> >>
                                  >>> > >> >> So, I'm also curious in how other people answer this. Thanks,
                                  >>> > >> >>
                                  >>> > >> >> David Saff
                                  >>> > >> >>
                                  >>> > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...<kentb%40earthlink.net>
                                  >>> >
                                  >>> > wrote:
                                  >>> > >> >>> All,
                                  >>> > >> >>>
                                  >>> > >> >>> Rapha has proposed the following change to the printing of
                                  >>> > >> parameterized
                                  >>> > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                                  >>> > he
                                  >>> > >> would
                                  >>> > >> >>> like
                                  >>> > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                                  >>> > Does
                                  >>> > >> anyone
                                  >>> > >> >>> here
                                  >>> > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                                  >>> > test
                                  >>> > >> >>> printing?
                                  >>> > >> >>> Would the values you use print nicely in this format?
                                  >>> > >> >>>
                                  >>> > >> >>> Regards,
                                  >>> > >> >>>
                                  >>> > >> >>> Kent Beck
                                  >>> > >> >>> Three Rivers Institute
                                  >>> > >> >>>
                                  >>> > >> >>>
                                  >>> > >> >>>
                                  >>> > >> >>> ------------------------------------
                                  >>> > >> >>>
                                  >>> > >> >>> Yahoo! Groups Links
                                  >>> > >> >>>
                                  >>> > >> >>>
                                  >>> > >> >>>
                                  >>> > >> >>>
                                  >>> > >> >>
                                  >>> > >> >
                                  >>> > >> >
                                  >>> > >> > --
                                  >>> > >> > http://www.natpryce.com
                                  >>> > >> >
                                  >>> > >> >
                                  >>> > >> > ------------------------------------
                                  >>> > >> >
                                  >>> > >> > Yahoo! Groups Links
                                  >>> > >> >
                                  >>> > >> >
                                  >>> > >> >
                                  >>> > >> >
                                  >>> > >>
                                  >>> > >>
                                  >>> > >>
                                  >>> > >>
                                  >>> > > --
                                  >>> > > ----------------------------------------------
                                  >>> > > Daniel Brolund
                                  >>> > >
                                  >>> > > Agical AB
                                  >>> > > Västerlånggatan 79, 2 tr
                                  >>> > > 111 29 Stockholm, SWEDEN
                                  >>> > > http://www.agical.com
                                  >>> > >
                                  >>> > > mobile: +46 708 754 002
                                  >>> > > e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                  >>> > > blog: http://danielbrolund.wordpress.com
                                  >>> > > twitter: danielbrolund
                                  >>> > >
                                  >>> > >
                                  >>> > >
                                  >>> > >
                                  >>> > > ------------------------------------
                                  >>> > >
                                  >>> > > Yahoo! Groups Links
                                  >>> > >
                                  >>> > >
                                  >>> > >
                                  >>> > >
                                  >>> >
                                  >>> >
                                  >>> >
                                  >>> >
                                  >>> --
                                  >>> ----------------------------------------------
                                  >>> Daniel Brolund
                                  >>>
                                  >>> Agical AB
                                  >>> Västerlånggatan 79, 2 tr
                                  >>> 111 29 Stockholm, SWEDEN
                                  >>> http://www.agical.com
                                  >>>
                                  >>> mobile: +46 708 754 002
                                  >>> e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                  >>> blog: http://danielbrolund.wordpress.com
                                  >>> twitter: danielbrolund
                                  >>>
                                  >>>
                                  >>>
                                  >>
                                  >>
                                  >
                                  >
                                  > [Non-text portions of this message have been removed]
                                  >
                                  >
                                  >
                                  > ------------------------------------
                                  >
                                  > Yahoo! Groups Links
                                  >
                                  >
                                  >
                                  >
                                • P Baker
                                  From a feature perspective, hopefully, nothing is added. I think @BeforeParameterize and @AfterParameterize is a workaround ignoring the root of the issue. I
                                  Message 16 of 21 , Jun 18, 2009
                                  • 0 Attachment
                                    From a feature perspective, hopefully, nothing is added. I think
                                    @BeforeParameterize and @AfterParameterize is a workaround ignoring
                                    the root of the issue.

                                    I think rearranging some of the logic would work. The use case is
                                    this: @Parameters connects to a database to populate an array of
                                    parameters, however, the database connection is instantiated in a
                                    @BeforeClass method. This is my definition of 'lazy loading', the
                                    parameters are not known at compile time, but only at run time.

                                    Right now I've subclassed Parameterized to add to the class block to
                                    accomplish this (and why I've moved the creation of runners out of the
                                    constructor of Parameterized in my github fork) - however this breaks
                                    the ability to generate descriptions before the testing begins.

                                    What I would like (and expected to happen, I was mildly surprised when
                                    it was not true and undocumented - my javadoc additions to
                                    Parameterized correct this), is for @BeforeClass to actually run
                                    before the rest of the class. Order of execution would be (excluding
                                    interceptors):
                                    @BeforeClass [<- moving @BeforeClass here]
                                    @Parameters
                                    [@Before class is currently here]
                                    @Setup
                                    @Test
                                    @Teardown
                                    @AfterClass

                                    Your explanation of why @BeforeClass and @AfterClass are run when they
                                    are makes sense, and seems like it applies to @Parameters as well. My
                                    ideas center around either moving description generation, notifier
                                    generation, or some similar change. If there's a simple way to do
                                    this, please let me know.

                                    Phill

                                    On 6/18/09, David Saff <david@...> wrote:
                                    >
                                    >
                                    >
                                    >
                                    >
                                    >
                                    >
                                    >
                                    > Phil,
                                    >
                                    > Can you explain what you want to do from a feature perspective?

                                    >
                                    >
                                    >
                                    >
                                    >
                                    >
                                    > David Saff
                                    >
                                    >
                                    > On Wed, Jun 17, 2009 at 9:06 PM, P Baker<me@...> wrote:
                                    > > David, in looking at the architecture for @BeforeClass, @AfterClass and
                                    > > @Parameters, and the patches on github for @BeforeParameterize and
                                    > > @AfterParameterize, I'm curious why the before and after class methods are
                                    > > run as part of the class block?
                                    > >
                                    > > After struggling with finding a way to put @Paramerize after the
                                    > > @BeforeClass calls, can you explain the reasoning behind putting those
                                    > > annotations calls in the test. In fact, they seem extraneous to the test
                                    > > itself, and rather like overhead to the test case. Why aren't they run in a
                                    > > fashion similar to @Parameterize, in methods outside of the class block in
                                    > > ParentRunner? It seems like with the introduction of interceptors, and the
                                    > > addition of their permutations of the testing chain, it might be a good idea
                                    > > to run those methods calls right in Parent Runner?
                                    > >
                                    > > Any comments would be appreciated. Thanks,
                                    > > Phill Baker
                                    > >
                                    > > On 6/15/09, P Baker <me@...> wrote:
                                    > >>
                                    > >> As this situation has recently effected our used of JUnit, what is the
                                    > >> reasoning behind using the test name as a primary key? Coming from a
                                    > >> database background, folks usually recommend using artificial keys.
                                    > >>
                                    > >> In addition to allowing lazy loading, the added complexity might allow
                                    > >> future flexibility and as Daniel mentioned, arbitrary attributes to be
                                    > >> added. I'm particularly interested in lazy loading, however, what are your
                                    > >> thoughts on incorporating that functionality in JUnit4's architecture?
                                    > >>
                                    > >> Phill
                                    > >>
                                    > >> On 6/15/09, Daniel Brolund <daniel.brolund@...> wrote:
                                    > >>>
                                    > >>>
                                    > >>>
                                    > >>> Hi David,
                                    > >>>
                                    > >>> The motivation would be when you want to decorate with runtime data,
                                    > >>> especially lazily loaded data, like for Parameterized.
                                    > >>>
                                    > >>> If you look a bit broader, you could decorate with assertions,
                                    > >>> assumptions and more as sub-test information. That might not be a good
                                    > >>> idea, but it is a thought.
                                    > >>>
                                    > >>> I'm not sure how to do it with an Interceptor (I'm not up to speed there
                                    > >>> yet). Could you make a sketch on your thoughts?
                                    > >>>
                                    > >>> Cheers
                                    > >>> Daniel
                                    > >>>
                                    > >>>
                                    > >>> On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                                    > >>> >
                                    > >>> >
                                    > >>> > Daniel,
                                    > >>> >
                                    > >>> > Can you explain the motivation behind such a change? If it's simply a
                                    > >>> > desire to use Interceptors to influence test descriptions, I'd rather
                                    > >>> > introduce a new, describe-time extension.
                                    > >>> >
                                    > >>> > David Saff
                                    > >>> >
                                    > >>> > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                                    > >>> > Brolund<daniel.brolund@... <daniel.brolund%40agical.com>> wrote:
                                    > >>> > > Hi guys,
                                    > >>> > >
                                    > >>> > > Would it be possible that the description is built up in two
                                    > >>> > "phases".
                                    > >>> > > 1) before running the tests (as today) to create a "skeleton"
                                    > >>> > > 2) while running the tests more "flesh" can be added, e.g.
                                    > >>> > parameters.
                                    > >>> > >
                                    > >>> > > I haven't dug in this recently, but I notice that when I add to the
                                    > >>> > > description while running the tests, in Eclipse they are shown as
                                    > >>> > > "Unrooted tests".
                                    > >>> > >
                                    > >>> > > One possibility is that I've missed something obvious, and in that
                                    > >>> > case,
                                    > >>> > > please tell me. :-)
                                    > >>> > >
                                    > >>> > > Cheers
                                    > >>> > > Daniel
                                    > >>> > >
                                    > >>> > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                                    > >>> > >>
                                    > >>> > >>
                                    > >>> > >> No. Interceptors don't exist at describe-time, just run-time.
                                    > >>> > >>
                                    > >>> > >> The feature would be a good one, but it would need to live
                                    > >>> > elsewhere.
                                    > >>> > >>
                                    > >>> > >> David Saff
                                    > >>> > >>
                                    > >>> > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...<nat.pryce%40gmail.com>
                                    > >>> >
                                    > >>> > wrote:
                                    > >>> > >> > Could an interceptor be used to override how a parameterised test
                                    > >>> > is
                                    > >>> > >> described?
                                    > >>> > >> >
                                    > >>> > >> > --Nat
                                    > >>> > >> >
                                    > >>> > >> > On 08/06/2009, David Saff <david@... <david%40saff.net>>
                                    > >>> wrote:
                                    > >>> > >> >> Kent,
                                    > >>> > >> >>
                                    > >>> > >> >> This has been proposed many times, usually in terms of changing
                                    > >>> > the
                                    > >>> > >> >> actual name in the description.
                                    > >>> > >> >>
                                    > >>> > >> >> Originally, I backed off because I thought users might want to
                                    > >>> > load
                                    > >>> > >> >> Parameterized values lazily, and having to eagerly grab them in
                                    > >>> > the
                                    > >>> > >> >> description phase would spoil that. I believe that this
                                    > >>> > >> flexibility
                                    > >>> > >> >> was used precisely as many times as there are chickens with
                                    > >>> > lips,
                                    > >>> > >> so
                                    > >>> > >> >> the real world has spoken on that point.
                                    > >>> > >> >>
                                    > >>> > >> >> That said, there still is a concern that toStrings that produce
                                    > >>> > >> very
                                    > >>> > >> >> long, or oddly-formatted results, would make some third-party
                                    > >>> > >> add-ons
                                    > >>> > >> >> either unwieldy or directly broken (think about a toString()
                                    > >>> > with a
                                    > >>> > >> >> newline in it).
                                    > >>> > >> >>
                                    > >>> > >> >> So, I'm also curious in how other people answer this. Thanks,
                                    > >>> > >> >>
                                    > >>> > >> >> David Saff
                                    > >>> > >> >>
                                    > >>> > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...<kentb%40earthlink.net>
                                    >
                                    > >>> >
                                    > >>> > wrote:
                                    > >>> > >> >>> All,
                                    > >>> > >> >>>
                                    > >>> > >> >>> Rapha has proposed the following change to the printing of
                                    > >>> > >> parameterized
                                    > >>> > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                                    > >>> > he
                                    > >>> > >> would
                                    > >>> > >> >>> like
                                    > >>> > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                                    > >>> > Does
                                    > >>> > >> anyone
                                    > >>> > >> >>> here
                                    > >>> > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                                    > >>> > test
                                    > >>> > >> >>> printing?
                                    > >>> > >> >>> Would the values you use print nicely in this format?
                                    > >>> > >> >>>
                                    > >>> > >> >>> Regards,
                                    > >>> > >> >>>
                                    > >>> > >> >>> Kent Beck
                                    > >>> > >> >>> Three Rivers Institute
                                    > >>> > >> >>>
                                    > >>> > >> >>>
                                    > >>> > >> >>>
                                    > >>> > >> >>> ------------------------------------
                                    > >>> > >> >>>
                                    > >>> > >> >>> Yahoo! Groups Links
                                    > >>> > >> >>>
                                    > >>> > >> >>>
                                    > >>> > >> >>>
                                    > >>> > >> >>>
                                    > >>> > >> >>
                                    > >>> > >> >
                                    > >>> > >> >
                                    > >>> > >> > --
                                    > >>> > >> > http://www.natpryce.com
                                    > >>> > >> >
                                    > >>> > >> >
                                    > >>> > >> > ------------------------------------
                                    > >>> > >> >
                                    > >>> > >> > Yahoo! Groups Links
                                    > >>> > >> >
                                    > >>> > >> >
                                    > >>> > >> >
                                    > >>> > >> >
                                    > >>> > >>
                                    > >>> > >>
                                    > >>> > >>
                                    > >>> > >>
                                    > >>> > > --
                                    > >>> > > ----------------------------------------------
                                    > >>> > > Daniel Brolund
                                    > >>> > >
                                    > >>> > > Agical AB
                                    > >>> > > Västerlånggatan 79, 2 tr
                                    > >>> > > 111 29 Stockholm, SWEDEN
                                    > >>> > > http://www.agical.com
                                    > >>> > >
                                    > >>> > > mobile: +46 708 754 002
                                    > >>> > > e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                    > >>> > > blog: http://danielbrolund.wordpress.com
                                    > >>> > > twitter: danielbrolund
                                    > >>> > >
                                    > >>> > >
                                    > >>> > >
                                    > >>> > >
                                    > >>> > > ------------------------------------
                                    > >>> > >
                                    > >>> > > Yahoo! Groups Links
                                    > >>> > >
                                    > >>> > >
                                    > >>> > >
                                    > >>> > >
                                    > >>> >
                                    > >>> >
                                    > >>> >
                                    > >>> >
                                    > >>> --
                                    > >>> ----------------------------------------------
                                    > >>> Daniel Brolund
                                    > >>>
                                    > >>> Agical AB
                                    > >>> Västerlånggatan 79, 2 tr
                                    > >>> 111 29 Stockholm, SWEDEN
                                    > >>> http://www.agical.com
                                    > >>>
                                    > >>> mobile: +46 708 754 002
                                    > >>> e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                    > >>> blog: http://danielbrolund.wordpress.com
                                    > >>> twitter: danielbrolund
                                    > >>>
                                    > >>>
                                    > >>>
                                    > >>
                                    > >>
                                    > >
                                    > >
                                    > > [Non-text portions of this message have been removed]
                                    > >
                                    > >
                                    > >
                                    > > ------------------------------------
                                    > >
                                    > > Yahoo! Groups Links
                                    > >
                                    > >
                                    > >
                                    > >
                                    >
                                    >
                                    >
                                    >
                                  • Cédric Beust ♔
                                    ... FYI, TestNG implements that by allowing a data provider to return an Iterator instead of an array, which allows you to defer the creation of the parameters
                                    Message 17 of 21 , Jun 18, 2009
                                    • 0 Attachment
                                      On Thu, Jun 18, 2009 at 3:53 PM, P Baker <me@...> wrote:

                                      > I think rearranging some of the logic would work. The use case is
                                      > this: @Parameters connects to a database to populate an array of
                                      > parameters, however, the database connection is instantiated in a
                                      > @BeforeClass method. This is my definition of 'lazy loading', the
                                      > parameters are not known at compile time, but only at run time.
                                      >
                                      FYI, TestNG implements that by allowing a data provider to return an
                                      Iterator instead of an array, which allows you to defer the creation of the
                                      parameters until just before the test method is invoked.

                                      Maybe the same idea can be implemented in JUnit.

                                      --
                                      ***Cédric
                                      *


                                      [Non-text portions of this message have been removed]
                                    • P Baker
                                      Maybe, but it seems like with JUnit s Description technique, for all tests to be rooted , they must be described before the test is initiated. Hence the
                                      Message 18 of 21 , Jun 18, 2009
                                      • 0 Attachment
                                        Maybe, but it seems like with JUnit's Description technique, for all tests
                                        to be 'rooted', they must be described before the test is initiated. Hence
                                        the number of tests that will be executed must also be known. Right now,
                                        Requests and Descriptions are immutable, if they either became modifiable or
                                        a subclass that was marked as 'incomplete' existed, then that would be
                                        great.

                                        Phill

                                        On 6/18/09, Cédric Beust ♔ <cbeust@...> wrote:
                                        >
                                        >
                                        >
                                        > On Thu, Jun 18, 2009 at 3:53 PM, P Baker <me@...<me%40retrodict.com>>
                                        > wrote:
                                        >
                                        > > I think rearranging some of the logic would work. The use case is
                                        > > this: @Parameters connects to a database to populate an array of
                                        > > parameters, however, the database connection is instantiated in a
                                        > > @BeforeClass method. This is my definition of 'lazy loading', the
                                        > > parameters are not known at compile time, but only at run time.
                                        > >
                                        > FYI, TestNG implements that by allowing a data provider to return an
                                        > Iterator instead of an array, which allows you to defer the creation of the
                                        > parameters until just before the test method is invoked.
                                        >
                                        > Maybe the same idea can be implemented in JUnit.
                                        >
                                        > --
                                        > ***Cédric
                                        > *
                                        >
                                        > [Non-text portions of this message have been removed]
                                        >
                                        >
                                        >


                                        [Non-text portions of this message have been removed]
                                      • David Saff
                                        ... Got it. This was indeed the use case that the current design was meant to be open to, if not directly supporting. Discussions over the last few years had
                                        Message 19 of 21 , Jun 19, 2009
                                        • 0 Attachment
                                          On Thu, Jun 18, 2009 at 3:53 PM, P Baker<me@...> wrote:
                                          > From a feature perspective, hopefully, nothing is added. I think
                                          > @BeforeParameterize and @AfterParameterize is a workaround ignoring
                                          > the root of the issue.
                                          >
                                          > I think rearranging some of the logic would work. The use case is
                                          > this: @Parameters connects to a database to populate an array of
                                          > parameters, however, the database connection is instantiated in a
                                          > @BeforeClass method. This is my definition of 'lazy loading', the
                                          > parameters are not known at compile time, but only at run time.

                                          Got it. This was indeed the use case that the current design was
                                          meant to be open to, if not directly supporting. Discussions over the
                                          last few years had convinced me that no one would ever use such
                                          flexibility. The current me is glad to be proven wrong (and the me
                                          from ~4 years ago is glad to be proven right).

                                          > Right now I've subclassed Parameterized to add to the class block to
                                          > accomplish this (and why I've moved the creation of runners out of the
                                          > constructor of Parameterized in my github fork) - however this breaks
                                          > the ability to generate descriptions before the testing begins.

                                          Moving the runner creation out of the Parameterized constructor is
                                          exactly the right thing to do.

                                          > What I would like (and expected to happen, I was mildly surprised when
                                          > it was not true and undocumented - my javadoc additions to
                                          > Parameterized correct this), is for @BeforeClass to actually run
                                          > before the rest of the class. Order of execution would be (excluding
                                          > interceptors):
                                          > @BeforeClass [<- moving @BeforeClass here]
                                          > @Parameters
                                          > [@Before class is currently here]
                                          > @Setup
                                          > @Test
                                          > @Teardown
                                          > @AfterClass

                                          That makes some sense. The intent was that Parameterized would feel
                                          like you had created multiple copies of the class, each with its own
                                          @BeforeClass, etc. I can see how that's questionable from the point
                                          of view of the principle of least surprise.

                                          > Your explanation of why @BeforeClass and @AfterClass are run when they
                                          > are makes sense, and seems like it applies to @Parameters as well. My
                                          > ideas center around either moving description generation, notifier
                                          > generation, or some similar change. If there's a simple way to do
                                          > this, please let me know.

                                          See my next mail.

                                          David

                                          >
                                          > Phill
                                          >
                                          > On 6/18/09, David Saff <david@...> wrote:
                                          >>
                                          >>
                                          >>
                                          >>
                                          >>
                                          >>
                                          >>
                                          >>
                                          >> Phil,
                                          >>
                                          >>  Can you explain what you want to do from a feature perspective?
                                          >
                                          >>
                                          >>
                                          >>
                                          >>
                                          >>
                                          >>
                                          >>  David Saff
                                          >>
                                          >>
                                          >>  On Wed, Jun 17, 2009 at 9:06 PM, P Baker<me@...> wrote:
                                          >>  > David, in looking at the architecture for @BeforeClass, @AfterClass and
                                          >>  > @Parameters, and the patches on github for @BeforeParameterize and
                                          >>  > @AfterParameterize, I'm curious why the before and after class methods are
                                          >>  > run as part of the class block?
                                          >>  >
                                          >>  > After struggling with finding a way to put @Paramerize after the
                                          >>  > @BeforeClass calls, can you explain the reasoning behind putting those
                                          >>  > annotations calls in the test. In fact, they seem extraneous to the test
                                          >>  > itself, and rather like overhead to the test case. Why aren't they run in a
                                          >>  > fashion similar to @Parameterize, in methods outside of the class block in
                                          >>  > ParentRunner? It seems like with the introduction of interceptors, and the
                                          >>  > addition of their permutations of the testing chain, it might be a good idea
                                          >>  > to run those methods calls right in Parent Runner?
                                          >>  >
                                          >>  > Any comments would be appreciated. Thanks,
                                          >>  > Phill Baker
                                          >>  >
                                          >>  > On 6/15/09, P Baker <me@...> wrote:
                                          >>  >>
                                          >>  >> As this situation has recently effected our used of JUnit, what is the
                                          >>  >> reasoning behind using the test name as a primary key? Coming from a
                                          >>  >> database background, folks usually recommend using artificial keys.
                                          >>  >>
                                          >>  >> In addition to allowing lazy loading, the added complexity might allow
                                          >>  >> future flexibility and as Daniel mentioned, arbitrary attributes to be
                                          >>  >> added. I'm particularly interested in lazy loading, however, what are your
                                          >>  >> thoughts on incorporating that functionality in JUnit4's architecture?
                                          >>  >>
                                          >>  >> Phill
                                          >>  >>
                                          >>  >> On 6/15/09, Daniel Brolund <daniel.brolund@...> wrote:
                                          >>  >>>
                                          >>  >>>
                                          >>  >>>
                                          >>  >>> Hi David,
                                          >>  >>>
                                          >>  >>> The motivation would be when you want to decorate with runtime data,
                                          >>  >>> especially lazily loaded data, like for Parameterized.
                                          >>  >>>
                                          >>  >>> If you look a bit broader, you could decorate with assertions,
                                          >>  >>> assumptions and more as sub-test information. That might not be a good
                                          >>  >>> idea, but it is a thought.
                                          >>  >>>
                                          >>  >>> I'm not sure how to do it with an Interceptor (I'm not up to speed there
                                          >>  >>> yet). Could you make a sketch on your thoughts?
                                          >>  >>>
                                          >>  >>> Cheers
                                          >>  >>> Daniel
                                          >>  >>>
                                          >>  >>>
                                          >>  >>> On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                                          >>  >>> >
                                          >>  >>> >
                                          >>  >>> > Daniel,
                                          >>  >>> >
                                          >>  >>> > Can you explain the motivation behind such a change? If it's simply a
                                          >>  >>> > desire to use Interceptors to influence test descriptions, I'd rather
                                          >>  >>> > introduce a new, describe-time extension.
                                          >>  >>> >
                                          >>  >>> > David Saff
                                          >>  >>> >
                                          >>  >>> > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                                          >>  >>> > Brolund<daniel.brolund@... <daniel.brolund%40agical.com>> wrote:
                                          >>  >>> > > Hi guys,
                                          >>  >>> > >
                                          >>  >>> > > Would it be possible that the description is built up in two
                                          >>  >>> > "phases".
                                          >>  >>> > > 1) before running the tests (as today) to create a "skeleton"
                                          >>  >>> > > 2) while running the tests more "flesh" can be added, e.g.
                                          >>  >>> > parameters.
                                          >>  >>> > >
                                          >>  >>> > > I haven't dug in this recently, but I notice that when I add to the
                                          >>  >>> > > description while running the tests, in Eclipse they are shown as
                                          >>  >>> > > "Unrooted tests".
                                          >>  >>> > >
                                          >>  >>> > > One possibility is that I've missed something obvious, and in that
                                          >>  >>> > case,
                                          >>  >>> > > please tell me. :-)
                                          >>  >>> > >
                                          >>  >>> > > Cheers
                                          >>  >>> > > Daniel
                                          >>  >>> > >
                                          >>  >>> > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                                          >>  >>> > >>
                                          >>  >>> > >>
                                          >>  >>> > >> No. Interceptors don't exist at describe-time, just run-time.
                                          >>  >>> > >>
                                          >>  >>> > >> The feature would be a good one, but it would need to live
                                          >>  >>> > elsewhere.
                                          >>  >>> > >>
                                          >>  >>> > >> David Saff
                                          >>  >>> > >>
                                          >>  >>> > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...<nat.pryce%40gmail.com>
                                          >>  >>> >
                                          >>  >>> > wrote:
                                          >>  >>> > >> > Could an interceptor be used to override how a parameterised test
                                          >>  >>> > is
                                          >>  >>> > >> described?
                                          >>  >>> > >> >
                                          >>  >>> > >> > --Nat
                                          >>  >>> > >> >
                                          >>  >>> > >> > On 08/06/2009, David Saff <david@... <david%40saff.net>>
                                          >>  >>> wrote:
                                          >>  >>> > >> >> Kent,
                                          >>  >>> > >> >>
                                          >>  >>> > >> >> This has been proposed many times, usually in terms of changing
                                          >>  >>> > the
                                          >>  >>> > >> >> actual name in the description.
                                          >>  >>> > >> >>
                                          >>  >>> > >> >> Originally, I backed off because I thought users might want to
                                          >>  >>> > load
                                          >>  >>> > >> >> Parameterized values lazily, and having to eagerly grab them in
                                          >>  >>> > the
                                          >>  >>> > >> >> description phase would spoil that. I believe that this
                                          >>  >>> > >> flexibility
                                          >>  >>> > >> >> was used precisely as many times as there are chickens with
                                          >>  >>> > lips,
                                          >>  >>> > >> so
                                          >>  >>> > >> >> the real world has spoken on that point.
                                          >>  >>> > >> >>
                                          >>  >>> > >> >> That said, there still is a concern that toStrings that produce
                                          >>  >>> > >> very
                                          >>  >>> > >> >> long, or oddly-formatted results, would make some third-party
                                          >>  >>> > >> add-ons
                                          >>  >>> > >> >> either unwieldy or directly broken (think about a toString()
                                          >>  >>> > with a
                                          >>  >>> > >> >> newline in it).
                                          >>  >>> > >> >>
                                          >>  >>> > >> >> So, I'm also curious in how other people answer this. Thanks,
                                          >>  >>> > >> >>
                                          >>  >>> > >> >> David Saff
                                          >>  >>> > >> >>
                                          >>  >>> > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...<kentb%40earthlink.net>
                                          >>
                                          >>  >>> >
                                          >>  >>> > wrote:
                                          >>  >>> > >> >>> All,
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>> Rapha has proposed the following change to the printing of
                                          >>  >>> > >> parameterized
                                          >>  >>> > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                                          >>  >>> > he
                                          >>  >>> > >> would
                                          >>  >>> > >> >>> like
                                          >>  >>> > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                                          >>  >>> > Does
                                          >>  >>> > >> anyone
                                          >>  >>> > >> >>> here
                                          >>  >>> > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                                          >>  >>> > test
                                          >>  >>> > >> >>> printing?
                                          >>  >>> > >> >>> Would the values you use print nicely in this format?
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>> Regards,
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>> Kent Beck
                                          >>  >>> > >> >>> Three Rivers Institute
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>> ------------------------------------
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>> Yahoo! Groups Links
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>>
                                          >>  >>> > >> >>
                                          >>  >>> > >> >
                                          >>  >>> > >> >
                                          >>  >>> > >> > --
                                          >>  >>> > >> > http://www.natpryce.com
                                          >>  >>> > >> >
                                          >>  >>> > >> >
                                          >>  >>> > >> > ------------------------------------
                                          >>  >>> > >> >
                                          >>  >>> > >> > Yahoo! Groups Links
                                          >>  >>> > >> >
                                          >>  >>> > >> >
                                          >>  >>> > >> >
                                          >>  >>> > >> >
                                          >>  >>> > >>
                                          >>  >>> > >>
                                          >>  >>> > >>
                                          >>  >>> > >>
                                          >>  >>> > > --
                                          >>  >>> > > ----------------------------------------------
                                          >>  >>> > > Daniel Brolund
                                          >>  >>> > >
                                          >>  >>> > > Agical AB
                                          >>  >>> > > Västerlånggatan 79, 2 tr
                                          >>  >>> > > 111 29 Stockholm, SWEDEN
                                          >>  >>> > > http://www.agical.com
                                          >>  >>> > >
                                          >>  >>> > > mobile: +46 708 754 002
                                          >>  >>> > > e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                          >>  >>> > > blog: http://danielbrolund.wordpress.com
                                          >>  >>> > > twitter: danielbrolund
                                          >>  >>> > >
                                          >>  >>> > >
                                          >>  >>> > >
                                          >>  >>> > >
                                          >>  >>> > > ------------------------------------
                                          >>  >>> > >
                                          >>  >>> > > Yahoo! Groups Links
                                          >>  >>> > >
                                          >>  >>> > >
                                          >>  >>> > >
                                          >>  >>> > >
                                          >>  >>> >
                                          >>  >>> >
                                          >>  >>> >
                                          >>  >>> >
                                          >>  >>> --
                                          >>  >>> ----------------------------------------------
                                          >>  >>> Daniel Brolund
                                          >>  >>>
                                          >>  >>> Agical AB
                                          >>  >>> Västerlånggatan 79, 2 tr
                                          >>  >>> 111 29 Stockholm, SWEDEN
                                          >>  >>> http://www.agical.com
                                          >>  >>>
                                          >>  >>> mobile: +46 708 754 002
                                          >>  >>> e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                          >>  >>> blog: http://danielbrolund.wordpress.com
                                          >>  >>> twitter: danielbrolund
                                          >>  >>>
                                          >>  >>>
                                          >>  >>>
                                          >>  >>
                                          >>  >>
                                          >>  >
                                          >>  >
                                          >>  > [Non-text portions of this message have been removed]
                                          >>  >
                                          >>  >
                                          >>  >
                                          >>  > ------------------------------------
                                          >>  >
                                          >>  > Yahoo! Groups Links
                                          >>  >
                                          >>  >
                                          >>  >
                                          >>  >
                                          >>
                                          >>
                                          >>
                                          >>
                                          >
                                          >
                                          > ------------------------------------
                                          >
                                          > Yahoo! Groups Links
                                          >
                                          >
                                          >
                                          >
                                        • P Baker
                                          ... The point about class interceptors? And the example about parallel execution? Phill
                                          Message 20 of 21 , Jun 20, 2009
                                          • 0 Attachment
                                            On 6/19/09, David Saff <david@...> wrote:
                                            >
                                            > On Thu, Jun 18, 2009 at 3:53 PM, P Baker<me@...> wrote:
                                            > > From a feature perspective, hopefully, nothing is added. I think
                                            > > @BeforeParameterize and @AfterParameterize is a workaround ignoring
                                            > > the root of the issue.
                                            > >
                                            > > I think rearranging some of the logic would work. The use case is
                                            > > this: @Parameters connects to a database to populate an array of
                                            > > parameters, however, the database connection is instantiated in a
                                            > > @BeforeClass method. This is my definition of 'lazy loading', the
                                            > > parameters are not known at compile time, but only at run time.
                                            >
                                            > Got it. This was indeed the use case that the current design was
                                            > meant to be open to, if not directly supporting. Discussions over the
                                            > last few years had convinced me that no one would ever use such
                                            > flexibility. The current me is glad to be proven wrong (and the me
                                            > from ~4 years ago is glad to be proven right).
                                            >
                                            > > Right now I've subclassed Parameterized to add to the class block to
                                            > > accomplish this (and why I've moved the creation of runners out of the
                                            > > constructor of Parameterized in my github fork) - however this breaks
                                            > > the ability to generate descriptions before the testing begins.
                                            >
                                            > Moving the runner creation out of the Parameterized constructor is
                                            > exactly the right thing to do.
                                            >
                                            > > What I would like (and expected to happen, I was mildly surprised when
                                            > > it was not true and undocumented - my javadoc additions to
                                            > > Parameterized correct this), is for @BeforeClass to actually run
                                            > > before the rest of the class. Order of execution would be (excluding
                                            > > interceptors):
                                            > > @BeforeClass [<- moving @BeforeClass here]
                                            > > @Parameters
                                            > > [@Before class is currently here]
                                            > > @Setup
                                            > > @Test
                                            > > @Teardown
                                            > > @AfterClass
                                            >
                                            > That makes some sense. The intent was that Parameterized would feel
                                            > like you had created multiple copies of the class, each with its own
                                            > @BeforeClass, etc. I can see how that's questionable from the point
                                            > of view of the principle of least surprise.
                                            >
                                            > > Your explanation of why @BeforeClass and @AfterClass are run when they
                                            > > are makes sense, and seems like it applies to @Parameters as well. My
                                            > > ideas center around either moving description generation, notifier
                                            > > generation, or some similar change. If there's a simple way to do
                                            > > this, please let me know.
                                            >
                                            > See my next mail.

                                            The point about class interceptors? And the example about parallel execution?

                                            Phill

                                            >
                                            >
                                            >
                                            >
                                            >
                                            >
                                            > David
                                            >
                                            >
                                            > >
                                            > > Phill
                                            > >
                                            > > On 6/18/09, David Saff <david@...> wrote:
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >> Phil,
                                            > >>
                                            > >>  Can you explain what you want to do from a feature perspective?
                                            > >
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >>  David Saff
                                            > >>
                                            > >>
                                            > >>  On Wed, Jun 17, 2009 at 9:06 PM, P Baker<me@...> wrote:
                                            > >>  > David, in looking at the architecture for @BeforeClass, @AfterClass and
                                            > >>  > @Parameters, and the patches on github for @BeforeParameterize and
                                            > >>  > @AfterParameterize, I'm curious why the before and after class methods are
                                            > >>  > run as part of the class block?
                                            > >>  >
                                            > >>  > After struggling with finding a way to put @Paramerize after the
                                            > >>  > @BeforeClass calls, can you explain the reasoning behind putting those
                                            > >>  > annotations calls in the test. In fact, they seem extraneous to the test
                                            > >>  > itself, and rather like overhead to the test case. Why aren't they run in a
                                            > >>  > fashion similar to @Parameterize, in methods outside of the class block in
                                            > >>  > ParentRunner? It seems like with the introduction of interceptors, and the
                                            > >>  > addition of their permutations of the testing chain, it might be a good idea
                                            > >>  > to run those methods calls right in Parent Runner?
                                            > >>  >
                                            > >>  > Any comments would be appreciated. Thanks,
                                            > >>  > Phill Baker
                                            > >>  >
                                            > >>  > On 6/15/09, P Baker <me@...> wrote:
                                            > >>  >>
                                            > >>  >> As this situation has recently effected our used of JUnit, what is the
                                            > >>  >> reasoning behind using the test name as a primary key? Coming from a
                                            > >>  >> database background, folks usually recommend using artificial keys.
                                            > >>  >>
                                            > >>  >> In addition to allowing lazy loading, the added complexity might allow
                                            > >>  >> future flexibility and as Daniel mentioned, arbitrary attributes to be
                                            > >>  >> added. I'm particularly interested in lazy loading, however, what are your
                                            > >>  >> thoughts on incorporating that functionality in JUnit4's architecture?
                                            > >>  >>
                                            > >>  >> Phill
                                            > >>  >>
                                            > >>  >> On 6/15/09, Daniel Brolund <daniel.brolund@...> wrote:
                                            > >>  >>>
                                            > >>  >>>
                                            > >>  >>>
                                            > >>  >>> Hi David,
                                            > >>  >>>
                                            > >>  >>> The motivation would be when you want to decorate with runtime data,
                                            > >>  >>> especially lazily loaded data, like for Parameterized.
                                            > >>  >>>
                                            > >>  >>> If you look a bit broader, you could decorate with assertions,
                                            > >>  >>> assumptions and more as sub-test information. That might not be a good
                                            > >>  >>> idea, but it is a thought.
                                            > >>  >>>
                                            > >>  >>> I'm not sure how to do it with an Interceptor (I'm not up to speed there
                                            > >>  >>> yet). Could you make a sketch on your thoughts?
                                            > >>  >>>
                                            > >>  >>> Cheers
                                            > >>  >>> Daniel
                                            > >>  >>>
                                            > >>  >>>
                                            > >>  >>> On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                                            > >>  >>> >
                                            > >>  >>> >
                                            > >>  >>> > Daniel,
                                            > >>  >>> >
                                            > >>  >>> > Can you explain the motivation behind such a change? If it's simply a
                                            > >>  >>> > desire to use Interceptors to influence test descriptions, I'd rather
                                            > >>  >>> > introduce a new, describe-time extension.
                                            > >>  >>> >
                                            > >>  >>> > David Saff
                                            > >>  >>> >
                                            > >>  >>> > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                                            > >>  >>> > Brolund<daniel.brolund@... <daniel.brolund%40agical.com>> wrote:
                                            > >>  >>> > > Hi guys,
                                            > >>  >>> > >
                                            > >>  >>> > > Would it be possible that the description is built up in two
                                            > >>  >>> > "phases".
                                            > >>  >>> > > 1) before running the tests (as today) to create a "skeleton"
                                            > >>  >>> > > 2) while running the tests more "flesh" can be added, e.g.
                                            > >>  >>> > parameters.
                                            > >>  >>> > >
                                            > >>  >>> > > I haven't dug in this recently, but I notice that when I add to the
                                            > >>  >>> > > description while running the tests, in Eclipse they are shown as
                                            > >>  >>> > > "Unrooted tests".
                                            > >>  >>> > >
                                            > >>  >>> > > One possibility is that I've missed something obvious, and in that
                                            > >>  >>> > case,
                                            > >>  >>> > > please tell me. :-)
                                            > >>  >>> > >
                                            > >>  >>> > > Cheers
                                            > >>  >>> > > Daniel
                                            > >>  >>> > >
                                            > >>  >>> > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                                            > >>  >>> > >>
                                            > >>  >>> > >>
                                            > >>  >>> > >> No. Interceptors don't exist at describe-time, just run-time.
                                            > >>  >>> > >>
                                            > >>  >>> > >> The feature would be a good one, but it would need to live
                                            > >>  >>> > elsewhere.
                                            > >>  >>> > >>
                                            > >>  >>> > >> David Saff
                                            > >>  >>> > >>
                                            > >>  >>> > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...<nat.pryce%40gmail.com>
                                            > >>  >>> >
                                            > >>  >>> > wrote:
                                            > >>  >>> > >> > Could an interceptor be used to override how a parameterised test
                                            > >>  >>> > is
                                            > >>  >>> > >> described?
                                            > >>  >>> > >> >
                                            > >>  >>> > >> > --Nat
                                            > >>  >>> > >> >
                                            > >>  >>> > >> > On 08/06/2009, David Saff <david@... <david%40saff.net>>
                                            > >>  >>> wrote:
                                            > >>  >>> > >> >> Kent,
                                            > >>  >>> > >> >>
                                            > >>  >>> > >> >> This has been proposed many times, usually in terms of changing
                                            > >>  >>> > the
                                            > >>  >>> > >> >> actual name in the description.
                                            > >>  >>> > >> >>
                                            > >>  >>> > >> >> Originally, I backed off because I thought users might want to
                                            > >>  >>> > load
                                            > >>  >>> > >> >> Parameterized values lazily, and having to eagerly grab them in
                                            > >>  >>> > the
                                            > >>  >>> > >> >> description phase would spoil that. I believe that this
                                            > >>  >>> > >> flexibility
                                            > >>  >>> > >> >> was used precisely as many times as there are chickens with
                                            > >>  >>> > lips,
                                            > >>  >>> > >> so
                                            > >>  >>> > >> >> the real world has spoken on that point.
                                            > >>  >>> > >> >>
                                            > >>  >>> > >> >> That said, there still is a concern that toStrings that produce
                                            > >>  >>> > >> very
                                            > >>  >>> > >> >> long, or oddly-formatted results, would make some third-party
                                            > >>  >>> > >> add-ons
                                            > >>  >>> > >> >> either unwieldy or directly broken (think about a toString()
                                            > >>  >>> > with a
                                            > >>  >>> > >> >> newline in it).
                                            > >>  >>> > >> >>
                                            > >>  >>> > >> >> So, I'm also curious in how other people answer this. Thanks,
                                            > >>  >>> > >> >>
                                            > >>  >>> > >> >> David Saff
                                            > >>  >>> > >> >>
                                            > >>  >>> > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...<kentb%40earthlink.net>
                                            > >>
                                            > >>  >>> >
                                            > >>  >>> > wrote:
                                            > >>  >>> > >> >>> All,
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>> Rapha has proposed the following change to the printing of
                                            > >>  >>> > >> parameterized
                                            > >>  >>> > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                                            > >>  >>> > he
                                            > >>  >>> > >> would
                                            > >>  >>> > >> >>> like
                                            > >>  >>> > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                                            > >>  >>> > Does
                                            > >>  >>> > >> anyone
                                            > >>  >>> > >> >>> here
                                            > >>  >>> > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                                            > >>  >>> > test
                                            > >>  >>> > >> >>> printing?
                                            > >>  >>> > >> >>> Would the values you use print nicely in this format?
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>> Regards,
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>> Kent Beck
                                            > >>  >>> > >> >>> Three Rivers Institute
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>> ------------------------------------
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>> Yahoo! Groups Links
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>>
                                            > >>  >>> > >> >>
                                            > >>  >>> > >> >
                                            > >>  >>> > >> >
                                            > >>  >>> > >> > --
                                            > >>  >>> > >> > http://www.natpryce.com
                                            > >>  >>> > >> >
                                            > >>  >>> > >> >
                                            > >>  >>> > >> > ------------------------------------
                                            > >>  >>> > >> >
                                            > >>  >>> > >> > Yahoo! Groups Links
                                            > >>  >>> > >> >
                                            > >>  >>> > >> >
                                            > >>  >>> > >> >
                                            > >>  >>> > >> >
                                            > >>  >>> > >>
                                            > >>  >>> > >>
                                            > >>  >>> > >>
                                            > >>  >>> > >>
                                            > >>  >>> > > --
                                            > >>  >>> > > ----------------------------------------------
                                            > >>  >>> > > Daniel Brolund
                                            > >>  >>> > >
                                            > >>  >>> > > Agical AB
                                            > >>  >>> > > Västerlånggatan 79, 2 tr
                                            > >>  >>> > > 111 29 Stockholm, SWEDEN
                                            > >>  >>> > > http://www.agical.com
                                            > >>  >>> > >
                                            > >>  >>> > > mobile: +46 708 754 002
                                            > >>  >>> > > e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                            > >>  >>> > > blog: http://danielbrolund.wordpress.com
                                            > >>  >>> > > twitter: danielbrolund
                                            > >>  >>> > >
                                            > >>  >>> > >
                                            > >>  >>> > >
                                            > >>  >>> > >
                                            > >>  >>> > > ------------------------------------
                                            > >>  >>> > >
                                            > >>  >>> > > Yahoo! Groups Links
                                            > >>  >>> > >
                                            > >>  >>> > >
                                            > >>  >>> > >
                                            > >>  >>> > >
                                            > >>  >>> >
                                            > >>  >>> >
                                            > >>  >>> >
                                            > >>  >>> >
                                            > >>  >>> --
                                            > >>  >>> ----------------------------------------------
                                            > >>  >>> Daniel Brolund
                                            > >>  >>>
                                            > >>  >>> Agical AB
                                            > >>  >>> Västerlånggatan 79, 2 tr
                                            > >>  >>> 111 29 Stockholm, SWEDEN
                                            > >>  >>> http://www.agical.com
                                            > >>  >>>
                                            > >>  >>> mobile: +46 708 754 002
                                            > >>  >>> e-mail: daniel.brolund@... <daniel.brolund%40agical.com>
                                            > >>  >>> blog: http://danielbrolund.wordpress.com
                                            > >>  >>> twitter: danielbrolund
                                            > >>  >>>
                                            > >>  >>>
                                            > >>  >>>
                                            > >>  >>
                                            > >>  >>
                                            > >>  >
                                            > >>  >
                                            > >>  > [Non-text portions of this message have been removed]
                                            > >>  >
                                            > >>  >
                                            > >>  >
                                            > >>  > ------------------------------------
                                            > >>  >
                                            > >>  > Yahoo! Groups Links
                                            > >>  >
                                            > >>  >
                                            > >>  >
                                            > >>  >
                                            > >>
                                            > >>
                                            > >>
                                            > >>
                                            > >
                                            > >
                                            > > ------------------------------------
                                            > >
                                            > > Yahoo! Groups Links
                                            > >
                                            > >
                                            > >
                                            > >
                                            >
                                            >
                                            >
                                            >
                                          • Gilles Scokart
                                            Using a String description is indeed the only way that can work accross two different run in different classloader (or even jvm). However, I feel that
                                            Message 21 of 21 , Jun 22, 2009
                                            • 0 Attachment
                                              Using a String description is indeed the only way that can work accross two
                                              different run in different classloader (or even jvm).

                                              However, I feel that sometimes just 1 String is not enought.
                                              A classical usage of the Description to allow the IDE to jump in the test
                                              code when clicking on it. To do that, the IDE need 2 String : The test
                                              class name, and the test method name.

                                              This is currently 'encoded' in a single String with the format :
                                              <methodName>(<TestClass>), but this encoding is not really visible from the
                                              API (there is merely getClassName() and getMethodName() since December),
                                              althought IDE rely on it.

                                              I have a concrete case where I feel the current handling of the Description
                                              is not suffisent. I'm writing a Junit wraper for AntUnit. The idea is that
                                              you can write a very simple java class, that combined with a AntUnitRunner
                                              can be run into eclipse or any junit runner application. At description
                                              time, the test parse an antunit script. At runtime, it invokes the ant test
                                              target, and report any error to the IDE.
                                              In this scenario, the Descriptions contains a test target (and the antunit
                                              sript filename required for Junit 3 runner).
                                              Ideally, I would like to attach an annotation to the Description, giving to
                                              the IDE the filename and the test target. And I feel this was the intention
                                              when putting the Annotation in the Description.

                                              However, I didn't see it used because we don't want to link a Junit Runner
                                              (I mean, the Runner the test class delare), with a specific application
                                              runner (I mean the IDE). The only acceptable link is the Junit library.
                                              To be usable, the annotation that can be added must be defined inside junit
                                              itself.




                                              Gilles Scokart


                                              2009/6/18 David Saff <david@...>

                                              >
                                              >
                                              > On Mon, Jun 15, 2009 at 7:23 PM, P Baker<me@...<me%40retrodict.com>>
                                              > wrote:
                                              > > As this situation has recently effected our used of JUnit, what is the
                                              > > reasoning behind using the test name as a primary key? Coming from a
                                              > > database background, folks usually recommend using artificial keys.
                                              >
                                              > The reasoning is that since these are runtime objects found through
                                              > reflection, we really don't have anything better to connect a test in
                                              > the last run to a test in this run. Does another solution come to
                                              > mind?
                                              >
                                              > > In addition to allowing lazy loading, the added complexity might allow
                                              > > future flexibility and as Daniel mentioned, arbitrary attributes to be
                                              > > added. I'm particularly interested in lazy loading, however, what are
                                              > your
                                              > > thoughts on incorporating that functionality in JUnit4's architecture?
                                              >
                                              > Can you be more specific what lazy loading would mean for you?
                                              >
                                              > David Saff
                                              >
                                              >
                                              > >
                                              > > Phill
                                              > >
                                              > > On 6/15/09, Daniel Brolund <daniel.brolund@...<daniel.brolund%40agical.com>>
                                              > wrote:
                                              > >>
                                              > >>
                                              > >>
                                              > >> Hi David,
                                              > >>
                                              > >> The motivation would be when you want to decorate with runtime data,
                                              > >> especially lazily loaded data, like for Parameterized.
                                              > >>
                                              > >> If you look a bit broader, you could decorate with assertions,
                                              > >> assumptions and more as sub-test information. That might not be a good
                                              > >> idea, but it is a thought.
                                              > >>
                                              > >> I'm not sure how to do it with an Interceptor (I'm not up to speed there
                                              > >> yet). Could you make a sketch on your thoughts?
                                              > >>
                                              > >> Cheers
                                              > >> Daniel
                                              > >>
                                              > >>
                                              > >> On Mon, 2009-06-15 at 12:11 -0400, David Saff wrote:
                                              > >> >
                                              > >> >
                                              > >> > Daniel,
                                              > >> >
                                              > >> > Can you explain the motivation behind such a change? If it's simply a
                                              > >> > desire to use Interceptors to influence test descriptions, I'd rather
                                              > >> > introduce a new, describe-time extension.
                                              > >> >
                                              > >> > David Saff
                                              > >> >
                                              > >> > On Mon, Jun 15, 2009 at 1:45 AM, Daniel
                                              > >> > Brolund<daniel.brolund@... <daniel.brolund%40agical.com><daniel.brolund%
                                              > 40agical.com>> wrote:
                                              > >> > > Hi guys,
                                              > >> > >
                                              > >> > > Would it be possible that the description is built up in two
                                              > >> > "phases".
                                              > >> > > 1) before running the tests (as today) to create a "skeleton"
                                              > >> > > 2) while running the tests more "flesh" can be added, e.g.
                                              > >> > parameters.
                                              > >> > >
                                              > >> > > I haven't dug in this recently, but I notice that when I add to the
                                              > >> > > description while running the tests, in Eclipse they are shown as
                                              > >> > > "Unrooted tests".
                                              > >> > >
                                              > >> > > One possibility is that I've missed something obvious, and in that
                                              > >> > case,
                                              > >> > > please tell me. :-)
                                              > >> > >
                                              > >> > > Cheers
                                              > >> > > Daniel
                                              > >> > >
                                              > >> > > On Mon, 2009-06-08 at 15:18 -0400, David Saff wrote:
                                              > >> > >>
                                              > >> > >>
                                              > >> > >> No. Interceptors don't exist at describe-time, just run-time.
                                              > >> > >>
                                              > >> > >> The feature would be a good one, but it would need to live
                                              > >> > elsewhere.
                                              > >> > >>
                                              > >> > >> David Saff
                                              > >> > >>
                                              > >> > >> On Mon, Jun 8, 2009 at 2:25 PM, Nat Pryce<nat.pryce@...<nat.pryce%40gmail.com>
                                              > <nat.pryce%40gmail.com>
                                              > >> >
                                              > >> > wrote:
                                              > >> > >> > Could an interceptor be used to override how a parameterised test
                                              > >> > is
                                              > >> > >> described?
                                              > >> > >> >
                                              > >> > >> > --Nat
                                              > >> > >> >
                                              > >> > >> > On 08/06/2009, David Saff <david@... <david%40saff.net><david%
                                              > 40saff.net>>
                                              > >> wrote:
                                              > >> > >> >> Kent,
                                              > >> > >> >>
                                              > >> > >> >> This has been proposed many times, usually in terms of changing
                                              > >> > the
                                              > >> > >> >> actual name in the description.
                                              > >> > >> >>
                                              > >> > >> >> Originally, I backed off because I thought users might want to
                                              > >> > load
                                              > >> > >> >> Parameterized values lazily, and having to eagerly grab them in
                                              > >> > the
                                              > >> > >> >> description phase would spoil that. I believe that this
                                              > >> > >> flexibility
                                              > >> > >> >> was used precisely as many times as there are chickens with
                                              > >> > lips,
                                              > >> > >> so
                                              > >> > >> >> the real world has spoken on that point.
                                              > >> > >> >>
                                              > >> > >> >> That said, there still is a concern that toStrings that produce
                                              > >> > >> very
                                              > >> > >> >> long, or oddly-formatted results, would make some third-party
                                              > >> > >> add-ons
                                              > >> > >> >> either unwieldy or directly broken (think about a toString()
                                              > >> > with a
                                              > >> > >> >> newline in it).
                                              > >> > >> >>
                                              > >> > >> >> So, I'm also curious in how other people answer this. Thanks,
                                              > >> > >> >>
                                              > >> > >> >> David Saff
                                              > >> > >> >>
                                              > >> > >> >> On Mon, Jun 8, 2009 at 11:29 AM, kentb<kentb@...<kentb%40earthlink.net>
                                              > <kentb%40earthlink.net>
                                              > >> >
                                              > >> > wrote:
                                              > >> > >> >>> All,
                                              > >> > >> >>>
                                              > >> > >> >>> Rapha has proposed the following change to the printing of
                                              > >> > >> parameterized
                                              > >> > >> >>> tests. Rather than print the ordinal "parameterizedTest()[1]"
                                              > >> > he
                                              > >> > >> would
                                              > >> > >> >>> like
                                              > >> > >> >>> to see the actual values: "parameterizedTest()[foo,5,bar]".
                                              > >> > Does
                                              > >> > >> anyone
                                              > >> > >> >>> here
                                              > >> > >> >>> (besides me in JUnit Max) have a dependency on parameterized
                                              > >> > test
                                              > >> > >> >>> printing?
                                              > >> > >> >>> Would the values you use print nicely in this format?
                                              > >> > >> >>>
                                              > >> > >> >>> Regards,
                                              > >> > >> >>>
                                              > >> > >> >>> Kent Beck
                                              > >> > >> >>> Three Rivers Institute
                                              > >> > >> >>>
                                              > >> > >> >>>
                                              > >> > >> >>>
                                              > >> > >> >>> ------------------------------------
                                              > >> > >> >>>
                                              > >> > >> >>> Yahoo! Groups Links
                                              > >> > >> >>>
                                              > >> > >> >>>
                                              > >> > >> >>>
                                              > >> > >> >>>
                                              > >> > >> >>
                                              > >> > >> >
                                              > >> > >> >
                                              > >> > >> > --
                                              > >> > >> > http://www.natpryce.com
                                              > >> > >> >
                                              > >> > >> >
                                              > >> > >> > ------------------------------------
                                              > >> > >> >
                                              > >> > >> > Yahoo! Groups Links
                                              > >> > >> >
                                              > >> > >> >
                                              > >> > >> >
                                              > >> > >> >
                                              > >> > >>
                                              > >> > >>
                                              > >> > >>
                                              > >> > >>
                                              > >> > > --
                                              > >> > > ----------------------------------------------
                                              > >> > > Daniel Brolund
                                              > >> > >
                                              > >> > > Agical AB
                                              > >> > > Västerlånggatan 79, 2 tr
                                              > >> > > 111 29 Stockholm, SWEDEN
                                              > >> > > http://www.agical.com
                                              > >> > >
                                              > >> > > mobile: +46 708 754 002
                                              > >> > > e-mail: daniel.brolund@... <daniel.brolund%40agical.com><daniel.brolund%
                                              > 40agical.com>
                                              > >> > > blog: http://danielbrolund.wordpress.com
                                              > >> > > twitter: danielbrolund
                                              > >> > >
                                              > >> > >
                                              > >> > >
                                              > >> > >
                                              > >> > > ------------------------------------
                                              > >> > >
                                              > >> > > Yahoo! Groups Links
                                              > >> > >
                                              > >> > >
                                              > >> > >
                                              > >> > >
                                              > >> >
                                              > >> >
                                              > >> >
                                              > >> >
                                              > >> --
                                              > >> ----------------------------------------------
                                              > >> Daniel Brolund
                                              > >>
                                              > >> Agical AB
                                              > >> Västerlånggatan 79, 2 tr
                                              > >> 111 29 Stockholm, SWEDEN
                                              > >> http://www.agical.com
                                              > >>
                                              > >> mobile: +46 708 754 002
                                              > >> e-mail: daniel.brolund@... <daniel.brolund%40agical.com><daniel.brolund%
                                              > 40agical.com>
                                              > >> blog: http://danielbrolund.wordpress.com
                                              > >> twitter: danielbrolund
                                              > >>
                                              > >>
                                              > >>
                                              > >
                                              > >
                                              > > [Non-text portions of this message have been removed]
                                              > >
                                              > >
                                              > >
                                              > > ------------------------------------
                                              > >
                                              > > Yahoo! Groups Links
                                              > >
                                              > >
                                              > >
                                              > >
                                              >
                                              >


                                              [Non-text portions of this message have been removed]
                                            Your message has been successfully submitted and would be delivered to recipients shortly.