|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.report.core.AbstractReport
public abstract class AbstractReport
Generic extractor of usefull information for reporter dumps.
| Field Summary | |
|---|---|
static List<ReportPart> |
DEFAULT_PARTS
Default behavior. |
static String |
FEATURE_PARTS
Feature to set parts of report. |
protected int |
index
The test index. |
protected List<ReportPart> |
parts
Final report parts. |
protected static int |
PERCENTAGE
Divisor. |
protected List<Resume> |
resumes
List of resume of results. |
protected Map<Status,Integer> |
status
Hash of state counters. |
protected Long |
total
Total processing time. |
protected Map<ActionType,Integer> |
types
Hash of actions counters. |
| Constructor Summary | |
|---|---|
AbstractReport()
|
|
| Method Summary | |
|---|---|
void |
analyse(IResultSet result,
Map<String,Object> model)
Add information to the reporter. |
protected double |
asPercentage(Long time)
Returns a time as percentage. |
protected Resume |
createInstance(IResultSet result,
Map<String,Object> model)
Create a resume instance. |
protected Resume |
createResume(IResultSet result,
Map<String,Object> model)
Create a resume of result. |
protected abstract void |
dumpEnd(SRServices services)
Dump report ending. |
protected abstract void |
dumpPart(SRServices services,
String header,
List<Resume> list)
Dump the resume declaration. |
protected abstract void |
dumpResume(SRServices services,
String resume)
Dump resume. |
protected abstract void |
dumpStart(SRServices services)
Dump report starting. |
List<ReportPart> |
getParts()
Get the report pats. |
protected List<Resume> |
orderedList(List<Resume> list,
Comparator<Resume> comparator)
Creates a copy of the resume list. |
void |
report(SRServices services)
Dump report information. |
String |
resume(SRServices services)
Short information about report. |
protected String |
resume(SRServices services,
boolean finalResume)
Partial resume. |
protected void |
setFeatures(SRServices services)
Prepare feature settings. |
void |
setParts(List<ReportPart> parts)
Set the parts. |
protected String |
status()
Global status as string. |
protected String |
types()
Global action types as string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int PERCENTAGE
protected Long total
protected int index
protected Map<Status,Integer> status
protected Map<ActionType,Integer> types
protected List<Resume> resumes
public static final String FEATURE_PARTS
protected List<ReportPart> parts
public static final List<ReportPart> DEFAULT_PARTS
| Constructor Detail |
|---|
public AbstractReport()
| Method Detail |
|---|
public List<ReportPart> getParts()
public void setParts(List<ReportPart> parts)
parts - The parts.protected void setFeatures(SRServices services)
services - Services.
public void analyse(IResultSet result,
Map<String,Object> model)
IReporter
analyse in interface IReporterresult - The result.model - The model.public String resume(SRServices services)
IReporter
resume in interface IReporterservices - The services instance to be used. This is required, since
report is made on shutdown process, where
SRServices.get() is not available.
protected String resume(SRServices services,
boolean finalResume)
services - The services instance.finalResume - If it is the final resume.
protected String status()
protected String types()
protected Resume createResume(IResultSet result,
Map<String,Object> model)
result - The result.model - The model.
protected Resume createInstance(IResultSet result,
Map<String,Object> model)
result - The result set.model - The model.
public void report(SRServices services)
IReporter
report in interface IReporterservices - The services instance to be used. This is required, since
report is made on shutdown process, where
SRServices.get() is not available.protected abstract void dumpStart(SRServices services)
services - Current instance.
protected List<Resume> orderedList(List<Resume> list,
Comparator<Resume> comparator)
list - The list to be ordered.comparator - The comparator.
protected abstract void dumpPart(SRServices services,
String header,
List<Resume> list)
services - Current instance.header - The header.list - The list of resumes.
protected abstract void dumpResume(SRServices services,
String resume)
services - Current instance.resume - Resume information.protected abstract void dumpEnd(SRServices services)
services - Current instance.protected double asPercentage(Long time)
time - The time.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||