How to loop through and assert JSON array objects in JMeter if they have the same name?How do I turn a C# object into a JSON string in .NET?How to use Jackson to deserialise an array of objectsJMeter: How to count JSON objects in an Array using jsonpathJmeter - Json array: How to check for each value if contains a string using Json Path ExtractorLoop through 2 arrays containing array and array of objects - PhpSchema validation for Json array of objects using JavaJMeter Non GUI mode Test Execution number of samples mismatchingHow to assert a JSON response which have results in random order every time in JMeter?Using JMeter, how to compare table data with JSON data?jMeter: JSON assertion

Magento 2 setTemplate and add content to phtml template

Was Donald Trump at ground zero helping out on 9-11?

How did Biff return to 2015 from 1955 without a lightning strike?

How do I respond appropriately to an overseas company that obtained a visa for me without hiring me?

ULQ2003 not driving a Relay properly

Should 2FA be enabled on service accounts?

How char is processed in math mode?

If I buy and download a game through second Nintendo account do I own it on my main account too?

Derivative is just speed of change?

What is the term for completing a route uncleanly?

Can there ever be any problem when using gedit to edit system files with 'sudo -H gedit'?

Why don't short runways use ramps for takeoff?

What is the oxidation state of Mn in HMn(CO)5?

How would a lunar colony attack Earth?

UX writing: When to use "we"?

Planting Trees in Outer Space

Best Ergonomic Design for a handheld ranged weapon

How to innovate in OR

Is it possible to tell if a child will turn into a Hag?

What do the novel titles of The Expanse series refer to?

Why are prop blades not shaped like household fan blades?

Balancing Humanoid fantasy races: Elves

What force enables us to walk? Friction or normal reaction?

Academic progression in Germany, what happens after a postdoc? What is the next step?



How to loop through and assert JSON array objects in JMeter if they have the same name?


How do I turn a C# object into a JSON string in .NET?How to use Jackson to deserialise an array of objectsJMeter: How to count JSON objects in an Array using jsonpathJmeter - Json array: How to check for each value if contains a string using Json Path ExtractorLoop through 2 arrays containing array and array of objects - PhpSchema validation for Json array of objects using JavaJMeter Non GUI mode Test Execution number of samples mismatchingHow to assert a JSON response which have results in random order every time in JMeter?Using JMeter, how to compare table data with JSON data?jMeter: JSON assertion






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have the below JSON response to be validated. I need to validate all the "createdDate" from all the Arrays irrespective. Is there any easy way to capture them or loop through them (since it has the same object name, but in different arrays) and put them in variables to do an assertion against their corresponding values from a JDBC response?



Right now I have used JSON Assertion for each and every "createdDate" using the JSON path to validate against the database value.




"someobject1": 123,
"Array1":
[

"someobject2": 2,
"createdDate": "2019-03-26T20:29:44.631+0000",
"someobject3": "SCRIPT1"
,


"someobject4": 3,
"createdDate": "2019-03-27T20:29:44.631+0000",
"someobject5": "SCRIPT2"

],

"Array2":
[

"someobject6": 4,
"createdDate": "2019-03-28T20:29:44.631+0000",
"someobject7": "SCRIPT3"
,


"someobject8": 5,
"createdDate": "2019-03-29T20:29:44.631+0000",
"someobject9": "SCRIPT4"

]










