public class ScheduledTestGenerator extends Object implements SnapshotConsumer
| Modifier and Type | Field and Description |
|---|---|
protected String |
classNameTemplate
specifies the generic class name of a dumped test file.
|
protected int |
counterInterval
specifies a number of tests that should trigger a new dump.
|
protected int |
counterMaximum
specifies how many tests will be dumped (surplus will be skipped)
|
protected Path |
generateTo
specifies the path where test files are dumped
|
protected long |
timeInterval
specifies a time interval of latency between two test renderings.
|
| Constructor and Description |
|---|
ScheduledTestGenerator(AgentConfiguration config) |
ScheduledTestGenerator(PerformanceProfile profile,
TestGeneratorProfile generatorProfile,
List<SetupGenerator> setup,
List<MatcherGenerator> matcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ContextSnapshot snapshot) |
ScheduledTestGenerator |
await() |
void |
clearResults() |
String |
computeClassName(ClassDescriptor clazz) |
protected void |
dumpOnShutdown(boolean shutDown)
specifies that all pending tests should be dumped at shutdown time
|
void |
dumpResults() |
ClassGenerator |
generatorFor(ClassDescriptor clazz) |
ClassGenerator |
generatorFor(ContextSnapshot snapshot) |
ClassGenerator |
newGenerator(ClassDescriptor clazz) |
void |
reload(AgentConfiguration config) |
void |
reload(PerformanceProfile profile,
TestGeneratorProfile generatorProfile,
List<SetupGenerator> setup,
List<MatcherGenerator> matcher) |
RenderedTest |
renderTest(Class<?> clazz) |
void |
shutdown(boolean dumpFiles) |
Set<String> |
testsFor(Class<?> clazz) |
Set<String> |
testsFor(ClassDescriptor clazz) |
void |
writeResults(Path dir) |
protected Path generateTo
protected int counterMaximum
protected String classNameTemplate
template is a template string using characters and following template expressions:
${class} - the name of the class under test
${counter} - the number of the generated test
${millis} - the time stamp corresponding to the generated testprotected long timeInterval
protected int counterInterval
public ScheduledTestGenerator(AgentConfiguration config)
public ScheduledTestGenerator(PerformanceProfile profile, TestGeneratorProfile generatorProfile, List<SetupGenerator> setup, List<MatcherGenerator> matcher)
public void reload(AgentConfiguration config)
public void reload(PerformanceProfile profile, TestGeneratorProfile generatorProfile, List<SetupGenerator> setup, List<MatcherGenerator> matcher)
protected void dumpOnShutdown(boolean shutDown)
shutDown - true if pending tests should be dumped at shutdown, false otherwisepublic void accept(ContextSnapshot snapshot)
accept in interface SnapshotConsumerpublic String computeClassName(ClassDescriptor clazz)
public void writeResults(Path dir)
public void clearResults()
public Set<String> testsFor(ClassDescriptor clazz)
public ClassGenerator generatorFor(ContextSnapshot snapshot)
public ClassGenerator generatorFor(ClassDescriptor clazz)
public ClassGenerator newGenerator(ClassDescriptor clazz)
public RenderedTest renderTest(Class<?> clazz)
public ScheduledTestGenerator await()
public void shutdown(boolean dumpFiles)
public void dumpResults()
Copyright © 2020. All rights reserved.