Re: [Development] Adding new network tests

2014-06-16 Thread Peter Hartmann
On 06/13/2014 05:28 PM, Thiago Macieira wrote:
 I'm separating out the MiniHttpServer into a separate header.

Mandeep, maybe it would be enough to use the mini HTTP server in your 
case for testing all sorts of redirects?

If not and you would rather use a full Apache, you would have to set up 
the network test server locally (see e.g. 
https://qt.gitorious.org/qtqa/sysadmin/source/57f4907999d8348ee578a3c99abece18efcc393d:README.network_test_server.txt)
 
and either re-use some of the redirection URLs or add some more use 
cases if you want...

Peter

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Adding new network tests

2014-06-13 Thread Sarajärvi Tony
Hi

 -Original Message-
 From: development-bounces+tony.sarajarvi=digia@qt-project.org
 [mailto:development-bounces+tony.sarajarvi=digia@qt-project.org] On
 Behalf Of Mandeep Sandhu
 Sent: 12. kesäkuuta 2014 9:16
 To: Thiago Macieira
 Cc: development@qt-project.org
 Subject: Re: [Development] Adding new network tests
 
 
  Whenever possible, use the mini-http server, as it is less likely to cause
  network timeouts.
 
 Ok. Although since I'm testing out a lot of redirection scenario's, it
 might be better to use a real webserver for generating different types
 of redirect responses (permanent/temporary, redirect to HTTPS,
 with/without auth etc).
 
 
  If you really need something server-side, then the QA guys can help you
 with
  the testserver.
 
 Whom can I get in touch with for configuring a webserver on CI?

That would be us in the CI team.  We'll have to prioritize a bit, but setting 
up a web server shouldn't take that long.
I'll start a private mail conversation amongst us to reduce spam here.

Regards,
-Tony

 
 Thanks,
 -mandeep
 
 
  --
  Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
 
  ___
  Development mailing list
  Development@qt-project.org
  http://lists.qt-project.org/mailman/listinfo/development
 ___
 Development mailing list
 Development@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Adding new network tests

2014-06-13 Thread Mathias Hasselmann

Am 12.06.2014 08:16, schrieb Mandeep Sandhu:
 Whenever possible, use the mini-http server, as it is less likely to cause
 network timeouts.
 Ok. Although since I'm testing out a lot of redirection scenario's, it
 might be better to use a real webserver for generating different types
 of redirect responses (permanent/temporary, redirect to HTTPS,
 with/without auth etc).

While it makes sense to have automated compatibility tests, it is not 
needed to use a real web server for plain regression testing: Real 
servers are complex pieces of software which add another layer of 
complexity to your test, but adding complexity to automated tests is 
exactly what you should avoid. Automated tests _must_ be as _trivial_ as 
possible: Complexity introduces bugs and regressions, and who is going 
to find them? It wouldn't make much sense write unit tests for your unit 
tests, would it? So really: Keep complexity of automated tests at a 
minimum. Actually, even Qt's own mini-http server might be too complex 
for your testing needs. In not just in my opinion, the perfect 
_regression_, not interoperability test for a network code is run 
against a trivial server that just tests incoming requests against 
simple regular expressions, or even against fixed text and then replies 
with a fixed reponse. Similiar to what you do when using Mock objects.

Ciao,
Mathias
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Adding new network tests

2014-06-13 Thread Thiago Macieira
Em sex 13 jun 2014, às 09:57:19, Mathias Hasselmann escreveu:
 Am 12.06.2014 08:16, schrieb Mandeep Sandhu:
  Whenever possible, use the mini-http server, as it is less likely to
  cause
  network timeouts.
  
  Ok. Although since I'm testing out a lot of redirection scenario's, it
  might be better to use a real webserver for generating different types
  of redirect responses (permanent/temporary, redirect to HTTPS,
  with/without auth etc).
 
 While it makes sense to have automated compatibility tests, it is not
 needed to use a real web server for plain regression testing: Real
 servers are complex pieces of software which add another layer of
 complexity to your test, but adding complexity to automated tests is
 exactly what you should avoid. Automated tests _must_ be as _trivial_ as
 possible: Complexity introduces bugs and regressions, and who is going
 to find them? It wouldn't make much sense write unit tests for your unit
 tests, would it? So really: Keep complexity of automated tests at a
 minimum. Actually, even Qt's own mini-http server might be too complex
 for your testing needs. In not just in my opinion, the perfect
 _regression_, not interoperability test for a network code is run
 against a trivial server that just tests incoming requests against
 simple regular expressions, or even against fixed text and then replies
 with a fixed reponse. Similiar to what you do when using Mock objects.

I'm separating out the MiniHttpServer into a separate header.

The problem is that MiniHttpServer cannot react to weird replies from the 
client. It needs to send exactly what it was told to send.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Adding new network tests

2014-06-12 Thread Mandeep Sandhu

 Whenever possible, use the mini-http server, as it is less likely to cause
 network timeouts.

Ok. Although since I'm testing out a lot of redirection scenario's, it
might be better to use a real webserver for generating different types
of redirect responses (permanent/temporary, redirect to HTTPS,
with/without auth etc).


 If you really need something server-side, then the QA guys can help you with
 the testserver.

Whom can I get in touch with for configuring a webserver on CI?

Thanks,
-mandeep


 --
 Thiago Macieira - thiago.macieira (AT) intel.com
   Software Architect - Intel Open Source Technology Center

 ___
 Development mailing list
 Development@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Adding new network tests

2014-05-30 Thread Thiago Macieira
Em sex 30 maio 2014, às 14:23:29, Mandeep Sandhu escreveu:
 Hi All,
 
 I was working on implementing HTTP redirection support in QNAM and friends.
 
 While looking at the test case of QNetworkReply, I found that for some
 testcases we use our own mini-http server while for others we're using
 an external webserver from the testbed.
 
 Is there a way to configure the testbed webserver for my needs (i.e
 redirection support)? I've currently tested my feature by configuring
 Nginx to do redirection for certain urls.

Whenever possible, use the mini-http server, as it is less likely to cause 
network timeouts.

If you really need something server-side, then the QA guys can help you with 
the testserver.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development