From: John W. L. <Joh...@sa...> - 2008-02-20 20:35:44
|
I don't know what gui you are talking about, but if I assume the gui is normally using the classes in build/classes, then you could try removing the --destination all together. Then, it should (but I don't use the command line interface) instrument the classes in place. Check the timestamps and filesizes in the class directory to make sure they are different after the instrumentation. You just need to be careful not to instrument classes that are already instrumented. So, we generally recommend deleting all classes (and the ser file) when you want to do the instrumentation again. John From: tom whitmer [mailto:spe...@ya...] Sent: Wednesday, February 20, 2008 3:21 PM To: John W. Lewis; cob...@li... Subject: RE: [Cobertura-devel] problem with cobertura and generating report with command line Ok I changed that but then how do I get the gui that I'm using to run the test cases to look at that folder instead of the classes folder? When I generate the report, it still doesn't give me any sort of output other than 0%. "John W. Lewis" <Joh...@sa...> wrote: I don't think you want the destination of the instrument.bat to be your src directory. You typically want something like: cobertura-instrument.bat --destination C:\MyProject\build\instrumented C:\MyProject\build\classes From: cob...@li... [mailto:cob...@li...] On Behalf Of tom whitmer Sent: Wednesday, February 20, 2008 12:37 PM To: cob...@li... Subject: [Cobertura-devel] problem with cobertura and generating report with command line So I'm trying to generate a report for my project with cobertura and making it do it through the command prompt. I chose this method as my ant file is extremely large and I don't really know where to put any of the ant stuff anyways (it was auto generated by netbeans). All of the test cases are run through a GUI so I can't run them through the command line. I don't really care if I have to edit the ant file, but I don't know how to do it. I've tried using the ant file steps but it didnt work for me, I probably did something wrong. These are the steps that I took to do it from the command line: cobertura-instrument.bat --destination C:\JavaTestCases\src C:\JavaTestCases\build\classes cobertura-report --format html --destination C:\Report C:\JavaTestCases\src Those are the commands I used. C:\JavaTestCases\src is where the source code for the test cases are at. C:\JavaTestCases\build\classes is where the class files are at. Those lines DO generate a report but everything comes as 0%, which is obviously wrong. If anyone could provide me with any help, it would be greatly appreciated. Thanks. ________________________________ Never miss a thing. Make Yahoo your homepage.<http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs> ________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.<http://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20> |