mardi 10 juillet 2018

jmeter check different response for same request

I have this kind of request

{ 
"ID":"112345"
"SERVICE":"56AA77"
}

The API response could be positive or negative with different element.

positive response:

{
"RESPONSE":"OK"
"TEXT":"DONE"
}

negative response:

{
"RESPONSE":"KO"
"DESCRIPTION":"NOT FOUND"
"ERROR_CODE":"100"
}

how can I tested with JMeter using only one HTTP Request Sampler and only one CSV file ?

Actually I'm using two csv files:

positive:
TEST_ID,TEST_DESC,ID,SERVICE,RESPONSE,TEXT

negative:
TEST_ID,TEST_DESC,ID,SERVICE,RESPONSE,DESCRIPTION,ERROR_CODE

is it possible to use only one file ? like this:

TEST_ID,TEST_DESC,ID,SERVICE,RESPONSE,TEXT,DESCRIPTION,ERROR_CODE

how Jmeter can handle this?

Aucun commentaire:

Enregistrer un commentaire