You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@perl.apache.org by Dirksen <di...@gap.ca> on 2006/03/22 20:43:30 UTC
Failing to run apache-test-demo
Hello,
I found out Apache-test on Chris Shiflett's ApacheCon blog:
http://www.oreillynet.com/pub/wlg/6008
I'm having trouble running the apache-test-demo downloadable from the
same page. Here's what I've done:
1. I'm running Ubuntu, installed Apache2 and PHP5 via apt-get. My php
app is up and running.
2. I downloaded and installed Apache-test from http://
people.apache.org/~geoff/Apache-Test-1.28.tar.gz.
3. Download the demo: http://shiflett.org/apache-test-demo.tar.gz;
unpack it
4. perl Makefile.PL -apxs /usr/bin/apxs2
5. make test
Right after that, I got this error message:
/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /home/dirksen/apache-test-demo/t/
TEST -clean
[warning] cleaning up the old config
Use of uninitialized value in open at /usr/local/lib/perl/5.8.7/
Apache/TestServer.pm line 315, <DATA> line 2.
Use of uninitialized value in open at /usr/local/lib/perl/5.8.7/
Apache/TestServer.pm line 315, <> line 512.
make: *** [test_clean] Error 2
I'm newby Linux user. I've googled the error message, but found
nothing. Could someone give me hint as what went wrong?
Thanks
Dirksen
Re: Failing to run apache-test-demo
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Dirksen wrote:
> Thanks Geoffrey. I tried the 2nd tips, and it works!
>
> One more question, how to simulate cookie setting in the testing cases?
of course :)
but there are short and long explanations, depending on what feature of
Apache-Test you're using.
here's the shortest explantion: look at 02logout.t. in that file you'll see
a complete request/response cycle that uses cookies. in the first test
sends a user/pass combination and receives a cookie from the server. that
cookie is captured and then used in the next test to simulate a proper
session cookie.
there are two more explanations I could give you - long and really long -
depending on how you're using the framework. if the above information
doesn't suit what you want to do I'll get into those :)
as you're getting used to the framework, really do feel free to keep coming
here with questions. I'll help you along the best I can.
--Geoff
Re: Failing to run apache-test-demo
Posted by Dirksen <di...@gap.ca>.
Thanks Geoffrey. I tried the 2nd tips, and it works!
One more question, how to simulate cookie setting in the testing cases?
On 22-Mar-06, at 3:08 PM, Geoffrey Young wrote:
>
>> [warning] cleaning up the old config
>> Use of uninitialized value in open at /usr/local/lib/perl/5.8.7/
>> Apache/TestServer.pm line 315, <DATA> line 2.
>> Use of uninitialized value in open at /usr/local/lib/perl/5.8.7/
>> Apache/TestServer.pm line 315, <> line 512.
>> make: *** [test_clean] Error 2
>>
>> I'm newby Linux user. I've googled the error message, but found
>> nothing. Could someone give me hint as what went wrong?
>
> yeah.
>
> unfortunately, that demo includes some generated files that it
> shouldn't.
> now, ordinarily that wouldn't be a problem, except that a feature
> was added
> to Apache-Test 1.28 that actually implodes like this if it
> encounters an old
> Apache-Test configuration file.
>
> the solutions you have before you are this
>
> o checkout Apache-Test from subversion and 1.29-dev where the
> problem has
> been fixed.
> $ svn checkout \
> http://svn.apache.org/repos/asf/perl/Apache-Test/trunk/ \
> Apache-Test
>
> o delete the autogenerated files from the t/conf directory
> $ for i in test-more.php extra.conf apache* php.ini httpd.conf; \
> do rm t/conf/$i; done
>
> the latter solution is probably easier, but either solution should
> fix your
> issue.
>
> in the meanwhile, I'll work with chris to update the tarball so
> nobody else
> has this problem.
>
> have fun testing your php code :)
>
> --Geoff
Re: Failing to run apache-test-demo
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> [warning] cleaning up the old config
> Use of uninitialized value in open at /usr/local/lib/perl/5.8.7/
> Apache/TestServer.pm line 315, <DATA> line 2.
> Use of uninitialized value in open at /usr/local/lib/perl/5.8.7/
> Apache/TestServer.pm line 315, <> line 512.
> make: *** [test_clean] Error 2
>
> I'm newby Linux user. I've googled the error message, but found
> nothing. Could someone give me hint as what went wrong?
yeah.
unfortunately, that demo includes some generated files that it shouldn't.
now, ordinarily that wouldn't be a problem, except that a feature was added
to Apache-Test 1.28 that actually implodes like this if it encounters an old
Apache-Test configuration file.
the solutions you have before you are this
o checkout Apache-Test from subversion and 1.29-dev where the problem has
been fixed.
$ svn checkout \
http://svn.apache.org/repos/asf/perl/Apache-Test/trunk/ \
Apache-Test
o delete the autogenerated files from the t/conf directory
$ for i in test-more.php extra.conf apache* php.ini httpd.conf; \
do rm t/conf/$i; done
the latter solution is probably easier, but either solution should fix your
issue.
in the meanwhile, I'll work with chris to update the tarball so nobody else
has this problem.
have fun testing your php code :)
--Geoff