Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.6
-
Labels:None
Description
Hi,
While generation of Clover report, I found that it generates report
for all Test classes i.e. given in project.xml file.
<include>*/Test.java</include>
To generate the report of single Test class, I need to modify above
statement as follows.
e.g. <include>*/TestManualSim.java</include>
So each time, it needs to modify project.xml for report generation.
So to avoid change in project.xml file, following changes need to be
done in maven-clover-plugin. Following is my suggestion.
<!--If there is no tescase argument, generate report for all
Testcases -->
<j:if test="${empty(testcase) == 'true'}">
<attainGoal name="test:test"/>
</j:if>
<!--If there is tescase argument, generate report for that
particular
testcase -->
<j:if test="${empty(testcase) == 'false'}">
<attainGoal name="test:single"/>
</j:if>
So it takes dynamically testclass name as command argument for report
generation.
e.g. maven -Dmaven.junit.fork=yes -Dtestcase=MyTest
clover:swing-report
Thanks & Regards,
Shohara
Hi Shohara,
I'd like to know what's your use case for this. Why do you need to run Clover only on a single class?
Is the instrumentation that you wish to run on a single class or the report only?
Thanks