How would you best ensure quality when developing a new system?

How would you best ensure quality when developing a new system? Explain the inputs and outputs to testing. Use any relevant examples you have from your experiences within your own organizations, or organizations that you are familiar with.