Click here to Skip to main content
15,888,527 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: What was your longest coding session? Pin
Kirk 103898215-Feb-21 6:27
Kirk 103898215-Feb-21 6:27 
GeneralRe: What was your longest coding session? Pin
John R. Shaw5-Feb-21 15:11
John R. Shaw5-Feb-21 15:11 
GeneralRe: What was your longest coding session? Pin
Andreas Mertens5-Feb-21 6:53
professionalAndreas Mertens5-Feb-21 6:53 
GeneralRe: What was your longest coding session? Pin
John R. Shaw5-Feb-21 15:19
John R. Shaw5-Feb-21 15:19 
GeneralRe: What was your longest coding session? Pin
sasadler5-Feb-21 6:55
sasadler5-Feb-21 6:55 
GeneralRe: What was your longest coding session? Pin
SeattleC++5-Feb-21 17:17
SeattleC++5-Feb-21 17:17 
GeneralRe: What was your longest coding session? Pin
#realJSOP7-Feb-21 10:06
mve#realJSOP7-Feb-21 10:06 
GeneralWhen you figure out an esoteric thing Pin
raddevus4-Feb-21 11:11
mvaraddevus4-Feb-21 11:11 
...there is no one to celebrate with because no one else cares about it.
It's just a thing you had to figure out to get a thing done.

I just figured out how to use JCov (Java Coverage tool which is ancient).
I could only find the source for JCov so I had to build it.
To build it I had to get Ant (build tool) installed and figure out how to use.
And I needed some additional Jars which were difficult to even know where to get.
I felt like I was downloading jars off some guys server in his garage but it was actually oracle (Index of /repositories/releases/org/ow2/asm/asm/7.0[^])
I also had to learn how to use JUnit (unit test framework).

So you have to
1) build your targets
2) build your target test classes that use the targets
3) add instrumentation to the class files using JCov cryptic commands
4) run the tests against your targets while invoking another JCov cryptic command which will watch the junit tests to see what is covered (outputs report.xml)
5) create a html report using the JCOv cryptic command which uses the result.xml

Here's a snapshot of the coverage report[^] on my very small Calculator code.

Check out the commands I had to run to get to that:

@echo off
REM ####################################################
REM Prework -- clean up old files
REM remove the report directory and all files
rmdir /S/Q report
REM remove all generated xml files
del /Q *.xml
REM Re-compile targets to insure they have all code changes
javac -cp .;junit/* Calculator.java CalculatorTest.java
REM #####################################################
@echo on
REM 1) Create instrumentation for target class -- creates template.xml
java -jar C:\Users\target\DevTools\jcov_3.0\jcov.jar Instr Calculator.class

REM 2) Run the code with instrumentation -- creates result.xml
java -cp .;C:\Users\target\DevTools\jcov_3.0\jcov_file_saver.jar;junit/* org.junit.runner.JUnitCore CalculatorTest

REM 3) generate report from result.xml
java -jar C:\Users\target\DevTools\jcov_3.0\jcov.jar RepGen result.xml


But, it's all esoteric and I'll forget it when the project is over. Roll eyes | :rolleyes:
GeneralRe: When you figure out an esoteric thing Pin
OriginalGriff4-Feb-21 11:29
mveOriginalGriff4-Feb-21 11:29 
GeneralRe: When you figure out an esoteric thing Pin
raddevus4-Feb-21 11:33
mvaraddevus4-Feb-21 11:33 
GeneralRe: When you figure out an esoteric thing Pin
OriginalGriff4-Feb-21 11:51
mveOriginalGriff4-Feb-21 11:51 
GeneralRe: When you figure out an esoteric thing Pin
Peter_in_27804-Feb-21 12:57
professionalPeter_in_27804-Feb-21 12:57 
GeneralRe: When you figure out an esoteric thing Pin
raddevus5-Feb-21 2:25
mvaraddevus5-Feb-21 2:25 
GeneralRe: When you figure out an esoteric thing Pin
Peter_in_27805-Feb-21 13:06
professionalPeter_in_27805-Feb-21 13:06 
GeneralRe: When you figure out an esoteric thing Pin
John R. Shaw4-Feb-21 13:04
John R. Shaw4-Feb-21 13:04 
GeneralRe: When you figure out an esoteric thing Pin
David O'Neil4-Feb-21 18:18
professionalDavid O'Neil4-Feb-21 18:18 
GeneralRe: When you figure out an esoteric thing Pin
Jörgen Andersson5-Feb-21 1:35
professionalJörgen Andersson5-Feb-21 1:35 
GeneralRe: When you figure out an esoteric thing Pin
Kirk 103898215-Feb-21 6:29
Kirk 103898215-Feb-21 6:29 
GeneralRe: When you figure out an esoteric thing Pin
Martin ISDN7-Feb-21 23:01
Martin ISDN7-Feb-21 23:01 
GeneralAssuming a Listener Does Not Speak the Language Pin
Rick York4-Feb-21 9:45
mveRick York4-Feb-21 9:45 
GeneralRe: Assuming a Listener Does Not Speak the Language Pin
jeron14-Feb-21 9:59
jeron14-Feb-21 9:59 
GeneralRe: Assuming a Listener Does Not Speak the Language Pin
Peter_in_27804-Feb-21 10:10
professionalPeter_in_27804-Feb-21 10:10 
GeneralRe: Assuming a Listener Does Not Speak the Language Pin
Randor 4-Feb-21 11:52
professional Randor 4-Feb-21 11:52 
GeneralRe: Assuming a Listener Does Not Speak the Language Pin
Nelek4-Feb-21 21:17
protectorNelek4-Feb-21 21:17 
GeneralRe: Assuming a Listener Does Not Speak the Language Pin
Jörgen Andersson4-Feb-21 22:28
professionalJörgen Andersson4-Feb-21 22:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.