I’m working at web development company(for half a year now), it is my first workplace. But one thing we do there bugs me quite a bit. So I wanted to get input from more experienced people. I’m not sure if this is best place to ask, but i hope answers to this question might be useful and interesting for others too.
My main and most likely only dissatisfaction with job comes from the fact that we commit to live system(we have a web portal that runs on php and mysql), that is I commit code and changes are instantly visible on-line. It is no big deal for small or quickly detectable errors. But its a big problem when some hideous error creeps in, i.e. links are generated wrongly in some place and you can reach some page with two different url(hits pages rank…), it is easy to miss such stuff for some days. (Or is it? Maybe I’m just not careful enough?) But I really try to check everything before committing and we also use phpunit and selenium(test are written by same person who writes code, after writing code) for testing(though test coverage could be grater).
So my question is: Is it common to do commits directly to on-line system when doing web development?
Definitely not!
The most common scenario is to have at least 3/4 environments:
Development environment: Each developer commits his own modifications and runs his tests on his personal environment.
Integration environment: Every components of the application are merged together allowing everyone to see if everything is ok. Be carreful of Big-Bang integration though.
Beta-Test environment: When everything has been fixed and checked during the integration phase, you move to the beta-test phase. If there isn’t a specific team for that, it is often done by the developers (each developer tests the functionnalities made by others in order to avoid obvious subjective issues).
Production environment: What the customer uses.
This is what I learnt from my very short experience (5 months internship), hope it helps!