tclwebtest-general Mailing List for tclwebtest (Page 9)
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: Tilmann S. <ti...@ti...> - 2003-01-24 10:11:31
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030124 09:42]: > But tclwebtest fails with a really funny cookie error: Yeah, that's a bug that I've heard about from before. Someone should look into the possible Cookie values and format them before feeding them to the 'clock scan' command. It's happening in this proc: ad_proc -private set_cookie { set_cookie_string } { Parses the value of the http "Set-cookie: " header into the global cookies list. Doesn't do anything with the path argument, e.g. if it is not / than this proc will behave wrongly. Also it currently depends on the Expires= information to be parsable by the tcl command <code>clock scan</code>. If that is not the case then it will throw an error. } { ... set expires_seconds [clock scan $expires] ... } I can't do it immediately, sorry. regards, til -- http://tsinger.com |
From: Grzegorz A. H. <gr...@ef...> - 2003-01-24 09:41:35
|
Hi. I was writting a tutorial for my coworkers about tclwebtest, and I wanted to start with something simple: # una petición genérica do_request http://www.google.com/ But tclwebtest fails with a really funny cookie error: ----- START: in_memory string at [24/Jan/2003:10:41:04] ----- --- do_request for http://www.google.com/ http status: >>200<< unable to convert date-time string "Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com" while executing "clock scan $expires" (procedure "set_cookie" line 15) invoked from within "set_cookie $cookie_string" (procedure "do_request" line 83) invoked from within "do_request http://www.google.com/ " ("eval" body line 3) invoked from within "eval $to_eval " in script body line 2 ----- FAILED: in_memory string (took 1s) ----- -- 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-01-22 18:16:03
|
On Wed, Jan 22, 2003 at 06:32:57PM +0100, Grzegorz Adam Hankiewicz wrote: > [...] I'm attaching a patch [...] 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. -- 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-01-22 17:35:29
|
On Wed, Jan 22, 2003 at 06:23:44AM +0000, Tilmann Singer wrote: > Looking at run_test it occurs to me that Peter Marklund contributed > a nice -config_file switch, to solve the settings problem more > elegantly. Maybe this can be used in your project? Yes, this is what I would need, got it from CVS. > By the way, did you try to source tclwebtest into aolserver (not > very efficient, I know) like in the example I sent you and run > the tests you retrieve from the db with the run_test command? It > might not be necessary to put them in a /tmp/ file and run them > from there. Well, the example you sent still created temporary files. I'm attaching a patch which adds a new switch to run_test modifying the behaviour of log, debug and the other switches. I've run this successfully over a serie of files. The difference is that now all input/output is treated as a string, more easy to handle from a superior script. -- 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-01-22 06:23:57
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030121 14:54]: > On Mon, Jan 20, 2003 at 06:44:00PM +0000, Tilmann Singer wrote: > > > I saw the TESTHOME variable, but looks like that is set by tclwebtest > > > internally, I thought initially it could be an environment variable. > > > I can overcome this limitation wrapping the script around another > > > temporary script which sets the variables, but maybe there is an > > > easier way? > > > > How do these two things relate? And what do you want to achieve? > > Basically, we are going to have scripts which run locally or remotely > depending on a switch, and the easiest way to do it would be to > set a variable with the base url of the test. I don't want this > hardcoded into the scripts themselves, because then we would have > two versions of the same script with one different line. > > > Look at the openacs tests for an example. I think it would break > > when you have your tests in several subdirectories, but I'm > > not sure. > > Well, all scripts are going to be stored in a database, so I'm > going to run them iteratively, putting them out in some /tmp file > and running tclwebtest over them. Since I'll be doing this, I could > as well modify them to include the fist line "set SERVER_URL xxx". What I meant would be interesting from the openacs scripts was the fact that they are sourcing a common settings file, where you would set your SERVER_URL variable, so that it's only stored in one place. Still you could as well use an environment variable, why not? They should be available in the env array within the test. By the way, did you try to source tclwebtest into aolserver (not very efficient, I know) like in the example I sent you and run the tests you retrieve from the db with the run_test command? It might not be necessary to put them in a /tmp/ file and run them from there. Looking at run_test it occurs to me that Peter Marklund contributed a nice -config_file switch, to solve the settings problem more elegantly. Maybe this can be used in your project? It just passes a filename to run_test where the file is read, but maybe it should be changed so that the file is read before the invocation of run_test and the contents should be passed instead, then run_test could be run more flexibly. What do you think? > PD: Weren't you meant to answer through the ML? Yes, sorry. I'll send this reply over the list now. til |
From: Grzegorz A. H. <gr...@ef...> - 2003-01-20 10:43:49
|
Hi. At the moment I'm experimenting with such a script: [gradha@ws5:1] [~/tclwebtest]$ cat selftest/cus.txt #do_request "http://192.168.1.50:8080/tclwebtest/show-group?id=5&gid=1" do_request "$SERVER/tclwebtest/show-group?id=5&gid=1" assert text "tclwebtest" I saw the TESTHOME variable, but looks like that is set by tclwebtest internally, I thought initially it could be an environment variable. I can overcome this limitation wrapping the script around another temporary script which sets the variables, but maybe there is an easier way? -- 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-01-13 17:20:19
|
On Mon, Jan 13, 2003 at 04:56:16PM +0000, Tilmann Singer wrote: > If you are talking about a web interface in the sense that you can > type in test code in a textarea and have it executed upon form submit, > then you might be interested in my openacs package that does that. If > yes I'll upload it to the tclwebtest site. I can't set up a demo > because it opens the web server to any user because any tcl code can > be executed. Yes, that's precisely what I'm meant to do, now I was tweaking the postgresql databases which would store the scripts. I would like very much to see your solution. Maybe I could contribute to it just like with tclwebtest and in a few days you have something else to upload to SourceForge, it also depends on our requeriments. > Its possible to replicate what is happening in generated_docs.test, > e.g. in tclsh: [...]> > It outputs html fine - is that what you meant? Yes, I'll see to use AOLserver's doc_proc, otherwise I will resort to copying generate_docs.test into a dynamic web page. PD: I guess I'll get online now. -- 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-01-13 16:57:06
|
Grzegorz, I hope it's ok to continue this on the list: * Grzegorz Adam Hankiewicz <gr...@ef...> [20030113 16:36]: > > If you are interested in doing any of these tasks or doing something > > else - cool! Let me know, so that we don't duplicate efforts. > > At the moment I'm working on integrating tclwebtest with a web > interface, this could be made opensource too, depending on how > it works. So for example I would like to have the documentation > generated online, without temporary files. What would you change > from the current scripts to do so? Having the documentation online wouldn't be a big problem when called from within openacs i suppose, since that's what the functions that I ripped from there do. Look at http://openacs.org/api-doc/proc-view?proc=api%5fproc%5fdocumentation to see it in action, describing itself. If you are talking about a web interface in the sense that you can type in test code in a textarea and have it executed upon form submit, then you might be interested in my openacs package that does that. If yes I'll upload it to the tclwebtest site. I can't set up a demo because it opens the web server to any user because any tcl code can be executed. > I thought about modifying generated_docs.test to be a function call > returning the html, but then I realiced it's parsed by tclwebtest, > and looks like integration would need big changes. I'll tell you > if I get to do something. Its possible to replicate what is happening in generated_docs.test, e.g. in tclsh: tils@tp:~$ tclsh tclsh8.3 [~]cd tclwebtest tclsh8.3 [~/tclwebtest]source lib/from_openacs.tcl tclsh8.3 [~/tclwebtest]source lib/tclwebtest.tcl tclsh8.3 [~/tclwebtest]array set doc_elements $api_proc_doc(tclwebtest::debug) tclsh8.3 [~/tclwebtest]api_proc_documentation tclwebtest::debug <h3>tclwebtest::debug (public)</h3><pre>tclwebtest::debug [ -lib ] <i>msg</i></pre> <blockquote> Emit the message to stdout, even if logging output is redirected to a file. Intended to be used when writing tests. Its only advantage over using puts is that it does not have to be deleted when writing the test is finished. <p> <dl> <dt><b>Switches:</b></dt><dd> <b>-lib</b> (boolean) (optional)<br> </dd> <dt><b>Parameters:</b></dt><dd> <b>msg</b><br> </dd> </dl></blockquote> tclsh8.3 [~/tclwebtest] It outputs html fine - is that what you meant? cheers, til |
From: Tilmann S. <ti...@ti...> - 2003-01-12 18:11:22
|
Thanks to the initiative and the huge patch from Grzegorz Adam Hankiewicz there is now the possibility to document the code inline and generate API docs automatically. It's online here and comes also with the latest CVS checkout: http://tclwebtest.sourceforge.net/doc/api_public.html To generate them locally call: $ ./tclwebtest generate_docs.test Further improvements of the documentation welcome ;) til |
From: Tilmann S. <ti...@ti...> - 2003-01-12 05:28:13
|
test |
From: Tilmann S. <ti...@ti...> - 2003-01-12 04:40:39
|
bla |