Right now you have two choices that I'm aware of: run AOLserver, or replicate whatever part of its Tcl API you need to test with. For example, I have several access control procs that work with IP addresses, usernames and so on. I want regression tests on these to be run after any changes to the server or our codebase to ensure the ACL code is still working the way we expect against a known data set. To do this I can create a straight Tcl version of ns_conn that simply returns the test info I tell it to. I can then source this fake ns_conn and my ACL .tcl file, then make calls to my ACL procs and validate the results. Trying to perform this test with the running server is actually more difficult because ns_conn is going to return the real information. There are ways to get around this for testing purposes, but the hurdle gets higher as you want more tests against more parts of your code.
To test ns_httpget you could take the http.tcl file, recreate any ns_sock*, ns_config and other AOLserver procs in Tcl, then use these to run your tests against in straight Tcl.
/s.
On Mar 23, 2004, at 1:09 AM, Wei Shi wrote:
Does anybody know how to call an aolserver tcl command, like ns_httpget without running aolserver? What I am trying to do here is to test and integrate these commands with my other applications before putting them into a package on aolserver. I tried "load" command in tcl but failed. Has anybody done this before?
Thanks.
-- AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
-- AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.