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. Web Development
  3. JavaScript code coverage

JavaScript code coverage

Scheduled Pinned Locked Moved Web Development
javascriptcomtoolsquestion
10 Posts 3 Posters 0 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.
  • P Offline
    P Offline
    Paul Watson
    wrote on last edited by
    #1

    Anybody found anything that does code coverage of JavaScript?

    regards, Paul Watson Ireland FeedHenry needs you

    Shog9 wrote:

    eh, stop bugging me about it, give it a couple of days, see what happens.

    P L 2 Replies Last reply
    0
    • P Paul Watson

      Anybody found anything that does code coverage of JavaScript?

      regards, Paul Watson Ireland FeedHenry needs you

      Shog9 wrote:

      eh, stop bugging me about it, give it a couple of days, see what happens.

      P Offline
      P Offline
      Paeth Claudius Raphael
      wrote on last edited by
      #2

      Coverage? Or do you mean the other way around? Possibly Camouflaging scripts? You might use server-side java-scripts or signated ones. First ones are just loaded as an object or external script and accordingly set to the appropriate read-rights par ftp. If you just want to make it 'strongly not recommended' up to 'impossible' to understand what the script works out, well... What about crazy hieroglyphic names for variables, short-forms of if/then/else-constructs and as much functions as possible? If you want to make it heavily difficult for the normal user to 'see' your scripts you should use an xml-http-request instance and use it as a loader for your external javascript-segments normally bound inside the body. And then replace the innerHtml of any given Element that has an id-Tag with this script. That performs a runtime/asynchronous call of the script only accessible in RAM. No temporary files, no Cookie-handling, no Session-Sets... But if you really meant Coverage as used for covering something up, get into the details, etc. then you should install the latest opera, read anything about storing sessions and edit them in author-mode, buy a good Javascript 1.3/1.5-Reference and spent some time with HT-Tracks WebSite-Copier. With that you're on the best way to 'investigate'. You might be, because you truly don't wanted to know about simple tasks like 'hacking' and 'jacking', do you? Well, possibly i misunderstood the whole question. So, i really don't know if any of this might have had helped you if you're through with practicing it, but maybe? Just try it, take your time. If you got special questions you're free to send me an e-Mail. Please be specific and precisely as you're able if you're asking for help. You know, code is poetry, fine and tasty; ...but taste sometimes isn't discussable. You're Welcome, Paeth.Claudius-Raphael

      P 1 Reply Last reply
      0
      • P Paeth Claudius Raphael

        Coverage? Or do you mean the other way around? Possibly Camouflaging scripts? You might use server-side java-scripts or signated ones. First ones are just loaded as an object or external script and accordingly set to the appropriate read-rights par ftp. If you just want to make it 'strongly not recommended' up to 'impossible' to understand what the script works out, well... What about crazy hieroglyphic names for variables, short-forms of if/then/else-constructs and as much functions as possible? If you want to make it heavily difficult for the normal user to 'see' your scripts you should use an xml-http-request instance and use it as a loader for your external javascript-segments normally bound inside the body. And then replace the innerHtml of any given Element that has an id-Tag with this script. That performs a runtime/asynchronous call of the script only accessible in RAM. No temporary files, no Cookie-handling, no Session-Sets... But if you really meant Coverage as used for covering something up, get into the details, etc. then you should install the latest opera, read anything about storing sessions and edit them in author-mode, buy a good Javascript 1.3/1.5-Reference and spent some time with HT-Tracks WebSite-Copier. With that you're on the best way to 'investigate'. You might be, because you truly don't wanted to know about simple tasks like 'hacking' and 'jacking', do you? Well, possibly i misunderstood the whole question. So, i really don't know if any of this might have had helped you if you're through with practicing it, but maybe? Just try it, take your time. If you got special questions you're free to send me an e-Mail. Please be specific and precisely as you're able if you're asking for help. You know, code is poetry, fine and tasty; ...but taste sometimes isn't discussable. You're Welcome, Paeth.Claudius-Raphael

        P Offline
        P Offline
        Paul Watson
        wrote on last edited by
        #3

        hehe, thanks for trying elyphe but that isn't what I meant. Code coverage is part of testing your applications. So you run unit tests and then you get coverage stats that tell you how much of your code is tested. It is a pretty important part of testing. Wikipedia has a good explanation[^].

        regards, Paul Watson Ireland FeedHenry needs you

        Shog9 wrote:

        eh, stop bugging me about it, give it a couple of days, see what happens.

        P 1 Reply Last reply
        0
        • P Paul Watson

          Anybody found anything that does code coverage of JavaScript?

          regards, Paul Watson Ireland FeedHenry needs you

          Shog9 wrote:

          eh, stop bugging me about it, give it a couple of days, see what happens.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Might this help http://www.softwareverify.com/productsJavaScript.html[^]

          P 1 Reply Last reply
          0
          • L Lost User

            Might this help http://www.softwareverify.com/productsJavaScript.html[^]

            P Offline
            P Offline
            Paul Watson
            wrote on last edited by
            #5

            Thansk Richard. It is currently in closed beta with a release planned for next week. It won't be free though and it is the only one I have found. We need choice, including OS options like I have for unit testing and CI builds.

            regards, Paul Watson Ireland FeedHenry needs you

            Shog9 wrote:

            eh, stop bugging me about it, give it a couple of days, see what happens.

            1 Reply Last reply
            0
            • P Paul Watson

              hehe, thanks for trying elyphe but that isn't what I meant. Code coverage is part of testing your applications. So you run unit tests and then you get coverage stats that tell you how much of your code is tested. It is a pretty important part of testing. Wikipedia has a good explanation[^].

              regards, Paul Watson Ireland FeedHenry needs you

              Shog9 wrote:

              eh, stop bugging me about it, give it a couple of days, see what happens.

              P Offline
              P Offline
              Paeth Claudius Raphael
              wrote on last edited by
              #6

              Thanks for the advice during the wikipedia link. Okay, now i know. But to be true i would've never ever thought that there are people in this world that check how complete (or better: at which rate) a code-complex was testet. You need those results for planning projects and to see how efficioent your coder's section is by presenting your continuous struggle to financier's, huh? (...action ...reaction; uuuaaaargh!) Whatever, i think my first reply might have amused you under that conditions, hehe But isn't it possible to use the watcher/debugger/slayer functions given in ecclipse, flash 8, .Net St. 2005 or even in Office's Java Script Debugger? I mean, where's the problem to filter out the JIT-Message-Handles? As far as i know you have full capability to revise any single phrase of a conduct in runtime or even run marked parts in statistic mode, so it catches what you want. But probably i'm once again too far away from that piece of reality you've asked for. Won't make any more suggestions, sorry, i think it's better to shut up sometimes.... 8)

              Well, i really don't know if any of this might have had helped you if you're through with practicing it, but maybe? Just try it, take your time. If you got special questions you're free to send me an e-Mail. Please be specific and precisely as you're able if you're asking for help. You know, code is poetry, fine and tasty; ...but taste sometimes isn't discussable. You're Welcome, Paeth.Claudius-Raphael

              P 1 Reply Last reply
              0
              • P Paeth Claudius Raphael

                Thanks for the advice during the wikipedia link. Okay, now i know. But to be true i would've never ever thought that there are people in this world that check how complete (or better: at which rate) a code-complex was testet. You need those results for planning projects and to see how efficioent your coder's section is by presenting your continuous struggle to financier's, huh? (...action ...reaction; uuuaaaargh!) Whatever, i think my first reply might have amused you under that conditions, hehe But isn't it possible to use the watcher/debugger/slayer functions given in ecclipse, flash 8, .Net St. 2005 or even in Office's Java Script Debugger? I mean, where's the problem to filter out the JIT-Message-Handles? As far as i know you have full capability to revise any single phrase of a conduct in runtime or even run marked parts in statistic mode, so it catches what you want. But probably i'm once again too far away from that piece of reality you've asked for. Won't make any more suggestions, sorry, i think it's better to shut up sometimes.... 8)

                Well, i really don't know if any of this might have had helped you if you're through with practicing it, but maybe? Just try it, take your time. If you got special questions you're free to send me an e-Mail. Please be specific and precisely as you're able if you're asking for help. You know, code is poetry, fine and tasty; ...but taste sometimes isn't discussable. You're Welcome, Paeth.Claudius-Raphael

                P Offline
                P Offline
                Paul Watson
                wrote on last edited by
                #7

                Thanks for the idea on using watcher/debugger in Eclipse or VS 2005, that might just work though.

                Paeth.Claudius-Raphael wrote:

                ou need those results for planning projects and to see how efficioent your coder's section is by presenting your continuous struggle to financier's, huh?

                No, it is for my own benefit. Would you write code without unit tests? I wouldn't anymore and I also hate to write code without code coverage analsysis too. Unit tests without code coverage are less effective. You can be sure you will miss certain paths through your code. Code coverage will tell you what extra tests you need to write to cover all your code.

                regards, Paul Watson Ireland FeedHenry needs you

                Shog9 wrote:

                eh, stop bugging me about it, give it a couple of days, see what happens.

                P 1 Reply Last reply
                0
                • P Paul Watson

                  Thanks for the idea on using watcher/debugger in Eclipse or VS 2005, that might just work though.

                  Paeth.Claudius-Raphael wrote:

                  ou need those results for planning projects and to see how efficioent your coder's section is by presenting your continuous struggle to financier's, huh?

                  No, it is for my own benefit. Would you write code without unit tests? I wouldn't anymore and I also hate to write code without code coverage analsysis too. Unit tests without code coverage are less effective. You can be sure you will miss certain paths through your code. Code coverage will tell you what extra tests you need to write to cover all your code.

                  regards, Paul Watson Ireland FeedHenry needs you

                  Shog9 wrote:

                  eh, stop bugging me about it, give it a couple of days, see what happens.

                  P Offline
                  P Offline
                  Paeth Claudius Raphael
                  wrote on last edited by
                  #8

                  For real, i understand what you had in mind, but on my side it's another task, because i don't code complete applications. Most of the time i'll just help out with modularized components developed under the aspect of following truly the given guideline and therefor restrictions; so i never had the problem to make the impossible possible and code up a fully featured app running independent. The code clips i've produced since yet, have been almost small (about 300 to 500 wraps) the biggest one was building a pure scripted 3D-Tetris-Variant (About 4800 wraps). That was the first project where i ever used try-catch-blocks and similar functions, so you see, i'm no pro. Just spending my time with that to get deeper into it. I also have absolutely no plan, what kind of tools are out their for scripting purposes, because i do coding by writing on paper, imagining it overall, then script it module per module, class by class and in the end when i got every necessary particle, i put it together. That's why i never have had problems with debugging until now. I'll do the main testing while i make changes and in the end completely roll-up the whole set manually under certain conditions. So again, it's not professional, but i can learn how it comes to the failures the code produces. And i think you're winning with it, because the library i got now after 2 to 3 years of massive scripting is mostly reusable, what gives me benefit in time and less stress for working on new projects. Well, it's all in the head (though clean and precisely documented), but i am the coder who has to use these scripts, so they are my tools and spare parts. Sorry, if i disturbed your peace with these statements, but i wonder how others, like you, who are interested in doing things the processing professional way, think about it. If you might wanna answer, feel free, it would be nice to read your opinion. You know, code is poetry, fine and tasty; ...but taste sometimes isn't discussable. You're Welcome, Paeth.Claudius-Raphael

                  P 1 Reply Last reply
                  0
                  • P Paeth Claudius Raphael

                    For real, i understand what you had in mind, but on my side it's another task, because i don't code complete applications. Most of the time i'll just help out with modularized components developed under the aspect of following truly the given guideline and therefor restrictions; so i never had the problem to make the impossible possible and code up a fully featured app running independent. The code clips i've produced since yet, have been almost small (about 300 to 500 wraps) the biggest one was building a pure scripted 3D-Tetris-Variant (About 4800 wraps). That was the first project where i ever used try-catch-blocks and similar functions, so you see, i'm no pro. Just spending my time with that to get deeper into it. I also have absolutely no plan, what kind of tools are out their for scripting purposes, because i do coding by writing on paper, imagining it overall, then script it module per module, class by class and in the end when i got every necessary particle, i put it together. That's why i never have had problems with debugging until now. I'll do the main testing while i make changes and in the end completely roll-up the whole set manually under certain conditions. So again, it's not professional, but i can learn how it comes to the failures the code produces. And i think you're winning with it, because the library i got now after 2 to 3 years of massive scripting is mostly reusable, what gives me benefit in time and less stress for working on new projects. Well, it's all in the head (though clean and precisely documented), but i am the coder who has to use these scripts, so they are my tools and spare parts. Sorry, if i disturbed your peace with these statements, but i wonder how others, like you, who are interested in doing things the processing professional way, think about it. If you might wanna answer, feel free, it would be nice to read your opinion. You know, code is poetry, fine and tasty; ...but taste sometimes isn't discussable. You're Welcome, Paeth.Claudius-Raphael

                    P Offline
                    P Offline
                    Paul Watson
                    wrote on last edited by
                    #9

                    I might have you wrong but I think it is dangerous to be over condifent when it comes to coding. Any reasonably complex system is too big to fit into your head as a whole. That is why unit testing couple with code coverage is such a useful tool. No programmer I have ever known can understand every single path through a system. Those that said they can are invariably proven wrong with some code coverage analysis. And it applies whether you are doing applications or libraries. It is all code at the end of the day and all code contains multiple paths.

                    regards, Paul Watson Ireland FeedHenry needs you

                    Shog9 wrote:

                    eh, stop bugging me about it, give it a couple of days, see what happens.

                    P 1 Reply Last reply
                    0
                    • P Paul Watson

                      I might have you wrong but I think it is dangerous to be over condifent when it comes to coding. Any reasonably complex system is too big to fit into your head as a whole. That is why unit testing couple with code coverage is such a useful tool. No programmer I have ever known can understand every single path through a system. Those that said they can are invariably proven wrong with some code coverage analysis. And it applies whether you are doing applications or libraries. It is all code at the end of the day and all code contains multiple paths.

                      regards, Paul Watson Ireland FeedHenry needs you

                      Shog9 wrote:

                      eh, stop bugging me about it, give it a couple of days, see what happens.

                      P Offline
                      P Offline
                      Paeth Claudius Raphael
                      wrote on last edited by
                      #10

                      You really woke my interest for the 'code coverage'-thang. You got some good (res)sources to become informed about the procedere/schemes used in cc-analysis? I want to read some more about that. To point it out: No, i think you don't got me wrong and i know that it sounds self-confident in the way i told my thoughts 'bout that thematic. You might understand if you think of it as my specialty, meaning the way of handling systems. I don't know why, but like others who are able to describe pictures precisely which they've seen once for some seconds (and that years before...), i'm able to memorize how dataflow behaves and to predict how it should by source but in reality will, because of the surrounding setup. I think it is because i started with, e.g. assembler on 6510 when i was nine to ten years old and stepped on to fortran, cobol, etc. and 68k assembler just a year later. Or another example; due to interest i was able to speak english (in simple sentences) before i got into school, just by hearing music and listen to the talks of my aunt and their irish and english friends. (I'm native german, sorry.. forgot to tell about that) Well, however that's really nothing special. Just interest & training. I thought it possibly might let you follow my mind with that background-information. That's why i'm telling you. So back to my request, if you have some links or literature to get deeper into it, please send some more info. Or (it sounds like) if you have gathered information in your own projects about the efficiency the analysis brought to your codework, please tell some' details. I think it is most interesting to hear/read special reports from insiders. ... Wow, seems you really really woke my interest for that, because of the confusing stack of words i call sentences. The bunch of letters i produced in here gives no sense it seems. payah, what da heck, nevertheless, would be nice to read from you... You know, code is poetry, fine and tasty; ...but taste sometimes isn't discussable. You're Welcome, Paeth.Claudius-Raphael

                      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