FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Mock HTTP servers for unit tests.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Mock HTTP servers for unit tests. [message #185690 is a reply to message #185688] Wed, 30 April 2014 17:38 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 4/30/2014 12:49 PM, Daniel Pitts wrote:
> On 4/30/14 7:28 AM, Denis McMahon wrote:
>> On Tue, 29 Apr 2014 16:56:57 -0700, Daniel Pitts wrote:
>>
>>> I am very familiar with testing methodologies and technologies. Just
>>> most of my recent experience was with Java, where it's relatively easy
>>> to start a mock http server in a separate thread. Not as easy in PHP.
>>> I'm asking about Mock HTTP servers. Not about testing.
>>
>> What do you want your mock http server to do? It probably isn't going to
>> be able to sit on port 80 without privs, assuming nothing else is on port
>> 80 already.
> I don't need it to listen on port 80. I actually would prefer it didn't.
> It probably would be best if it listened on some random port in
> user-space.
>

Any of the existing servers out there can do that.

>> Does it need to do more than open a listening port on
>> localhost, listen for some packets, send responses depending on the
>> requests? I believe php comes with a basic http server, perhaps you could
>> adapt that to your needs?
>
> That actually might be a suitable solution for my immediate need. I'll
> take a look at it. Thanks for the helpful suggestion!
>
>
>

The http server which comes with PHP is quite limited; good for quick
code tests, but not something I would use for anything beyond short scripts.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Disaster Mitigation Program - Apr. 27, 2014
Next Topic: Storing strings and numbers properly in CSV files
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 08 16:24:39 GMT 2024

Total time taken to generate the page: 0.05074 seconds