You can customize the events sent to splunk by call:
//send job metadata and junit reports with page size set to 50 (each event contains max 50 test cases)
splunkins.sendTestReport(50)
//send coverage, each event contains max 50 class metrics
splunkins.sendCoverageReport(50)
//send all logs from workspace to splunk, with each file size limits to 10MB
splunkins.archive("**/*.log", null, false, "10MB")
The groovy script can use the variable
splunkins, which provides access to the following objects and methods:
Action getAction(Class type);
Action getActionByClassName(String className);
//send message to splunk
boolean send(Object message);
//Archive all configured artifacts from slave, with each file size limit to 10MB, using ant patterns defined in http://ant.apache.org/manual/Types/fileset.html
archive(String includes, String excludes = null, boolean uploadFromSlave = false, String fileSizeLimit = "")
//will send build parameters as metadata and with the object returned from closure to splunk
sendReport(Closure closure)
//a junit report with summary of passes,failures,skips and details of testcase
getJunitReport()
//a a list of junit report each with summary of passes,failures,skips and details of testcase
//each report contains max pageSize testcases
getJunitReport(int pageSize)
sendTestReport(pageSize) //send Test report, with pagination support
sendCoverageReport(pageSize) //send coverage report, with pagination support