Re: Software Testing Unit with Aspects

Mike Mortensen <[email protected]> Wed, 27 Aug 2008 14:54:53 -0600
Newsgroups gmane.comp.programming.aspect.general
Message-ID <[email protected]>
I know from my experience attending a past WTAOP workshop that when
people talk about aspects + testing, some mean testing the aspects, while
others mean using AOP to help unit test non-aspect (i.e. Java/C++) 
code.  There are
papers on both, but obviously they are very different tasks.

We have looked at issues related to testing aspect-oriented systems, and
have written a couple of papers that discuss measuring statement coverage
of woven code (we use AspectC++ for C++ systems, and use gcov to get the
statement coverage) and joinpoint coverage.  To gather  joinpoint 
coverage --
which joinpoints were executed and which were not -- we have 
instrumented advice
bodies to gather the data using the AspectC++ joinpoint API.
The two metrics are complementary, since 'covering' or executing a 
joinpoint doesn't mean
you exercised all advice body code, and you could execute all advice 
body statements w/o
executing all joinpoints.

In addition, one area we have explored that differs from other 
approaches is using
mock systems to unit test aspects.  As many have discussed, one 
challenge for testing
aspects is that an aspect doesn't run 'stand-alone' but rather advises 
or changes
core concerns.   We are refactoring large (10,000 LOC - 80,000 LOC) 
legacy systems
where the weave/compile loop can take 5-25 minutes, and so trying out 
different
aspect pointcuts, advice body implementation, and so on is too slow 
within the main system.
Instead, we create a small mock system that mimics the program structure 
and has simple behavior
so that we can first weave and test aspects in the mock system.  Then, 
we move the aspects into the
real system and do full integration testing.

   M. Mortensen, S. Ghosh, J. Bieman, "A Test Driven Approach for 
Aspectualizing Legacy Software Using Mock Systems",
     Information and Software Technology, vol 50, no 7-8, Elsevier, 
2008, pp 621-640
   M. Mortensen, S. Ghosh, J. Bieman, "Testing During Refactoring: 
Adding Aspects to Legacy Systems",
      17th International Symposium on Software Reliability Engineering 
(ISSRE), Raliegh, NC, November 2006.


>Hi Osvaldo,
> 
>  
>
>>I am student posgraduate in software  engineering with emphasis free
>>software and I need papers, tutorials or books about software testing
>>unit with the use of the AOP, because I am writing my thesis.
>>Someone can I help me?
>>    
>>
>
>Is state-based testing within the scope of your search? 
>In that case you might want to look at this technical report:
>	"Using Object Teams for State-Based Class Testing" 
>	Dehla Sokenou, Stephan Herrmann, 2004
>	http://www.objectteams.org/publications/#TRTesting
>
>Also, you could google for the workshop series WTAOP
>(Workshop on Testing Aspect-Oriented Programs).
>Although these workshops were focused on testing *for* AOP 
>not *by means of* AOP, you will still find some interesting
>ideas I should think.
>
>best,
>Stephan
>
>_______________________________________________
>discuss mailing list    -    [email protected]
>
>To unsubscribe and change options, go to:
>http://aosd.net/mailman/listinfo/discuss_aosd.net
>
>Check out the AOSD.net Wiki: http://aosd.net/wiki
>
>  
>


_______________________________________________
discuss mailing list    -    [email protected]

To unsubscribe and change options, go to:
http://aosd.net/mailman/listinfo/discuss_aosd.net

Check out the AOSD.net Wiki: http://aosd.net/wiki