tclwebtest-general Mailing List for tclwebtest (Page 4)
Status: Abandoned
Brought to you by:
tils
This list is closed, nobody may subscribe to it.
2003 |
Jan
(31) |
Feb
(61) |
Mar
(34) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
(11) |
Aug
(17) |
Sep
(8) |
Oct
(7) |
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
(2) |
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
(1) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Grzegorz A. H. <gr...@ef...> - 2003-07-24 10:54:49
|
Hi. Just writting some test cases and found that there are some forms with filled fields where I would like to append something to a field instead of filling it, operation which deletes the current content. So I propose something like `field append' which behaves exactly like `field fill' when the text area is empty. Maybe I can write this it in the next days, just posting here in case I forget or somebody else is quicker. -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-07-24 08:32:46
|
On 2003-07-23, "Molek, Gordon" <GM...@ze...> wrote: > I'm evaluating tclwebtest and can call do_request > with a "<file://....>; URL, or a domain name URL (e.g., > "<http://www.google.com>;), but if I specify a URL using dotted > decimal notation (e.g., "<http://216.239.39.99>;) the do_request > call doesn't return a token (there's no error message displayed). I suspect you are not using a recent version? Could you provide a test case? I have tried the following test case with 0.3 which correctly shows the latter output: -- test unit set blah [do_request http://192.168.1.50:8014] log [response text] log "JJJJJJJJJJJJJJJJJJJJJJJJ $blah" set blah [do_request http://216.239.39.99] log [response text] log "KKKKKKKKKKKKKKKKKKKKKKK $blah" -- resumed output ----- START: test at [24/jul/2003:10:28:26] ----- --- do_request for http://192.168.1.50:8014 http status: >>302<< following a redirect to: http://192.168.1.50:8014/index --- do_request for http://192.168.1.50:8014/index http status: >>302<< following a redirect to: http://192.168.1.50:8014/cpub --- do_request for http://192.168.1.50:8014/cpub http status: >>302<< following a redirect to: http://192.168.1.50:8014/cpub/ --- do_request for http://192.168.1.50:8014/cpub/ http status: >>302<< following a redirect to: http://192.168.1.50:8014/cpub/index --- do_request for http://192.168.1.50:8014/cpub/index http status: >>200<< [here some text from local test server] JJJJJJJJJJJJJJJJJJJJJJJJ http://192.168.1.50:8014 --- do_request for http://216.239.39.99 http status: >>200<< Google English Web Images Groups Directory News document.f.q.focus(); blah blah blah blalh KKKKKKKKKKKKKKKKKKKKKKK http://216.239.39.99 ----- SUCCESS: test (took 1s) ----- DURATION: 1 PD: Til, this time Google didn't throw me back. Maybe they lifted the tclwebtest user agent restriction... -- 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) |
From: Molek, G. <GM...@ze...> - 2003-07-23 19:04:34
|
I'm evaluating tclwebtest and can call do_request with a "<file://....>; URL, or a domain name URL (e.g., "<http://www.google.com>;), but if I specify a URL using dotted decimal notation (e.g., "<http://216.239.39.99>;) the do_request call doesn't return a token (there's no error message displayed). Thanks in advance, Gordon Molek |
From: Grzegorz A. H. <gr...@ef...> - 2003-06-04 17:41:53
|
Or at least I've crashed agains such cases, so I've commited this fix: Index: tclwebtest.tcl =================================================================== RCS file: /cvsroot/tclwebtest/tclwebtest/lib/tclwebtest.tcl,v retrieving revision 1.39 diff -u -r1.39 tclwebtest.tcl --- tclwebtest.tcl 3 Jun 2003 00:23:54 -0000 1.39 +++ tclwebtest.tcl 4 Jun 2003 17:40:03 -0000 @@ -2259,7 +2259,7 @@ if { $http_status == "302" || $http_status == "301" } { for { set i 0 } { $i < [llength $meta] } { incr i 2 } { if { [string match -nocase [lindex $meta $i] "location"] } { - set location [string trim [lindex $meta [expr $i+1]]] + set location [translate_entities [string trim [lindex $meta [expr $i+1]]]] break } } @@ -2285,6 +2285,7 @@ } elseif { [regexp -expanded -nocase $regexp_script_before_html $http_result(body) match location] } { # a very silly form of redirect, with a <script> thingy before # the <html> + set location [translate_entities $location] if $noredirect_p { log "ignoring stupid redirection to: $location" set final_url $location @@ -2296,6 +2297,7 @@ } } elseif { $followequiv_p && [regexp -expanded -nocase $regexp_http_equiv_redirect $http_result(body) match delay location] } { # the http-equiv sort of redirect. ugh. + set location [translate_entities $location] log "stupid redir after $delay secondes to: $location" # optionally we could take the delay into account -- 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) |
From: Tilmann S. <ti...@ti...> - 2003-06-02 17:53:30
|
* chluo <ch...@us...> [20030602 12:17]: > Some web sessions like to use an HTTP filed "Set-Cookie" in > their HTTP headers to indicate that clients should set specific > cookies in subsequent requests, but I found that tclwebtest ignored > this. In most cases, such tests will fail. Could you please post a test script so that this can be reproduced? I don't see an immediate reason why subsequent Set-Cookie headers would be ignored. til -- http://tsinger.com |
From: Tilmann S. <ti...@ti...> - 2003-05-26 18:25:19
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030519 17:33]: > Hi everyone, it's been a long time. Absolutely, sorry for not responding earlier. > Til, tclwebtest seems to be ready for another release (0.3?). It's > better to release early, and release often. Here's a proposed > changelog I've compiled reading CVS's log. Thanks a lot for the reminder - I just released tclwebtest-0.3, and added a ChangeLog file. I'm going to add it to the freshmeat listing as well. There are still lots of open issues (and unanswered mail in my inbox :-( ), but waiting until everything is resolved is not realistic. til -- http://tsinger.com |
From: Grzegorz A. H. <gr...@ef...> - 2003-05-19 14:49:03
|
Hi everyone, it's been a long time. Til, tclwebtest seems to be ready for another release (0.3?). It's better to release early, and release often. Here's a proposed changelog I've compiled reading CVS's log. -new improved documentation -fixed bug of `file dirname' being called once to often -https support through tls library -correct handling of xhtml redirects -fixed cookie trailing garbage parsing error -correct url reconstruction with double slashes (ie: slashdot) -allowed permanent redirections with -nocomplain -added referer support for http requests -added form get support -added user agent id faking -text searches in links are done correctly -better URL directory traversal function -dorequest new -nocomplain_list parameter -HTML entities correctly substituted in URLs -fixed internal counter bug in form processing -added support for basic http authentication (apache) through base64 package -redirection URLs can be processed step by step -can be called as library without temporary files -- 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) |
From: Vinod K. <vi...@ku...> - 2003-05-01 04:27:15
|
> What do I have to do to upload a file through a form? The Tcl/Tk > manual I have here only talks about fetching urls, not posting files. Jeff Hobbs has written a snippet to do file upload via Tcl: <http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/109363> Vinod |
From: Tilmann S. <ti...@ti...> - 2003-04-03 04:55:30
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030402 14:46]: > Teorically a speedup could be gained by using libraries like expat > through a tcl binding. It's not critical for us at the moment, > but I wanted to point this out in case somebody else wondered why a > "field find" can slow down things a lot. I experimented with the html mode of tdom some time ago, and found that while it would provide an incredible speedup, it crashed on some not-so-exotic pages, which made it not really usable at that point (Version 0.7.5). Below my comments about the testing. segfaults when form tag not closed (under some circumstances, not clear which) ä works, ö and ü not: "can only handle UTF-8 chars up to 3 bytes long." ??? Also this is some kind of non-catchable error, which crashes the tcl interpreter - Bad. error when table tag inside form not closed. Unclosed tr inside table is ok though. til -- http://tsinger.com |
From: Grzegorz A. H. <gr...@ef...> - 2003-04-02 14:43:45
|
Hi. With complex forms, the use of "field find" can increase the execution time of the test unit from one or two seconds to over 20. The bottleneck is found in extract_forms_if_necessary around line 2750, the second loop, which uses a regular expression to find all the form fields once per form field. Teorically a speedup could be gained by using libraries like expat through a tcl binding. It's not critical for us at the moment, but I wanted to point this out in case somebody else wondered why a "field find" can slow down things a lot. -- 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) |
From: Peter M. <pet...@fa...> - 2003-03-27 19:37:21
|
Grzegorz, I think the before and after modifiers that you are suggesting for the link find command would be very useful. I was looking for a feature like this when I was writing the install scripts for dotLRN. Just as in your example it is often very useful to be able to iterate over links in an HTML table based on text before or after the links in the same table row. Thanks for all the great improvements you are making to Tclwebtest! Peter =20 ---------------------------- Peter Marklund C/O Thomas Sch=F6nbeck Oster Farimagsgade 77 2100 Copenhagen Denmark Work Phone: +45-33436380 Mobile phone: +45-20820101 Home phone: +45-35559440 http://collaboraid.biz http://petermarklund.com ---------------------------- http://fastmail.fm - the way e-mail *should* be |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-27 17:41:41
|
The link command is ok when you can differentiate links through their text or their urls. However, there are many pages where links are presented in a table, and the differentiative text is in one column as normal text, and the related links are in another column but with symbolic names in their urls. This scenario is usually found in dynamic pages which read from a database and use internal identificatives to point to the url: ..../show-this?id=xxx where xxx is an unrelated number. At the moment the only way to find correctly a link among many of these choices is to use a regexp on [response body]. A solution would be adding to link -find the modifiers (b)efore and (a)fter, which would select the link only if the specified regexp is found before/after the link, of course using neighbour links as search limits. A -prev option would be useful with this system too. Possible example: do_request http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tclwebtest/tclwebtest/selftest/ link find 1.1 ~a "*** empty log message ***" link find -prev # now caption2.html would be selected at the moment of writting this The capitalised version of ~a/b would search in html code instead of text. -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-27 16:07:58
|
I've commited this patch too, which shows a sometimes more convenient assert command. -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-24 15:41:01
|
Hi. What do I have to do to upload a file through a form? The Tcl/Tk manual I have here only talks about fetching urls, not posting files. -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-24 15:07:47
|
Hi, some low priority suggestions. This command would work nearly like do_request, but instead of doing a GET request, it would only make a HEAD request. Its use would be obviously to validate the links of a page without having to retrieve their contents. Maybe along this command another one named 'img' could exist, which works like 'link' but retrieving the information of images instead of links. Using does_exist with img would then allow easy graphic validation of pages. -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-19 14:59:47
|
Yesterday I downloaded a windows Tcl/Tk distribution with prowrapper and created a 0.9Mb autonomous binary which can run test units, much better compared to the 8Mb download for Tcl/Tk, and doesn't need installation. I guess I could upload it to SourceForge if somebody is interested on it, I haven't read the license of prowrapper, though... -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-06 18:47:18
|
Hi. Now this command accepts regular expressions to limit the obtained results. Also two parameters where added: -onlyurl (doesn't return the full array) and -absolute (modifies the links before returning them). A test case was added accordingly. -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-06 17:00:18
|
On Wed, Mar 05, 2003 at 04:10:55PM +0100, Grzegorz Adam Hankiewicz wrote: > It's not a requested feature yet, I was just asking. If I have to > solve this problem in the future I will try this callback approach > first and get back to you with the results. Attached is my attempt to make this working, but everything fails: the callback command is simply ignored and vwait fails always. However, if I run the attached shell script it all works ok. What's happening? -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-06 15:09:56
|
On Wed, Mar 05, 2003 at 07:05:06PM +0000, Tilmann Singer wrote: > Hmm, this sounds like very much being the symptom of geturl not > being _threadsafe_ - I never understood what that actually means, > but this problem gives me some idea on it. You could make it sure > by not testing against a slow and a fast server, but against your > a socket that you opened on your own and thus know that it will > never been answered until you hit Ctrl-D: Yes, the first do_request is blocked, but other http requests are satisfied. When the second do_request is blocked, no other http requests progress: aolserver is frozen. At the very same time Ctrl-D is pressed, all the pending requests are processed. Now the question is if using the callback version of geturl would prevent the blocking. -- 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) |
From: Tilmann S. <ti...@ti...> - 2003-03-05 19:06:08
|
Hmm, this sounds like very much being the symptom of geturl not being _threadsafe_ - I never understood what that actually means, but this problem gives me some idea on it. You could make it sure by not testing against a slow and a fast server, but against your a socket that you opened on your own and thus know that it will never been answered until you hit Ctrl-D: $ socket -s 9000 ... do_request "http://localhost:9000" til |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-05 18:13:53
|
Hi. Til, maybe it would be good to make a new release of tclwebtest. On the meantime, I was thinking about implementing a new command named validate. This command could be run over pages which are visible from the net and would call w3's validate engine over the page. Some examples: set url http://somedomain/some_page validate $url # this would validate css too validate -css $url # this would validate only css validate -onlycss $url # this would follow relative local urls only in depth validate -recursive $url # this would post the code directly validate -upload [response full] # don't log operations unless something goes wrong validate -nolog $url But I don't see very clear if the command should return a code (true/false) or should work like do_request, raising assertions for bad code which can be silenced with -nocomplain. The only drawback of this command would be that shortly user_agent_id would be needed for the validator too ;-) -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-05 16:08:51
|
On Wed, Mar 05, 2003 at 05:18:35AM +0000, Tilmann Singer wrote: > If you could comment out db_source and clearly mark that it's only > an example from a specific project it would be cool. Thanks a lot > for the other stuff! Commited. -- 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) |
From: Grzegorz A. H. <gr...@ef...> - 2003-03-05 15:15:42
|
On Wed, Mar 05, 2003 at 05:30:54AM +0000, Tilmann Singer wrote: > I don't know how callback would help in this case as that would > mean that you want the same instantiation of tclwebtest (e.g. a > set of initialised global variables etc.) to do several requests in > parallel, right? So when the callback fires tclwebtest should know > which currently running set of global variables to associate that > with - this is totally impossible with the current architecture. At the moment I'm not doing anything special to create two instances of tclwebtest, the server seems intelligent enough to create two separate threads each with it's set of variables, which might happen because at the moment I reload the complete tclwebtest script for each run or because aolserver by default creates a separate memory space for each thread (a logical behaviour after all: if two users request the same dynamic page, the requests shouldn't share the same memory space). It looks like the problem is opening an http connection, it seems to freeze the whole server. My boss said that's because the geturl command might open the socket in blocking mode, and this could block the whole process. I verified this launching two test units concurrently, one against the local server and another one against a slow external one. Then I tried to connect with a browser to the local server (which runs tclwebtest inside aolserver), and the request was frozen: after several seconds the html code appeared, some more later one image, and so on for the rest of the images. From my limited point of view this means that the unit tests are waiting for the external query to finish, and meanwhile other threads of the server are unable to progress. The slow one by one appearing of images suggests that after each geturl command the other threads get a little CPU time only to get blocked again by the next scheduled blocking geturl command. My supposition was that running geturl with the callback option would open the socket in non-blocking mode, and thus the rest of the threads wouldn't be blocked, I would separate do_request in two parts and simulate the sequencial behaviour. Therefore each tclwebtest instance would still be able to run along others and open any number of separate sockets. It's not a requested feature yet, I was just asking. If I have to solve this problem in the future I will try this callback approach first and get back to you with the results. -- 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) |
From: Tilmann S. <ti...@ti...> - 2003-03-05 06:39:39
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030303 15:26]: > I think that even though the user can catch any problem in > tclwebtest's code thanks to the exception mechanism, it is less > fearsome for users to recieve a single line human readable error > than a complex stack trace. If one is afraid of seeing stacktraces s/he shouldn't be programming in tcl ;) > Also, you might want to write specific (like null) values into > some of tclwebtest's variables in the failure case so that other > commands don't need to be wrapped inside catch too, or have undefined > consequences: > > catch { do_request something_that_clearly_fails } > log [response text] # <-- will this fail? what should be the output? The behaviour after a socket error is always undefined, wether you set all variables to null or not, that's why I still think it is good to trow a normally uncaught error. I rather thought catch could be used like that in individual tests if necessary: if { ![catch { do_request something_that_clearly_fails }] } { assertion_failed "Unexpectedly we got a reply from something_that_clearly_fails." } til -- http://tsinger.com |
From: Tilmann S. <ti...@ti...> - 2003-03-05 05:31:46
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030304 16:06]: > Once I have tclwebtest running inside my server I get the urge > to run several tests concurrently, but looks like geturl is the > bottleneck, and while one test case is blocked querying some slow > external server, another test case which runs against the local > server doesn't progress. Can this be solved with the callback > feature of geturl? When running outside the webserver you can use the -processes switch to make tclwebtest fork into several processes that run in parallel. Within the webserver you might have to invent your own way of making use of its multithreading capabilities. I don't know how callback would help in this case as that would mean that you want the same instantiation of tclwebtest (e.g. a set of initialised global variables etc.) to do several requests in parallel, right? So when the callback fires tclwebtest should know which currently running set of global variables to associate that with - this is totally impossible with the current architecture. til -- http://tsinger.com |