Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. When you figure out an esoteric thing

When you figure out an esoteric thing

Scheduled Pinned Locked Moved The Lounge
javahtmldatabaseoraclecom
12 Posts 8 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raddevus
    wrote on last edited by
    #1

    ...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. :rolleyes:

    OriginalGriffO K M 3 Replies Last reply
    0
    • R raddevus

      ...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. :rolleyes:

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      So write a quick article or tip - it can remind you, and maybe help some other poor sod with the same problem. Mind you, I've found some of my own tips when googling something I needed to do but forgotten I'd written about ... :-O

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      R 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        So write a quick article or tip - it can remind you, and maybe help some other poor sod with the same problem. Mind you, I've found some of my own tips when googling something I needed to do but forgotten I'd written about ... :-O

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

        R Offline
        R Offline
        raddevus
        wrote on last edited by
        #3

        OriginalGriff wrote:

        So write a quick article or tip - it can remind you, and maybe help some other poor sod with the same problem.

        But, what about my laziness...? :-O

        OriginalGriff wrote:

        I've found some of my own tips when googling something I needed to do but forgotten I'd written about ...

        I've done that too. It's really funny. And, actually, one of the main [only] reasons I joined StackOverflow and contribute is so I can find my answers later. Yes, I'm serious. :laugh: If I just put the info in a google doc or on my local disk somewhere I'd never find it. :rolleyes:

        OriginalGriffO P J J 4 Replies Last reply
        0
        • R raddevus

          OriginalGriff wrote:

          So write a quick article or tip - it can remind you, and maybe help some other poor sod with the same problem.

          But, what about my laziness...? :-O

          OriginalGriff wrote:

          I've found some of my own tips when googling something I needed to do but forgotten I'd written about ...

          I've done that too. It's really funny. And, actually, one of the main [only] reasons I joined StackOverflow and contribute is so I can find my answers later. Yes, I'm serious. :laugh: If I just put the info in a google doc or on my local disk somewhere I'd never find it. :rolleyes:

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          raddevus:

          what about my laziness...?

          Nothing I can do about that ... but think of it as investing in your future laziness? :laugh:

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          1 Reply Last reply
          0
          • R raddevus

            OriginalGriff wrote:

            So write a quick article or tip - it can remind you, and maybe help some other poor sod with the same problem.

            But, what about my laziness...? :-O

            OriginalGriff wrote:

            I've found some of my own tips when googling something I needed to do but forgotten I'd written about ...

            I've done that too. It's really funny. And, actually, one of the main [only] reasons I joined StackOverflow and contribute is so I can find my answers later. Yes, I'm serious. :laugh: If I just put the info in a google doc or on my local disk somewhere I'd never find it. :rolleyes:

            P Offline
            P Offline
            Peter_in_2780
            wrote on last edited by
            #5

            raddevus wrote:

            If I just put the info in a google doc or on my local disk somewhere I'd never find it.

            That's why so many of my "projects" include a text file howto So as long as I can remember that I did something similar already, ...

            Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

            R 1 Reply Last reply
            0
            • R raddevus

              OriginalGriff wrote:

              So write a quick article or tip - it can remind you, and maybe help some other poor sod with the same problem.

              But, what about my laziness...? :-O

              OriginalGriff wrote:

              I've found some of my own tips when googling something I needed to do but forgotten I'd written about ...

              I've done that too. It's really funny. And, actually, one of the main [only] reasons I joined StackOverflow and contribute is so I can find my answers later. Yes, I'm serious. :laugh: If I just put the info in a google doc or on my local disk somewhere I'd never find it. :rolleyes:

              J Offline
              J Offline
              John R Shaw
              wrote on last edited by
              #6

              Ah, I know that issue well. I have written in depth papers on subjects in the past, with the intention of using them as reference material at a future date. Then I either forget that a I wrote them or forget were I stored them. Either way, it is a common issue. Now if I just had the time and the wherewithal all to write a library program to keep things organize, I would probably be good to go.

              INTP "Program testing can be used to show the presence of bugs, but never to show their absence." - Edsger Dijkstra "I have never been lost, but I will admit to being confused for several weeks. " - Daniel Boone

              D 1 Reply Last reply
              0
              • J John R Shaw

                Ah, I know that issue well. I have written in depth papers on subjects in the past, with the intention of using them as reference material at a future date. Then I either forget that a I wrote them or forget were I stored them. Either way, it is a common issue. Now if I just had the time and the wherewithal all to write a library program to keep things organize, I would probably be good to go.

                INTP "Program testing can be used to show the presence of bugs, but never to show their absence." - Edsger Dijkstra "I have never been lost, but I will admit to being confused for several weeks. " - Daniel Boone

                D Offline
                D Offline
                David ONeil
                wrote on last edited by
                #7

                I created a general purpose information database I can put anything into I want (except pictures in an easy manner). It will even generate bibliographic reference citations if I go so far as to put the book, magazine, or other reference information in. And all I've used it for lately is how to use mklink! :laugh: But since I had to look it up several times before, that's enough!

                The Science of King David's Court | Object Oriented Programming with C++

                1 Reply Last reply
                0
                • R raddevus

                  OriginalGriff wrote:

                  So write a quick article or tip - it can remind you, and maybe help some other poor sod with the same problem.

                  But, what about my laziness...? :-O

                  OriginalGriff wrote:

                  I've found some of my own tips when googling something I needed to do but forgotten I'd written about ...

                  I've done that too. It's really funny. And, actually, one of the main [only] reasons I joined StackOverflow and contribute is so I can find my answers later. Yes, I'm serious. :laugh: If I just put the info in a google doc or on my local disk somewhere I'd never find it. :rolleyes:

                  J Offline
                  J Offline
                  Jorgen Andersson
                  wrote on last edited by
                  #8

                  raddevus wrote:

                  But, what about my laziness...?

                  An even better reason to write it down. You'll thank yourself next time you need it. :)

                  Wrong is evil and must be defeated. - Jeff Ello

                  1 Reply Last reply
                  0
                  • P Peter_in_2780

                    raddevus wrote:

                    If I just put the info in a google doc or on my local disk somewhere I'd never find it.

                    That's why so many of my "projects" include a text file howto So as long as I can remember that I did something similar already, ...

                    Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

                    R Offline
                    R Offline
                    raddevus
                    wrote on last edited by
                    #9

                    Peter_in_2780 wrote:

                    That's why so many of my "projects" include a text file howto So as long as I can remember that I did something similar already

                    That's actually a great idea. thx :thumbsup:

                    P 1 Reply Last reply
                    0
                    • R raddevus

                      ...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. :rolleyes:

                      K Offline
                      K Offline
                      Kirk 10389821
                      wrote on last edited by
                      #10

                      That's what BLOGS are for! LOL

                      1 Reply Last reply
                      0
                      • R raddevus

                        Peter_in_2780 wrote:

                        That's why so many of my "projects" include a text file howto So as long as I can remember that I did something similar already

                        That's actually a great idea. thx :thumbsup:

                        P Offline
                        P Offline
                        Peter_in_2780
                        wrote on last edited by
                        #11

                        find ~ -name howto or locate howto Waaay too easy!

                        Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

                        1 Reply Last reply
                        0
                        • R raddevus

                          ...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. :rolleyes:

                          M Offline
                          M Offline
                          Martin ISDN
                          wrote on last edited by
                          #12

                          > ...there is no one to celebrate with because no one else cares about it. sad but true

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups