I've used the Happiness Metric with Scrum teams and found it's great for helping teams become more productive.
Here's a simple way to get the metric. At the end of your sprint retrospective, ask each team member to rate how happy they are on a scale of 1 - 5. Then ask, "What would make you happier?" Expect people to give a rapid response. Timebox the answer to sixty seconds.
To deliver working software in two weeks, Agile development requires people to accomplish difficult goals. Write unit tests before writing software, set up continuous integration, click on a button and deploy software to production (aka Continuous Delivery).
Because we're no longer living in the Information Age, and now live in the Age of the Artist, we may do well to learn from artists in the film industry.
In Agile, quality starts with the design and writing of the software. Just as a poorly written email leads to confusion, poorly written code leads to defects.
The goal of Agile is to eliminate defects from the start, not discover them at the end of an iteration. Dean Leffingwell provides a Code Quality Abstract. He describes six engineering practices that build quality in from the start.
When I coach Agile teams on Extreme Programming I use the following diagram to help teams build quality into the code.