public class BpmnJsReport extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
JQUERY_RUNNING_FLOWNODE_MARKING_COMMAND |
protected static String |
JQUERY_SEQUENCEFLOW_MARKING_COMMAND
JQuery command used for sequence flow SVG arrows coverage coloring.
|
protected static String |
PLACEHOLDER_ANNOTATIONS
Placeholder to be replaced with the addMarker annotation for all flow nodes.
|
protected static String |
PLACEHOLDER_BPMN_XML
Placeholder to be replaces with the BPMN content.
|
protected static String |
PLACEHOLDER_COVERAGE
Placeholder to be replaced with the process coverage percentage.
|
protected static String |
PLACEHOLDER_PROCESS_KEY
Placeholder to be replaced with the process key.
|
protected static String |
PLACEHOLDER_TESTCLASS
Placeholder to be replaced with the test class full qualified name.
|
protected static String |
PLACEHOLDER_TESTMETHOD
Placeholder to be replaced with the test method name.
|
| Constructor and Description |
|---|
BpmnJsReport() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
generateHtml(String javaScript,
String bpmnXml,
String processDefinitionKey,
double coverage,
String testClass,
String testMethod,
boolean classReport)
Generates the report html.
|
protected static String |
generateJavaScriptFlowNodeAnnotations(Collection<CoveredFlowNode> flowNodeIds)
Generate the add marker javascript for the passed flow node IDs.
|
protected static String |
generateJavaScriptSequenceFlowAnnotations(Collection<String> sequenceFlowIds)
Generate jquery markers for the passed sequence flow IDs.
|
static void |
generateReportWithHighlightedFlowNodesAndSequenceFlows(String bpmnXml,
Collection<CoveredFlowNode> flowNodes,
Collection<String> sequenceFlowIds,
String reportName,
String processDefinitionKey,
double coverage,
String testClass,
String testMethod,
boolean classReport,
String targetDir)
Generates a html coverage report for a process definition from the passed parameters.
|
protected static String |
injectIntoHtmlTemplate(String javaScript,
String bpmnXml,
String html,
String processDefinitionKey,
double coverage,
String testClass,
String testMethod,
boolean classReport)
Inject the BPMN XML, javascript markers ad info-box fields into the html template.
|
protected static void |
writeToFile(String targetDir,
String fileName,
String html)
Write the html report.
|
protected static final String PLACEHOLDER_PROCESS_KEY
protected static final String PLACEHOLDER_COVERAGE
protected static final String PLACEHOLDER_TESTCLASS
protected static final String PLACEHOLDER_TESTMETHOD
protected static final String PLACEHOLDER_ANNOTATIONS
protected static final String PLACEHOLDER_BPMN_XML
protected static final String JQUERY_SEQUENCEFLOW_MARKING_COMMAND
protected static final String JQUERY_RUNNING_FLOWNODE_MARKING_COMMAND
public static void generateReportWithHighlightedFlowNodesAndSequenceFlows(String bpmnXml, Collection<CoveredFlowNode> flowNodes, Collection<String> sequenceFlowIds, String reportName, String processDefinitionKey, double coverage, String testClass, String testMethod, boolean classReport, String targetDir) throws IOException
bpmnXml - The BPMN XML of the report process definition.flowNodes - Flow nodes to be highlighted.sequenceFlowIds - Sequence flows to be highlighted.reportName - The file name of the report.processDefinitionKey - The key of the report process definition.coverage - The coverage percentage.testClass - The name of the test class.testMethod - The name of the test method if applicable.classReport - When true a class report will be generated, otherwise a method report.
The difference is mainly in the info-box method name field not appearing.targetDir - The directory where the report will be stored.IOException - Thrown if an error occurs on report template read or report write.protected static String generateHtml(String javaScript, String bpmnXml, String processDefinitionKey, double coverage, String testClass, String testMethod, boolean classReport) throws IOException
javaScript - The covered element markers.bpmnXml - The BPMN XML of the report process definition.processDefinitionKey - The key of the report process definition.coverage - The coverage percentage.testClass - The name of the test class.testMethod - The name of the test method if applicable.classReport - When true a class report will be generated, otherwise a method report.
The difference is mainly in the info-box method name field not appearing.IOException - Thrown if an error occurs on report template read.protected static String injectIntoHtmlTemplate(String javaScript, String bpmnXml, String html, String processDefinitionKey, double coverage, String testClass, String testMethod, boolean classReport)
javaScript - The covered element markers.bpmnXml - The BPMN XML of the report process definition.html - The report template html.processDefinitionKey - The key of the report process definition.coverage - The coverage percentage.testClass - The name of the test class.testMethod - The name of the test method if applicable.classReport - When true a class report will be generated, otherwise a method report.protected static String generateJavaScriptFlowNodeAnnotations(Collection<CoveredFlowNode> flowNodeIds)
flowNodeIds - protected static String generateJavaScriptSequenceFlowAnnotations(Collection<String> sequenceFlowIds)
sequenceFlowIds - protected static void writeToFile(String targetDir, String fileName, String html) throws IOException
targetDir - fileName - html - IOExceptionCopyright © 2017 camunda services GmbH. All rights reserved.