开发者

code coverage tool for java webstart/jnlp application

开发者 https://www.devze.com 2023-01-25 17:04 出处:网络
I have been searching for some time for a code coverage tool that will work with my client/sever application, but I have been unable to find a compatible tool.

I have been searching for some time for a code coverage tool that will work with my client/sever application, but I have been unable to find a compatible tool.

My applic开发者_如何学Goation stores images on a server, then displays them though a client which is launched via java webstart/jnlp file.

Any recommendations would be appreciated. I have already tried emma & clover, with no results. open source or commercials solutions are acceptable. thanks!


Instrument the classes with any of the code coverage tools you like (e.g. cobertura, which writes a local file cobertura.ser which can then be used for the report generation in a separate step).

Then, instead of running the signed or unsigned (which wouldn't work anyway) Applet directly in the browser, use the AppletViewer environment. The viewer runs the Applet in a privileged environment, without the Java Plugin Sandbox and thus the code coverage tool can do its work and write the report file.

Many of the code coverage tools use byte-code weaving and only write their results using a shutdown hook - when the VM shuts down. That is probably not working when used in a browser, since that's a special VM. Not sure, but maybe the Java Plugin starts a separate VM for Applets which is never being shut down.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号