|
From: Abhishek T. <abh...@au...> - 2015-12-18 17:31:22
|
Hi ,
I am trying to do code coverage for my code : html+tcl(tml code)
I got to learn that :
the tml files are evaluated in the tclhttpd3.5.1/template.tcl source file,
from lines 150ff.
They are sourced into the slave interpreter at line 308.
I have tried to apply activestate coverage over the doc.tcl(my tcl file
corresponding to template.tcl)
i.e. function : proc Doc_text/html {path suffix sock} {
Lines : 1185-121 , in the doc.tcl(attached doc4.csv)
Attached is the coverage for these lines. I am not sure if my original tml
code is covered here this way.
If so, how will my map my original tcl+html code to the converted.
Also, see if the converted code as above.
Could you please comment
Regards
Abhishek
---------- Forwarded message ----------
From: Abhishek Tiwari <abh...@au...>
Date: Fri, Dec 18, 2015 at 10:11 PM
Subject: Fwd: [Tclhttpd-users] Code coverage tool for tcl
To: Jan Kandziora <jj...@gm...>
Attached is the coverage for doc.tcl Line : 1185-1214 correspoding to the
lines 150ff of template.tcl (in file doc4)
Function name : proc Doc_text/html {path suffix sock} {
Do I need to cover beyond this line as well
Regards
Abhishek
---------- Forwarded message ----------
From: Abhishek Tiwari <abh...@au...>
Date: Fri, Dec 18, 2015 at 8:49 PM
Subject: Re: [Tclhttpd-users] Code coverage tool for tcl
To: Jan Kandziora <jj...@gm...>
proc Doc_text/html of our code is in attached doc.tcl, So rather than using
third party tclhttpd3.5.1/template.tcl(line 150ff). I havd tried to add
some codecoverage at the place recommmended..
Though not sure yet, what does the result mean...the csv(attached - result
of the activestate) has statements for doc.tcl
My tml code is something like :
I assume what is covered in the csv file is pure.tcl. So how would I map
the tml to the pure tcl code covered
Could you please comment its it covering the relevent code..
Best Regards
Abhishek
On Wed, Nov 11, 2015 at 3:51 AM, Jan Kandziora <jj...@gm...> wrote:
> Am 10.11.2015 um 17:43 schrieb Abhishek Tiwari:
> > Hi Jan
> > My code system has tml files like : new.tml(attached)
> > These are called when I perform some GUI specific operation.
> > These are also tcl file right? but with different extension(.tml)
> >
> No, they aren't. Tml files are specific to tclhttpd. They are intended
> to be a mix of HTML and Tcl, similar to PHP files for a webserver which
> is able to handle PHP templates.
>
> http://wiki.tcl.tk/11249
> http://wiki.tcl.tk/11251
>
> The basic idea behind tml files is Tcl is able to execute code from
> strings. Well, that's the core of Tcl. Execute code from strings.
>
> So Tclhttpd reads those tml files, separates the Tcl parts from the HTML
> frame, feeds the Tcl parts into sandboxes (a safe Tcl slave interpreter
> again), then takes the results and stuffs it back into the HTML frame.
> Result is a HTML source which is then sent to the browser.
>
> The mechanism for this is at tclhttpd3.5.2/template.tcl, line 150ff. You
> can add your coverage instrumentation there.
>
>
> > The code coverage tool at activestate is not identifying these tml files
> >
> Fair enough given that tml files are an application specific thing.
>
>
> Kind regards
>
> Jan
>
>
|