Re: [tclwebtest] Passing variable parameters to test scripts
Status: Abandoned
Brought to you by:
tils
From: Grzegorz A. H. <gr...@ef...> - 2003-01-27 17:04:31
|
On Wed, Jan 22, 2003 at 07:13:35PM +0100, Grzegorz Adam Hankiewicz wrote: > Running generate_docs I found about a wrong variable, so here's > a fixed patch, it also improves a little bit the documentation of > the procedures. Ok, another thing which was missing in this patch was that when something failed while using memory strings, tclwebtest wouldn't log the lines which caused the error, since there's no file code_lines can open. Applying this patch over fixes that (you will note it also includes the change of ::tclwebtest::log to public), and now five lines of code are shown delimited with special markers. Example: ----- START: in_memory string at [27/Jan/2003:17:52:22] ----- --- do_request for http://www.efaber.net/ http status: >>200<< Assertion "[regexp -nocase $search_expr $::tclwebtest::body]" failed. in script body line 13 ... SOURCE CODE ... assert text "proporciona desarrollos de servicios web personalizados" #asdasd # verificación de código html assert full "<p><li><b>Opttimizar" ^^^^^ ERROR ^^^^^ ----- FAILED: in_memory string (took 1s) ----- The code to extract those lines is very rudimentary. I miss python's in memory file object abstraction! At the moment it just takes the code contained in the memory string and starts butchering it until only five lines of text are left. I could write it much better if [string first] allowed a starting character as parameter, because I wouldn't need to chop so many times the string, but looks like it doesn't. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |