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

Service gives ability to create and modify session metadata(such as session comment) More...

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

Public Member Functions

void appendToComment (String st)
 Append string to current session comment. More...
 
String getComment ()
 Returns current session comment. More...
 
Set< String > getSessionTags ()
 Returns tags which already marked the session. More...
 
void markSessionWithTag (String tagName)
 Marks session with tag. More...
 
void saveOrUpdateTag (String tagName, String tagDescription)
 Creates new or update existing tag. More...
 
void setComment (String comment)
 Set new session comment. More...
 
- Public Member Functions inherited from com.griddynamics.jagger.engine.e1.services.JaggerService
boolean isAvailable ()
 Reports if service is available. More...
 

Detailed Description

Service gives ability to create and modify session metadata(such as session comment)

Author
Gribov Kirill
Details:

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

Example - working with session comments:
/* begin: following section is used for docu generation - work with session comments */
// Here you can f.e.:
// - provide smoke tests to check if your SUT is responding
// - check system properties required for correct SUT functionality
// In this example we will append names of nodes participating in test to session comment
// We will also print OS name and CPU model
String comment = "";
for (Map.Entry<NodeId,GeneralNodeInfo> entry : testSuiteInfo.getGeneralNodeInfo().entrySet()) {
comment += "\nNode: " + entry.getKey() + " (OS: " + entry.getValue().getOsName() + ", " + entry.getValue().getCpuModel() + ")";
}
getSessionInfoService().appendToComment(comment);
/* end: following section is used for docu generation - work with session comments */

Example - working with session tags:
/* begin: following section is used for docu generation - work with session tags */
// In this example we will create tags
getSessionInfoService().saveOrUpdateTag("SERVICE_NAME", "Tag to mark sessions, testing some particular service");
getSessionInfoService().saveOrUpdateTag("PASS", "Tag to mark sessions with pass results");
getSessionInfoService().saveOrUpdateTag("FAIL", "Tag to mark sessions with fail results");
// Mark session with some tag from source code
getSessionInfoService().markSessionWithTag("SERVICE_NAME");
/* end: following section is used for docu generation - work with session tags */


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


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