Re: [U2] Code Coverage Project

2009-11-27 Thread Dan McGrath
Hi Tony,

If you are unfamiliar with Code Coverage, this may help:
http://en.wikipedia.org/wiki/Code_coverage

Does this identify where variables are used? No

Variables that aren't used? No, not directly. Although, you may find
some as a result of below

When they are changed? No

Why they mean? No?

How data moves from one program to another? No

When statements are executed? Yes. This is the purpose of Statement
level code coverage. Essentially, it is like the profiling option
UniData provides, but at a statement level, not at a called subroutine
level.

What statements cannot be executed?  If you replace 'cannot' with
'have not', then yes.

I hope it makes more sense now,
Dan



I've read your blog notes and anything else I can find but I have
no idea what this does.  Could you please define the term
"coverage" in this context?

Does this identify where variables are used?
Variables that aren't used?
When they are changed?
Why they mean?
How data moves from one program to another?
When statements are executed?
What statements cannot be executed?

I have written many parsers and pseudo compilers and code
interpreters - but I'm sorry I just don't understand what this
one does.  :)

Thanks.
T

>* From: Dan McGrath*>* For those that are interested, I have setup a project 
>*>* on SourceForge for a Statement Level Code Coverage *>* Tool for UniBasic. 
>It is based on the prototype for a *>* similar tool we now use at my current 
>employer.*>* *>* Although this version is incomplete, it still enables *>* 
>statement level coverage for multiple *>* programs/subroutine with html 
>output. The "parser" (I *>* really shouldn't use that term) is still quite *>* 
>primitive in this version and may not work with how *>* some programs are 
>coded.*

*
*
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Code Coverage Project

2009-11-27 Thread Dan McGrath
Yes, we use it in QA to ensure that we have tested all major sections
so that we are more confident in sending it to User Acceptance Testing
and then Production. However, we doing use it in production support
and programming too.

Say you have a large processing program with several complex
conditions being required to be met before it will continue. If it
isn't met, it doesn't tell you why. You could:

1) Modify the program to include CRT trace statements to determine
where it bailed

2) Walkthrough it with debugging on.

3) Run it with code coverage and check the report, which will quickly
show you where it bailed.

Obviously, you would prefer the program to have been better in the
first place, but when working with 3000+ programs, most of them circa
1995 or before, you don't always have that luxury. We have used this
method to decent effect in speeding up the time to locate and fix
bugs. Obviously, YMMV and it shouldn't be used as a silver bullet,
just were most effective.

As a final note on the subject, I am unsure of why you would think
being a "UniBasic" programmer should make a difference? Software
development is software development. Being on a U2 system doesn't (and
shouldn't) mean modern practices do not apply.



As to why not just modified jcoverage or the like. Firstly, BDT does
not work for us. We can not actually run or debug via BDT due to
several architectural problems that cannot be solved on our system. We
also could not run any variety that ran directly on the OS for the UD
box either due to a lot of red tape of access privileges and security
policies. This left us with the requirement that it must be coded and
run in native UniBasic, hence this project.

Naturally, other people my be in a different boat from us and this
project may be useless to them. However, maybe it will benefit
somebody else, so here it is.

Horses for Courses, as the saying goes.


Dan


**

It won't be used by programmers but would by QC/QA types to check and see if
the code is being used or is just a bunch of fluff. One good example would
be if your company is using outsourcing to do your programming and the
outsource is getting paid on the amount of code they produce, instead of the
correct way of getting paid on the quality of their code. You can check to
see if all paths through the code are being used or not.

Jerry Banker

-Original Message-
From: u2-users-bounces at listserver.u2ug.org

[mailto:u2-users-bounces at listserver.u2ug.org
] On Behalf Of
Doug
Sent: Friday, November 27, 2009 10:47 AM
To: 'U2 Users List'
Subject: Re: [U2] Code Coverage Project

Dan,

Although I missed code coverage in programming school, I'm not sure how much
UniBasic
programmers would or could use code coverage. That being said, why not take
an existing
program that is fully developed and change the syntax to handle basic
syntax.  This way
you do not have to develop the entire infastracture to run this tool.

My suggestion is there are several open source plug-in for Eclipse that can
be modified
to handle code coverage.  There are several examples like jcoverage or gcov
that could
be used for this type of project.

