Add programmatic API

Detail are in the doc. 

@arikon @scf2k 
`_this._stats.add(isEqual ? 'failed' : 'passed')`