Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
Public Member Functions | List of all members
com.griddynamics.jagger.engine.e1.services.DataService Interface Reference

Service provides access to tests results, stored in jagger database. More...

Inheritance diagram for com.griddynamics.jagger.engine.e1.services.DataService:
Inheritance graph
[legend]

Public Member Functions

List< MetricPlotPointEntity > getMetricPlotData (MetricEntity metric)
 Return list of points (values vs time) for selected metric. More...
 
Map< MetricEntity, List
< MetricPlotPointEntity > > 
getMetricPlotData (Collection< MetricEntity > metrics)
 Return lists of points (values vs time) for selected metrics. More...
 
Set< MetricEntity > getMetrics (Long testId)
 Returns all metric entities for specify test id. More...
 
Set< MetricEntity > getMetrics (TestEntity test)
 Returns all metric entities for specify test. More...
 
Map< Long, Set< MetricEntity > > getMetricsByTestIds (Collection< Long > testIds)
 Returns map, where key is test id and value is a list of all test metrics. More...
 
Map< TestEntity, Set
< MetricEntity > > 
getMetricsByTests (Collection< TestEntity > tests)
 Returns map, where key is test entity and value is a list of all test metrics. More...
 
MetricSummaryValueEntity getMetricSummary (MetricEntity metric)
 Return summary value for selected metric. More...
 
Map< MetricEntity,
MetricSummaryValueEntity > 
getMetricSummary (Collection< MetricEntity > metrics)
 Return summary values for selected metrics. More...
 
SessionEntity getSession (String sessionId)
 Returns session's entity for specify session's id. More...
 
Set< SessionEntity > getSessions (Collection< String > sessionIds)
 Returns session's entities for specify session's ids. More...
 
TestEntity getTestByName (String sessionId, String testName)
 Returns test entity for specify session's id and test name. More...
 
TestEntity getTestByName (SessionEntity session, String testName)
 Returns test entity for specify session and test name. More...
 
Set< TestEntity > getTests (SessionEntity session)
 Returns tests for specify session. More...
 
Set< TestEntity > getTests (String sessionId)
 Returns tests for specify session's id. More...
 
Map< String, Set< TestEntity > > getTests (Collection< String > sessionIds)
 Returns all tests for specify list of session's ids. More...
 
Map< String, TestEntity > getTestsByName (Collection< String > sessionIds, String testName)
 Returns map, where key is session's id and value is test entity with specify name. More...
 
- Public Member Functions inherited from com.griddynamics.jagger.engine.e1.services.JaggerService
boolean isAvailable ()
 Reports if service is available. More...
 

Detailed Description

Service provides access to tests results, stored in jagger database.

You can get a full information about sessions, tests, metrics

Author
Gribov Kirill
Details:

Where this service is available you can find in chapter: Relation of listeners and Jagger services

Example - get results from Jagger database:
/* begin: following section is used for docu generation - access to Jagger results in database */
// Get information about session
// Note: session entity for current session is not available (not saved yet) in database at this point of execution,
// while all detailed results like tests and metrics are already saved to database
// SessionEntity sessionEntity = getDataService().getSession("1");
// Get all tests for this session
Set<TestEntity> testEntities = getDataService().getTests(testSuiteInfo.getSessionId());
// Get all metrics for every test
Map<TestEntity,Set<MetricEntity>> metricsPerTest = getDataService().getMetricsByTests(testEntities);
// Get summary values for metrics
for (Map.Entry<TestEntity,Set<MetricEntity>> entry : metricsPerTest.entrySet()) {
//System.out.println("\nTest " + entry.getKey().getName() + " from session " + testSuiteInfo.getSessionId());
Map<MetricEntity,MetricSummaryValueEntity> metricValues = getDataService().getMetricSummary(entry.getValue());
//System.out.println(String.format(" %-40s %s","Metric id","Value"));
for (Map.Entry<MetricEntity,MetricSummaryValueEntity> valueEntry : metricValues.entrySet()) {
//System.out.println(String.format(" %-40s %s",valueEntry.getKey().getMetricId(),valueEntry.getValue().getValue()));
}
}
/* end: following section is used for docu generation - access to Jagger results in database */


Full example code you can find in chapter Custom listener examples code


The documentation for this interface was generated from the following file: