You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2017/07/15 22:52:02 UTC

[Bug 61306] New: Refactoring SampleResult

https://bz.apache.org/bugzilla/show_bug.cgi?id=61306

            Bug ID: 61306
           Summary: Refactoring SampleResult
           Product: JMeter
           Version: 3.0
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: lemesmachado@gmail.com
  Target Milestone: ---

Hello everyone.
I was analyzing the modularization of some classes, and I identified that the
class SampleResult has an opportunity for cohesion improvement. 
The class SaveService was in the same situation and the problem was solved as
follows: The OldSaveService class was created, and several get() and set()
methods that were used only to configure the class parameters were moved from
SaveService to OldSaveService. 
The new class was then accessed through an instance variable in SaveService.
This strategy has cleaned and improved SaveService cohesion.
With this in mind, I would recommend creating a new class: SampleResultConfig ,
and moving the following methods:

setDataEncoding
setRequestHeaders
setTimeStamp
setResultFileName
setThreadName
getEndTime
getBodySize
getSampleLabel
setStampAndTime
getLatency
setLatency
getConnectTime
getThreadName
setResponseHeaders
setResponseCode
getResponseMessage
setResponseMessage
getUrlAsString
getSampleLabel
setTimes
getContentType
setSaveConfig
setStartNextThreadLoop
getResultFileName
getResponseData
setDataType
getTime
getAssertionResults
getAllThreads
getResponseDataAsString
getSubResults
setSampleCount
getSamplerData
setSuccessful
setResponseMessageOK
getStartTime
setBodySize
setAllThreads
setStopThread
getURL
getDataEncodingNoDefault
getBytes
setEndTime
setStopTestNow
getErrorCount
setSamplerData
setContentType
getGroupThreads
setResponseData
getSaveConfig
setResponseData
setMonitor
getParent
getDataType
setStopTest
setBytes
getResponseCode
setStartTime
getResponseHeaders
setErrorCount
setSampleLabel
setEncodingAndType
setHeadersSize
getSearchableTokens
setResponseCodeOK
getSampleCount
setURL
setGroupThreads
getDataEncodingWithDefault
getIdleTime
getRequestHeaders
getDataEncodingWithDefault
setConnectTime
setResponseOK
getMediaType
getHeadersSize
getTimeStamp
setParent
setIdleTime

from the SampleResult.
Those parameters accessed by an instance variable in the SampleResult.
Moreover, the orthogonality is the design would be enhanced.

What do you think about that?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61306] Refactoring SampleResult

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61306

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 OS|                            |All
         Resolution|---                         |WONTFIX
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Thanks for proposal, but approach seems to theorical for me and we have to make
some choices regarding our time.
Unless you propose a PR and impact does not break all plugins , I doubt we will
move on this.
Closing as WONTFIX.

Thank you

-- 
You are receiving this mail because:
You are the assignee for the bug.