View | Details | Raw Unified | Return to bug 60065
Collapse All | Expand All

(-)src/core/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java (-5 / +8 lines)
Lines 78-94 Link Here
78
     */
78
     */
79
    @Override
79
    @Override
80
    protected String getKeyFromSample(Sample sample) {
80
    protected String getKeyFromSample(Sample sample) {
81
        String code = sample.getResponseCode();
81
        String responseCode = sample.getResponseCode();
82
        if (isSuccessCode(code)) {
82
        String responseMessage = sample.getResponseMessage();
83
            code = ASSERTION_FAILED;
83
        String key = responseCode + (!StringUtils.isEmpty(responseMessage) ? 
84
                 "/" + StringEscapeUtils.escapeJson(responseMessage) : "");
85
        if (isSuccessCode(responseCode)) {
86
            key = ASSERTION_FAILED;
84
            if (ASSERTION_RESULTS_FAILURE_MESSAGE) {
87
            if (ASSERTION_RESULTS_FAILURE_MESSAGE) {
85
                String msg = sample.getFailureMessage();
88
                String msg = sample.getFailureMessage();
86
                if (!StringUtils.isEmpty(msg)) {
89
                if (!StringUtils.isEmpty(msg)) {
87
                    code = StringEscapeUtils.escapeJson(msg);
90
                    key = StringEscapeUtils.escapeJson(msg);
88
                }
91
                }
89
            }
92
            }
90
        }
93
        }
91
        return code;
94
        return key;
92
    }
95
    }
93
96
94
    /*
97
    /*

Return to bug 60065