You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by imane ANKHILA <ia...@ahlane.net> on 2018/04/30 16:49:51 UTC

Assertion result not according to normal syntax

Hi,

I’ve created a simple HTTP Request using JMeter template, I’ve created 
an assertion request with the option equal to get sure having the 200 
code response, than I registered results of my assertion result in my 
repository with the name of ‘result.csv’ :

But I have noticed that it returns to me some additional blank lines and 
without quotes.

1525086918014,269,36 /wp-admin/admin-ajax.php,200,OK,Thread Group 
1-1,false,"Test failed: code expected to equal /

****** received  : 20[[[0]]]

****** comparison: 20[[[1]]]

/",563,1,1,268,1,1,imane-PC



Is that normal?

Or do you think that we should modify the syntax to have only supposed 
lines ?

Should I create a bugzilla ?

Best regards.


Re: Assertion result not according to normal syntax

Posted by Milamber <mi...@apache.org>.
In attachment a sample script.

The CSV output :

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,Latency,IdleTime,Connect
1525171309281,659,HTTP Request,200,OK,Thread Group 1-1,text,false,"Test 
failed: code expected to equal /

****** received  : [[[200]]]

****** comparison: [[[999]]]

/",12470,121,1,1,658,0,383


Probably an issue into
src/components/org/apache/jmeter/assertions/ResponseAssertion.java

near

  private String getFailText(String stringPattern, String toCheck) {

and

     private static StringBuilder equalsComparisonText(final String 
received, final String comparison)


Probably missing a if condition to check if the current output mode is 
CSV, then make a one line output (without carriage return and 
multi-lines). With XML mode, this is not an issue.

I suppose that you should create a bugzilla ticket.

Imane, can you provide a fix to this bug?

Milamber

On 30/04/2018 18:30, Antonio Gomes Rodrigues wrote:
> Hi,
>
> Can you provide the jmeter script?
>
> Antonio
>
> 2018-04-30 18:49 GMT+02:00 imane ANKHILA <ia...@ahlane.net>:
>
>> Hi,
>>
>> I’ve created a simple HTTP Request using JMeter template, I’ve created an
>> assertion request with the option equal to get sure having the 200 code
>> response, than I registered results of my assertion result in my repository
>> with the name of ‘result.csv’ :
>>
>> But I have noticed that it returns to me some additional blank lines and
>> without quotes.
>>
>> 1525086918014,269,36 /wp-admin/admin-ajax.php,200,OK,Thread Group
>> 1-1,false,"Test failed: code expected to equal /
>>
>> ****** received  : 20[[[0]]]
>>
>> ****** comparison: 20[[[1]]]
>>
>> /",563,1,1,268,1,1,imane-PC
>>
>>
>>
>> Is that normal?
>>
>> Or do you think that we should modify the syntax to have only supposed
>> lines ?
>>
>> Should I create a bugzilla ?
>>
>> Best regards.
>>
>>


Re: Assertion result not according to normal syntax

Posted by Antonio Gomes Rodrigues <ra...@gmail.com>.
Hi,

Can you provide the jmeter script?

Antonio

2018-04-30 18:49 GMT+02:00 imane ANKHILA <ia...@ahlane.net>:

>
> Hi,
>
> I’ve created a simple HTTP Request using JMeter template, I’ve created an
> assertion request with the option equal to get sure having the 200 code
> response, than I registered results of my assertion result in my repository
> with the name of ‘result.csv’ :
>
> But I have noticed that it returns to me some additional blank lines and
> without quotes.
>
> 1525086918014,269,36 /wp-admin/admin-ajax.php,200,OK,Thread Group
> 1-1,false,"Test failed: code expected to equal /
>
> ****** received  : 20[[[0]]]
>
> ****** comparison: 20[[[1]]]
>
> /",563,1,1,268,1,1,imane-PC
>
>
>
> Is that normal?
>
> Or do you think that we should modify the syntax to have only supposed
> lines ?
>
> Should I create a bugzilla ?
>
> Best regards.
>
>