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)
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 reportPath,
String processDefinitionKey,
double coverage,
String testClass,
String testMethod)
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)
Inject the BPMN XML, javascript markers ad info-box fields into the html template.
|
protected static void |
writeToFile(String filePath,
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 reportPath, String processDefinitionKey, double coverage, String testClass, String testMethod) throws IOException
bpmnXml - The BPMN XML of the report process definition.flowNodes - Flow nodes to be highlighted.sequenceFlowIds - Sequence flows to be highlighted.reportPath - The file path 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.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) 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.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)
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.protected static String generateJavaScriptFlowNodeAnnotations(Collection<CoveredFlowNode> flowNodeIds)
protected static String generateJavaScriptSequenceFlowAnnotations(Collection<String> sequenceFlowIds)
protected static void writeToFile(String filePath, String html) throws IOException
IOExceptionCopyright © 2020 Camunda Services GmbH. All rights reserved.