First thoughts after starting with instrumentation...

0 views
Skip to first unread message

Alessio Soldano

unread,
Aug 22, 2009, 10:20:55 PM8/22/09
to tested...@googlegroups.com
Hi Stefano,
finally, I've spent a couple of hours practially thinking about testedby; I've just committed a couple of classes to start the instrumentation work. Of course it's all still in flux / work in progess, but I'd like to write down here below a few things that came to my mind:
- regarding the metadata model, afaics we're not supporting overloaded methods (the simple method name might not be unique give a class)
- the current initial implementation for the instrumentation based metadata collection is based on a transformer (Agent) that modifies classes adding a call to an InvocationTracker to every method. The InvocationTracker keeps track of the called classes/methods during a given test execution. When the tests run is over, I plan to build the metadata model from the tracker's content. The InvocationTracker is currently implemented leveraging a ThreadLocal, but I still need to test/verify the whole process to see if that's the most suitable solution here. Btw, I assume the tests' runner will set the current running test name in the tracker... but we'll see once I implement that in details
- I still need to understand how to fit my future metadata builder to the current MetaDataBuilder interface, perhaps we can review that together later, once I have clearer idea.
Ok this was basically an update, we'll discuss this properly once we're online together (perhaps on the irc channel... of course I did not expect you or Luca to be there right now ;-) )
Cheers
Alessio

Stefano Maestri

unread,
Aug 23, 2009, 3:00:47 AM8/23/09
to tested...@googlegroups.com

Ok for all

Regarding overloaded method of course you are right and I perfectly know that. Megawatts model are a very first implementation and not yet completed. I've been in doubt if commit it yesterday or still keep it on my local git. I've preferred to commit an incomplete version to avoid eventual conflict if someone was doing something else n the source (in fact I was hoping that)

The same for builders interface, we will take a look toghetr.

Cu online
S.

Stefano Maestri

unread,
Aug 23, 2009, 4:07:51 AM8/23/09
to tested...@googlegroups.com
Some more details

- regarding the metadata model, afaics we're not supporting overloaded methods (the simple method name might not be unique give a class)

Already committed changes as described in this issue. My thoughts written in the issue, please comment there if you don't agree or if you have something to add.

 
- the current initial implementation for the instrumentation based metadata collection is based on a transformer (Agent) that modifies classes adding a call to an InvocationTracker to every method. The InvocationTracker keeps track of the called classes/methods during a given test execution. When the tests run is over, I plan to build the metadata model from the tracker's content. The InvocationTracker is currently implemented leveraging a ThreadLocal, but I still need to test/verify the whole process to see if that's the most suitable solution here. Btw, I assume the tests' runner will set the current running test name in the tracker... but we'll see once I implement that in details

Yep, I'm not totally sure how junit runs tests (in terms of threading). Probably it's depend more from the runned (i.e surefire) than junit itself. Anyway Thread safe code is always better ;)  
 

- I still need to understand how to fit my future metadata builder to the current MetaDataBuilder interface, perhaps we can review that together later, once I have clearer idea.

Probably it doesn't fit at all. Maybe we can remove this interface and make different method of building/colection of metadata with totally different approach. This builder interface is the part I was not sure at all in my metadata model exactly because it probably doesn't fit with instrumentation base metadata collection.
 
bye
S.

Jochen Mader

unread,
Aug 24, 2009, 3:49:41 PM8/24/09
to tested...@googlegroups.com
I will start taking a look at Eclipse integration this weekend.
Hopefully it should be possible to integrate everything with the
existing JUnit-plugin. If not I will start creating a new PlugIn that
closely mimics the JUnit-PlugIn-behaviour.

I am currently working on a project that could use some "testedby"-magic
and I intend to start testing it for that purpose as soon as we got some
running code in.

CU
Jochen
--
Jochen Mader - Technical Lead

Pramari Europe GmbH
Bruderwöhrdstrasse 15b
93055 Regensburg

p: +49 941 604889 - 701
f: +49 941 604889 - 700
joc...@pramari.com
http://www.pramari.com

Amtsgericht Regensburg
HRB 11343
Geschäftsführer Andreas Hübner

Stefano Maestri

unread,
Aug 24, 2009, 4:59:18 PM8/24/09
to tested...@googlegroups.com
Great!
I'll put my 2C on eclipse plugin here asap, I'm on hurry now, but it's great to hear you are thinking to use testedby and think about eclipse integration (that is very important IMHO)

bye
S.
Reply all
Reply to author
Forward
0 new messages