Regards,
Dougwww.u2logic.com
"Native U2 drivers for PHP"



-Original Message-
From: u2-users-bounces at listserver.u2ug.org

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Code Coverage Project

2009-11-27 Thread Tony Gravagno
I've read your blog notes and anything else I can find but I have
no idea what this does.  Could you please define the term
"coverage" in this context?

Does this identify where variables are used?
Variables that aren't used?
When they are changed?
Why they mean?
How data moves from one program to another?
When statements are executed?
What statements cannot be executed?

I have written many parsers and pseudo compilers and code
interpreters - but I'm sorry I just don't understand what this
one does.  :)

Thanks.
T

> From: Dan McGrath
> For those that are interested, I have setup a project 
> on SourceForge for a Statement Level Code Coverage 
> Tool for UniBasic. It is based on the prototype for a 
> similar tool we now use at my current employer.
> 
> Although this version is incomplete, it still enables 
> statement level coverage for multiple 
> programs/subroutine with html output. The "parser" (I 
> really shouldn't use that term) is still quite 
> primitive in this version and may not work with how 
> some programs are coded.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Code Coverage Project

2009-11-27 Thread jpb-u2ug
It won't be used by programmers but would by QC/QA types to check and see if
the code is being used or is just a bunch of fluff. One good example would
be if your company is using outsourcing to do your programming and the
outsource is getting paid on the amount of code they produce, instead of the
correct way of getting paid on the quality of their code. You can check to
see if all paths through the code are being used or not.

Jerry Banker

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug
Sent: Friday, November 27, 2009 10:47 AM
To: 'U2 Users List'
Subject: Re: [U2] Code Coverage Project

Dan,

Although I missed code coverage in programming school, I'm not sure how much
UniBasic
programmers would or could use code coverage. That being said, why not take
an existing
program that is fully developed and change the syntax to handle basic
syntax.  This way
you do not have to develop the entire infastracture to run this tool.

My suggestion is there are several open source plug-in for Eclipse that can
be modified
to handle code coverage.  There are several examples like jcoverage or gcov
that could
be used for this type of project.

Regards,
Doug
www.u2logic.com
"Native U2 drivers for PHP"



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath
Sent: Thursday, November 26, 2009 2:35 PM
To: U2 Users List
Subject: [U2] Code Coverage Project

Hi all,

 

For those that are interested, I have setup a project on SourceForge for a
Statement Level Code Coverage Tool for UniBasic. It is based on the
prototype for a similar tool we now use at my current employer.

 

Although this version is incomplete, it still enables statement level
coverage for multiple programs/subroutine with html output. The "parser"
(I really shouldn't use that term) is still quite primitive in this version
and may not work with how some programs are coded.

 

http://sourceforge.net/projects/ucov/

 

For a screen shot of the output and a short post about it, visit:
http://u2tech.wordpress.com/

 

Regards,

Dan

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Code Coverage Project

2009-11-27 Thread Doug
Dan,

Although I missed code coverage in programming school, I'm not sure how much
UniBasic
programmers would or could use code coverage. That being said, why not take
an existing
program that is fully developed and change the syntax to handle basic
syntax.  This way
you do not have to develop the entire infastracture to run this tool.

My suggestion is there are several open source plug-in for Eclipse that can
be modified
to handle code coverage.  There are several examples like jcoverage or gcov
that could
be used for this type of project.

Regards,
Doug
www.u2logic.com
"Native U2 drivers for PHP"



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan McGrath
Sent: Thursday, November 26, 2009 2:35 PM
To: U2 Users List
Subject: [U2] Code Coverage Project

Hi all,

 

For those that are interested, I have setup a project on SourceForge for a
Statement Level Code Coverage Tool for UniBasic. It is based on the
prototype for a similar tool we now use at my current employer.

 

Although this version is incomplete, it still enables statement level
coverage for multiple programs/subroutine with html output. The "parser"
(I really shouldn't use that term) is still quite primitive in this version
and may not work with how some programs are coded.

 

http://sourceforge.net/projects/ucov/

 

For a screen shot of the output and a short post about it, visit:
http://u2tech.wordpress.com/

 

Regards,

Dan

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users