How do I generate Emma code coverage reports using Ant?

前端 未结 3 800
误落风尘
误落风尘 2020-12-25 12:18

How do I setup an Ant task to generate Emma code coverage reports?

3条回答
  •  清酒与你
    2020-12-25 13:01

    Emma 2.1 introduces another way of obtaining runtime coverage information (.ec file). One can remotely request the data from the given port of the computer where an instrumented application is runnig. So there's no need to stop VM.

    To get the file with runtime coverage data you need to insert the following snippet in your Ant script between running of your tests and generating coverage report:

    
        
            
            
        
    
    

    Other steps are similar to Emma 2.0. They are perfectly described in previous post

    More information on Emma 2.1 features: http://sourceforge.net/project/shownotes.php?group_id=108932&release_id=336859

提交回复
热议问题