From: adam p. <ada...@gm...> - 2007-02-27 21:01:38
|
Well when a colleage tried this on the actual code base deploying to weblogic, we had all of the classes instrumented but nothing past the client actually showed as being hit. Ive not had to set this up before its always been done before I got there and therefore Ive had to just plug my new tests and code in. Im finding there seems to be a serious lack of help on line for this too, there are lots of docs on why its good to use and how to set up a simple test but getting it working with somehting a bit more complex seems to be missing at the moment. Is there any special flags or options I am likely to need? I can post my test project build and clases and test if anybody thinks that might help? Thanks in advance A On 27/02/07, John W. Lewis <Joh...@sa...> wrote: > > > I have successfully instrumented an ear file and deployed it to weblogic > before. > > I've never used MockEjbObject though. > > Unfortunately, looking at the stack trace, nothing comes to mind as to > what the problem might be. > > John > > ------------------------------ > *From:* cob...@li... [mailto: > cob...@li...] *On Behalf Of *adam price > *Sent:* Tuesday, February 27, 2007 12:06 PM > *To:* cob...@li... > *Subject:* [Cobertura-devel] Cobertura and EJB > > Hi > > I seem to be have a problem with running cobertura against EJB's. I cant > seem to find anything about running it against ejbs so maybe im trying to > get it to do something its not supposed to. > > Im using MockEJB and calling a very simple test session ejb. all it does > is return a number! > > The tests all work as expected running without cobertura, but as soon as I > add the instrumented classes and jar file the test fails with the following: > > Testcase: testGetInt took 0.399 sec > Caused an ERROR > com.sky.test.testejbBean is not an interface > java.lang.IllegalArgumentException: com.sky.test.testejbBean is not an > interface > at java.lang.reflect.Proxy.getProxyClass(Proxy.java:362) > at java.lang.reflect.Proxy.newProxyInstance (Proxy.java:577) > at org.mockejb.MockEjbObject.createProxy(MockEjbObject.java:111) > at org.mockejb.SessionBeanHome.create(SessionBeanHome.java:47) > at org.mockejb.BasicEjbHome.invoke(BasicEjbHome.java:103) > at $Proxy0.create(Unknown Source) > at com.sky.test.testejbAccessBean.instantiateEJB( > testejbAccessBean.java:72) > at com.sky.test.testejbAccessBean.getAnInt(testejbAccessBean.java:83) > at com.sky.test.TestEjbAccessBeanTest.testGetInt ( > TestEjbAccessBeanTest.java:66) > > > Ive run the same build files against J2SE code and its all fine so the > setup of the ant and classpath seems to be ok just cobertura and ejbs. > > Am I doing something wrong or is cobertura just not going to let me test > ejbs like this? > > Thanks > > A > |