When a test case is staged, a subsystem within DevTest samples metric values. DevTest then reports them in the ways that are defined in the staging document. The staging document includes the metrics to be collected. Users can also add them as the test runs.
Two classes must be created for the metric collection:
Follow these steps:
This class provides the metrics that you want to access during the staging of a test.
public class RandomizerMetricIntegration implements MetricIntegration { }
This method that provides the name that is used to identify the custom report metric type in the Staging Document Editor.
public String getTypeName() { return "Randomizer Metric"; }
DevTest calls on instances of this class to collect the requested metrics. The class must also implement Serializable.
public class RandomMetricCollector extends MetricCollector implements java.io.Serializable { }
See the JavaDocs in the doc folder of your installation directory for those classes and the sample code for RandomizerMetricIntegration and RandomMetricCollector for more information about the individual methods available to extend.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|