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

Re: [XP] Re: Traceability Matrices via AOP

Expand Messages
  • Dean Wampler
    This is true. Although I m a big proponent of AOP, it s important to use the best tools for the job. However, where AOP can be used beyond the capabilities of
    Message 1 of 114 , Jun 6, 2005
      This is true. Although I'm a big proponent of AOP, it's important to use
      the best tools for the job.

      However, where AOP can be used beyond the capabilities of normal code
      coverage tools is to gather metrics on non-trivial state transistions.
      For example, it's one thing to know that line N of class C got executed
      20 times or that the test run spent 5% of its time inside method M.
      Tools like AspectJ let you write tests that gather metrics like,
      "measure the count/time of M while inside the 'control flow' of method
      M2 (that is, M2 is lower on the stack)," or "count the times M is
      executed after M2 was executed and before method M3 is executed." (There
      are probably other non-AOP tools that do this, too, just to be fair ;)

      How does this work? Briefly, AspectJ (and most other AOP systems) has a
      language for selecting points of execution in the code (e.g., method
      calls, object creation, variable accesses, etc.) and a way to invoke
      executable code when those points
      are reached. So, for these examples, you specify a set of these points
      that match the criteria you want, then write Java/AJ code that gathers
      the data you want, when these points are reached.

      dean

      Jeff Grigg wrote:

      >--- "Jeff Grigg" <jeffgrigg@c...> wrote:
      >
      >
      > snip...
      >
      >It occurs to me that this is essentially a code coverage question,
      >except reported by test instead of reported as an overall coverage
      >percentage. Maybe clover or some other code coverage tool could be
      >used to build traceability matrices.
      >
      >
      >
    • Dean Wampler
      This is true. Although I m a big proponent of AOP, it s important to use the best tools for the job. However, where AOP can be used beyond the capabilities of
      Message 114 of 114 , Jun 6, 2005
        This is true. Although I'm a big proponent of AOP, it's important to use
        the best tools for the job.

        However, where AOP can be used beyond the capabilities of normal code
        coverage tools is to gather metrics on non-trivial state transistions.
        For example, it's one thing to know that line N of class C got executed
        20 times or that the test run spent 5% of its time inside method M.
        Tools like AspectJ let you write tests that gather metrics like,
        "measure the count/time of M while inside the 'control flow' of method
        M2 (that is, M2 is lower on the stack)," or "count the times M is
        executed after M2 was executed and before method M3 is executed." (There
        are probably other non-AOP tools that do this, too, just to be fair ;)

        How does this work? Briefly, AspectJ (and most other AOP systems) has a
        language for selecting points of execution in the code (e.g., method
        calls, object creation, variable accesses, etc.) and a way to invoke
        executable code when those points
        are reached. So, for these examples, you specify a set of these points
        that match the criteria you want, then write Java/AJ code that gathers
        the data you want, when these points are reached.

        dean

        Jeff Grigg wrote:

        >--- "Jeff Grigg" <jeffgrigg@c...> wrote:
        >
        >
        > snip...
        >
        >It occurs to me that this is essentially a code coverage question,
        >except reported by test instead of reported as an overall coverage
        >percentage. Maybe clover or some other code coverage tool could be
        >used to build traceability matrices.
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.