[ 
https://issues.apache.org/jira/browse/SLING-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13849280#comment-13849280
 ] 

Andrei Dulvac commented on SLING-2729:
--------------------------------------

With the patch, it looks like this:
{code}
try {
                if (needsPrefix) {
                        writer.format(
                        "%-40.40s|%-120.120s|%-80.80s|%-40.40s|      DateTime   
   |  min  |   10%%   |   50%%   |   90%%   |   max%n",
                                        "Test Suite",
                                        "Test Case",
                                        "Test Class",
                                        "Test Method");
                }

                writer.format(
                    
"%-40.40s|%-120.120s|%-80.80s|%-40.40s|%-20.20s|%7.0f|%9.0f|%9.0f|%9.0f|%9.0f%n",
                                testSuiteName,
                                (testCaseName.length() < 120) ? (testCaseName) 
: (testCaseName.substring(0, 115) + "[...]"),
                                className,
                                methodName,
                                getDate(),
                                statistics.getMin(),
                                statistics.getPercentile(10.0),
                                statistics.getPercentile(50.0),
                                statistics.getPercentile(90.0),
                                statistics.getMax());
                } finally {
                        writer.close();
                }
{code}

That allows a custom testcase name, which is needed if you're running the same 
test class and method with different parameters.

> Performance Testing suite: Modified ReportLogger to log the test case name 
> ---------------------------------------------------------------------------
>
>                 Key: SLING-2729
>                 URL: https://issues.apache.org/jira/browse/SLING-2729
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Antonio Sanso
>            Assignee: Antonio Sanso
>            Priority: Minor
>              Labels: PatchAvailable
>         Attachments: performance_reportlogger.patch
>
>
> Modified ReportLogger to log the test case name as well. Also, changed the 
> method signatures so that it's clear what is being logged. This works with 
> patch 1 to distinguish between different test case instances
> The motivation behind this is that a suite can contain test cases that are 
> different logically, but the test case should be able to be parameterized.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to