django - Best practice to test a web application, regarding domain name and integration with external service (like Amazon S3) -


I have sometimes participated in these problems and could never find a comfortable solution to assume that my website's The domain name is MyDomain.com. When I run a test on the test machine (a continuous integration server), I will modify the HOSTS file on this machine so that MyDomain.com can be mapped to this local machine instead of the actual production server. This does not work very well for many situations. For example, my application will dynamically create subdomain namesus user1.MyDomain.com but it is difficult to have the test flexibility.

Another problem is That my web application will interact with Amazon S3, and sometimes other services such as the Amazon Simple Message Queue, I'm just resting to include these interactions in my tests, Lech No I am not happy with my solution for testing and production mix at Amazon services.

Can someone give some suggestions on these issues? I would like to make my test structure clean and flexible I am sure it is a common question for all web applications and should be a mature way of dealing with them.

Thank you!

I use different host names in test or dev mode. Various S3 buckets and S3 Host names are included. It enables the testing and development of all app features including S3.

I think it's easy to change the host names in use instead of messing with the host file.


Comments