share|improve this question
































    0















    I have the below JSON response to be validated. I need to validate all the "createdDate" from all the Arrays irrespective. Is there any easy way to capture them or loop through them (since it has the same object name, but in different arrays) and put them in variables to do an assertion against their corresponding values from a JDBC response?



    Right now I have used JSON Assertion for each and every "createdDate" using the JSON path to validate against the database value.




    "someobject1": 123,
    "Array1":
    [

    "someobject2": 2,
    "createdDate": "2019-03-26T20:29:44.631+0000",
    "someobject3": "SCRIPT1"
    ,


    "someobject4": 3,
    "createdDate": "2019-03-27T20:29:44.631+0000",
    "someobject5": "SCRIPT2"

    ],

    "Array2":
    [

    "someobject6": 4,
    "createdDate": "2019-03-28T20:29:44.631+0000",
    "someobject7": "SCRIPT3"
    ,


    "someobject8": 5,
    "createdDate": "2019-03-29T20:29:44.631+0000",
    "someobject9": "SCRIPT4"

    ]










    share|improve this question




























      0












      0








      0








      I have the below JSON response to be validated. I need to validate all the "createdDate" from all the Arrays irrespective. Is there any easy way to capture them or loop through them (since it has the same object name, but in different arrays) and put them in variables to do an assertion against their corresponding values from a JDBC response?



      Right now I have used JSON Assertion for each and every "createdDate" using the JSON path to validate against the database value.




      "someobject1": 123,
      "Array1":
      [

      "someobject2": 2,
      "createdDate": "2019-03-26T20:29:44.631+0000",
      "someobject3": "SCRIPT1"
      ,


      "someobject4": 3,
      "createdDate": "2019-03-27T20:29:44.631+0000",
      "someobject5": "SCRIPT2"

      ],

      "Array2":
      [

      "someobject6": 4,
      "createdDate": "2019-03-28T20:29:44.631+0000",
      "someobject7": "SCRIPT3"
      ,


      "someobject8": 5,
      "createdDate": "2019-03-29T20:29:44.631+0000",
      "someobject9": "SCRIPT4"

      ]










      share|improve this question
















      I have the below JSON response to be validated. I need to validate all the "createdDate" from all the Arrays irrespective. Is there any easy way to capture them or loop through them (since it has the same object name, but in different arrays) and put them in variables to do an assertion against their corresponding values from a JDBC response?



      Right now I have used JSON Assertion for each and every "createdDate" using the JSON path to validate against the database value.




      "someobject1": 123,
      "Array1":
      [

      "someobject2": 2,
      "createdDate": "2019-03-26T20:29:44.631+0000",
      "someobject3": "SCRIPT1"
      ,


      "someobject4": 3,
      "createdDate": "2019-03-27T20:29:44.631+0000",
      "someobject5": "SCRIPT2"

      ],

      "Array2":
      [

      "someobject6": 4,
      "createdDate": "2019-03-28T20:29:44.631+0000",
      "someobject7": "SCRIPT3"
      ,


      "someobject8": 5,
      "createdDate": "2019-03-29T20:29:44.631+0000",
      "someobject9": "SCRIPT4"

      ]







      json jmeter assertion






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 22:10







      sjkp

















      asked Mar 26 at 21:26









      sjkpsjkp

      207 bronze badges




      207 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          1














          You can use JSON Assertion configured like:



          • Assert JSON Path Exists: $..createdDate

          • Expected Value: ["2019-03-26T20:29:44.631+0000","2019-03-27T20:29:44.631+0000","2019-03-28T20:29:44.631+0000","2019-03-29T20:29:44.631+0000"]

          Full configuration:



          enter image description here



          More information:




          • JSON Path: Deep Scan Operator

          • JSON Path Examples

          • JMeter's JSON Path Extractor Plugin - Advanced Usage Scenarios





          share|improve this answer

























          • Is it possible to compare it one to one. In case if one of them fails, can any of the listeners tell?

            – sjkp
            Mar 27 at 17:49










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55366452%2fhow-to-loop-through-and-assert-json-array-objects-in-jmeter-if-they-have-the-sam%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          You can use JSON Assertion configured like:



          • Assert JSON Path Exists: $..createdDate

          • Expected Value: ["2019-03-26T20:29:44.631+0000","2019-03-27T20:29:44.631+0000","2019-03-28T20:29:44.631+0000","2019-03-29T20:29:44.631+0000"]

          Full configuration:



          enter image description here



          More information:




          • JSON Path: Deep Scan Operator

          • JSON Path Examples

          • JMeter's JSON Path Extractor Plugin - Advanced Usage Scenarios





          share|improve this answer

























          • Is it possible to compare it one to one. In case if one of them fails, can any of the listeners tell?

            – sjkp
            Mar 27 at 17:49















          1














          You can use JSON Assertion configured like:



          • Assert JSON Path Exists: $..createdDate

          • Expected Value: ["2019-03-26T20:29:44.631+0000","2019-03-27T20:29:44.631+0000","2019-03-28T20:29:44.631+0000","2019-03-29T20:29:44.631+0000"]

          Full configuration:



          enter image description here



          More information:




          • JSON Path: Deep Scan Operator

          • JSON Path Examples

          • JMeter's JSON Path Extractor Plugin - Advanced Usage Scenarios





          share|improve this answer

























          • Is it possible to compare it one to one. In case if one of them fails, can any of the listeners tell?

            – sjkp
            Mar 27 at 17:49













          1












          1








          1







          You can use JSON Assertion configured like:



          • Assert JSON Path Exists: $..createdDate

          • Expected Value: ["2019-03-26T20:29:44.631+0000","2019-03-27T20:29:44.631+0000","2019-03-28T20:29:44.631+0000","2019-03-29T20:29:44.631+0000"]

          Full configuration:



          enter image description here



          More information:




          • JSON Path: Deep Scan Operator

          • JSON Path Examples

          • JMeter's JSON Path Extractor Plugin - Advanced Usage Scenarios





          share|improve this answer













          You can use JSON Assertion configured like:



          • Assert JSON Path Exists: $..createdDate

          • Expected Value: ["2019-03-26T20:29:44.631+0000","2019-03-27T20:29:44.631+0000","2019-03-28T20:29:44.631+0000","2019-03-29T20:29:44.631+0000"]

          Full configuration:



          enter image description here



          More information:




          • JSON Path: Deep Scan Operator

          • JSON Path Examples

          • JMeter's JSON Path Extractor Plugin - Advanced Usage Scenarios






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 27 at 6:01









          Dmitri TDmitri T

          80k3 gold badges41 silver badges70 bronze badges




          80k3 gold badges41 silver badges70 bronze badges















          • Is it possible to compare it one to one. In case if one of them fails, can any of the listeners tell?

            – sjkp
            Mar 27 at 17:49

















          • Is it possible to compare it one to one. In case if one of them fails, can any of the listeners tell?

            – sjkp
            Mar 27 at 17:49
















          Is it possible to compare it one to one. In case if one of them fails, can any of the listeners tell?

          – sjkp
          Mar 27 at 17:49





          Is it possible to compare it one to one. In case if one of them fails, can any of the listeners tell?

          – sjkp
          Mar 27 at 17:49






          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55366452%2fhow-to-loop-through-and-assert-json-array-objects-in-jmeter-if-they-have-the-sam%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해