簡體   English   中英

測量駐留在單獨項目中的硒測試的代碼覆蓋率

[英]Measuring code coverage for selenium tests that reside in separate project

我有兩個獨立的java maven項目:一個是我的web應用程序本身,另一個是我的web的碲+硒自動化測試(我將這些測試移動到單獨的項目,因為他們的代碼並不真正屬於Web應用程序項目代碼而且沒有不使用我的網絡應用程序的java類,我也想重用這些測試的某些部分來測試我的其他網絡應用程序)。 因此,我的測試所在的項目對我的Web應用程序一無所知,除了碲/ selenium conf文件(主機名,憑據,瀏覽器)。

所以問題是:有沒有辦法測量我的web應用程序后端的代碼覆蓋率,這是由我的碲/硒測試調用的,這些測試位於單獨的項目中?

提前致謝。 任何幫助都非常感謝。

EMMA或cobetura可以檢測您的課程,以便在測試運行后創建一個覆蓋率報告。

http://emma.sourceforge.net/reference/ch02s03.html

<instr>/instr is EMMA's offline class instrumentor. It adds bytecode
instrumentation to all classes found in an instrumentation path that
also pass through user-provided coverage filters. Additionally, it 
produces the class metadata file necessary for associating runtime 
coverage data with the original class definitions during coverage 
report generation.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM