You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2010/09/02 13:13:38 UTC

DO NOT REPLY [Bug 49862] New: Improve the output of the SMTPSampler

https://issues.apache.org/bugzilla/show_bug.cgi?id=49862

           Summary: Improve the output of the SMTPSampler
           Product: JMeter
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: Main
        AssignedTo: notifications@jakarta.apache.org
        ReportedBy: moreira@privasphere.com
                CC: hauser@acm.org


The patch attached improves the output generated by the SMTP Sampler.

During tests I found it very handy to have a more detailed information about
the message sent to the server.

So far I only tested it with messages that contain a message body and do not
contain an attachment. The output looks like:

------------ Message Headers ------------
Message-Id: <68...@pandora>
MIME-Version: 1.0
Sensitivity: company-confidential
From: tester@myserver.com
Reply-to: tester@myserver.com
To: jmeter-tester@anotherserver.com

------------ Message Content ------------
Content-Type: multipart/mixed; 
    boundary="----=_Part_24_1513386444.1283425759857"
Content-Transfer-Encoding: 7bit
ContentType = text/plain; charset=us-ascii

The message text comes in here
blah blah blah
blah blah blah
blah blah blah
and ends here

Request Headers:

I don't know why the  "Request Headers:" keeps showing but it is independent
from my code.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 49862] Improve the output of the SMTPSampler

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

--- Comment #5 from Sebb <se...@apache.org> 2010-09-03 07:24:05 EDT ---
OK, I see.

Could still sort the fields if the ordering proves to be a problem.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 49862] Improve the output of the SMTPSampler

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

--- Comment #7 from Sebb <se...@apache.org> 2010-09-06 15:37:51 EDT ---
The headers are at the bottom because that's the way they are shown for HTTP(S)
requests.

Could potentially change to having them at the top, but then one would need to
add markers to show where the body starts and ends.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 49862] Improve the output of the SMTPSampler

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

--- Comment #6 from Luciana Moreira <mo...@privasphere.com> 2010-09-06 03:31:50 EDT ---
After looking into the improvements you made in the code. I must say I like it.

The only thing that I believe should be changed is moving the Request Headers
to the top. I saw that you separated the sample result into the body and the
headers, and I think it is right!

I just find it a bit odd to have the headers at the bottom...

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 49862] Improve the output of the SMTPSampler

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

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Sebb <se...@apache.org> 2010-09-02 18:35:01 EDT ---
Applied to SVN:


URL: http://svn.apache.org/viewvc?rev=992129&view=rev
Log:
Bug 49862 - Improve SMTPSampler Request output.

Modified:
  
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
   jakarta/jmeter/trunk/xdocs/changes.xml



I made a few changes:
- split output into samplerData and RequestHeaders
- moved setup so even failed samples show the request data
- eliminated duplication of header output

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 49862] Improve the output of the SMTPSampler

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

--- Comment #4 from Luciana Moreira <mo...@privasphere.com> 2010-09-03 03:19:24 EDT ---
Hello Sebb,

I will configure Eclipse to avoid the tab problem :-)

I treated the From:/Reply-TO: etc differently only to be able to display them
together after all other tags. I only did this because otherwise it is a bit
annoying to try to find this information in the middle of all the other tags.

But I can live with them being displayed out of order.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 49862] Improve the output of the SMTPSampler

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

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Sebb <se...@apache.org> 2010-09-02 07:50:53 EDT ---
Thanks, good patch.

However, I wonder why the From:/Reply-To: etc. headers are treated specially -
would it not be better to use the actual headers?

Also, there were quite a few tabs in the patch - please could you use spaces
instead in future? [Eclipse has a setting for this.]

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 49862] Improve the output of the SMTPSampler

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

--- Comment #1 from Luciana Moreira <mo...@privasphere.com> 2010-09-02 07:15:09 EDT ---
Created an attachment (id=25968)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25968)
Patch to for a nicer presentation of the request on SMTPSampler

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org