Actually, I'm using only two KPIs:
number of users/customers: as a goal, we define how many users or customers we would like to have during a certain period. For example, we want 30,000 new customers in this year
the time we need to deliver a new feature: in other words the lead time. We check our actual lead time and see check whether this time is enough to stay on the market. For example, we want to reduce our current 10-day long lead time to 9 days in this year, because the competition became faster then us
As you can see these KPIs/goals are about the trends: "more" customers and "less" time spent. Additionally, the set numbers are not achievable with our current way of working, so the organization has to work and improve in order to achieve them.
We have automated tools to get the data above and we regularly check on our indicators whether we are on the right track or not. If not, we change our way of working, try out new stuff etc.
I no longer use KPIs like number of defects, or lines of codes, or test coverage, because
- they don't help to sell more product or stay on the market
- they are hard to set on a whole organization (e.g. sales cannot do anything about coverage)
- they narrow down what employees shall do, and they won't bring their creative ideas into the organization
I give you an example. In my friend's organization one of the main KPIs is the number of defects in the system. As far as I remember, the goal is to have maximum 10 defects. They keep this number, even if it is not necessary. Their customer can live with 20 or 30 defects, he wants to have a system with fast reaction time, but the developers spend time on defect fixing and not on making the system more faster. There is chance that they'll lose this customer over this. If they had the KPI "number of customers", each team could set its own goal/action to see what to do in favor of this KPI and keep the customer.