1) The build environment creates an executable image of the system by compiling and linking all code and dependencies. It then performs functional tests on the integrated system using a test harness.
2) If the tests pass, the build is promoted to the staging environment for further testing. Otherwise, failures will stop the promotion process or just be noted.
3) The build environment aims to detect defects in module interfaces and interactions by testing the fully integrated system, using real data but in limited quantities to keep tests fast. External services may be directly used if read-only or have test versions if read-write.