httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William McKee <will...@knowmad.com>
Subject Re: Perl test framework, TestConfig, and debugging A::T
Date Fri, 16 Jan 2004 18:25:32 GMT
On Thu, Jan 15, 2004 at 05:08:39PM -0800, Stas Bekman wrote:
> strange, I saw it once and could never reproduce it again. What is the 
> sequence of commands when you get it?
> 
>  t/TEST -start
>  t/TEST -run-tests t/03_hostport.t
> 
> can't work alone, you need to tell the httpd or apxs location somewhere. 
> When/where do you do that?

I set an APACHE environment variable.


> I get:
> 
> ok 2
> # $VAR1 = {
> #           'securehost' => {
> #                             'servername' => 'localhost.localdomain',
> #                             'hostport' => 'localhost.localdomain:8530',
> #                             'name' => 'localhost.localdomain:8530',
> #                             'port' => 8530,
> #                             'namebased' => 0
> #                           }
> #         };
> # testing: hostport = localhost.localdomain:8530
> # testing : Retrieving hostport - localhost.localdomain:8530.
> # expected: 1
> # received: 1
> 
> which seems to be fine.

Agreed but that's not what I get. In fact, it's getting weirder rather
than better when I run single server instance (start-test-stop) vs.
repetitive testing. In repetitive testing, the test server is using the
document root that is defined by my virtual host (the second test
server). I guess that returning a page is better than the error output
I was getting earlier but it seems that I've really got this thing
fubar'ed!


> ok 3
> # testing : Retrieve index page from SSL server
> # expected: (?-xism:SSL)
> # received: LWP will support https URLs if the Crypt::SSLeay module is 
> installed.
> 
> that also means that you need to tests for LWP and Crypt::SSLeay before you 
> run this subtest or you should skip it. otherwise this sub-test doesn't do 
> anything.

Good point. Is the following correct:

    plan tests => 5, have 'LWP', 'Crypt::SSLeay';


> Also I don't understand how you try to support mp2 if you don't load 
> Apache2.

I'm not really trying to support mp2. I'm just trying to test that my
custom modules that will never be released on CPAN work under mp1.
Granted adding support for mp2 is a boon and will be attempted now that
I know more about how to do it.

However, this discussion brings up a good point. All I want to do is use
the framework to test that my subroutines are sane and that my
application works as advertised. Maybe I could have done this with a
bunch of Test::Simple scripts. However, I need to have a fake
Apache::Request object created and Apache::Test seemed the logical
choice. Whether that is possible outside the A::T framework or not no
longer matters since I'm now addicted to the power of the TEST and SMOKE
scripts ;). So, I'm going to forge on with trying to get this testsuite
to run on my system. Hopefully some of this rambling may help you better
understand my needs/problems.


Regards,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Mime
View raw message