This video explains as how to SetUp Framework:
1. Configurable - Should be fair enough to run in any env like QA, Prod. Also maintaining browser, URL etc..
2. flexible- F/w should be flexible to incorporate other third party tools.
3. Maintainable - F/w should be easily maintained by separating the f/w module and test(each application) module.
4. Resusable - common classes to be maintained like wrapper class.
Using build automation Tools - Maven, Ant, Gradle
Page Object model
Reports and Logs