SoapUI Reporting of concise JsonPath Match failures
Hello We are currently trying to implement SoapUI into the project to run regression tests and seem to be struggling to create useful reports when our assertions - which are mostly based on json path assertions - fail. Our setup is as follows: we call a few services and then assert a response from a DB or from the service itself by using an assertion step containing numerous JsonPath assertions. The reports of errors are currently in this format: (All project related words are replaced by <>) Status: FAIL Time Taken: 0 Size: 0 Timestamp: Tue Jul 16 14:31:36 CEST 2019 TestStep: <stepName> ----------------- Messages ------------------------------ [match <parameter1>] JsonPath Match FAIL [match <parameter3>] JsonPath Match FAIL [match <parameter6>] JsonPath Match FAIL We would like to know what exactly went wrong instead of having to look at the executed tests, so we need to have the expected value and the actual value in the report, just like we can look at them when we directly execute the assertion, which looks like this: Comparison failed. Path: [<path>]; Expected value: [<expectedValue>]; Actual value: [<actualValue>] How would we add the messages we receive by the singular assertions to the complete log? Thanks in advance for the help pb1Solved1.4KViews0likes3CommentsIllegalArgumentException:Unsupported operator = by using regex in JSONPath Count Match
Hello all, I am trying to create a test case with assertion based on JSONPath Count Match and regex. But I get always the error message from SoapUI: Assertion failed for path [$.flightOfferList.flightOffer[*].connectionList.connection[*].segmentList.segment[?(@.departureDateTime =~ /2018-08-15T17:10:00/)]] : IllegalArgumentException:Unsupported operator = If I put the message to check on http://jsonpath.herokuapp.com/ and use the same JSON Path then it works without problems. Is there a bug in SoapUI? (I'm using the version 5.4.0 on Windows). Or is my JSONPath expression wrong? Here is my JSON message, that I'm trying to check: {"flightOfferList": {"flightOffer": [ { "salePrice": 312235, "salesPriceCurrency": "EUR", "onlyWithHotel": false, "ticketTimeLimit": "2018-06-11", "bookingInOptionUntil": "1111-11-11", "sypoCode": "MERC", "agfaCode": "IFBP", "luggageIncluded": true, "status": "VKE", "connectionList": {"connection": [ { "departure": "FRA", "destination": "JFK", "flightDate": "2018-08-15", "serviceClass": "Y", "touristicDepartureDate": "2018-08-15", "touristicArrivalDate": "2018-08-15", "numberOfFlightNights": 0, "segmentList": {"segment": [ { "departure": "FRA", "destination": "JFK", "departureDateTime": "2018-08-15T17:10:00", "arrivalDateTime": "2018-08-15T19:55:00", "carrierCodeMkt": "UA", "carrierCodeOp": "LH", "bookingClass": "Y ", "flightNumber": "8843", "overnight": false, "nonStop": true, "seatReservationPossible": false }]} }]} }, { "salePrice": 313835, "salesPriceCurrency": "EUR", "onlyWithHotel": false, "ticketTimeLimit": "2018-06-11", "bookingInOptionUntil": "1111-11-11", "sypoCode": "MERC", "agfaCode": "IFBP", "luggageIncluded": true, "status": "VKE", "connectionList": {"connection": [ { "departure": "FRA", "destination": "JFK", "flightDate": "2018-08-15", "serviceClass": "Y", "touristicDepartureDate": "2018-08-15", "touristicArrivalDate": "2018-08-15", "numberOfFlightNights": 0, "segmentList": {"segment": [ { "departure": "FRA", "destination": "JFK", "departureDateTime": "2018-08-15T16:00:00", "arrivalDateTime": "2018-08-15T20:00:00", "carrierCodeMkt": "LH", "carrierCodeOp": "LH", "bookingClass": "Y ", "flightNumber": "4838", "overnight": false, "nonStop": true, "seatReservationPossible": false }]} }]} }, { "salePrice": 313835, "salesPriceCurrency": "EUR", "onlyWithHotel": false, "ticketTimeLimit": "2018-06-11", "bookingInOptionUntil": "1111-11-11", "sypoCode": "MERC", "agfaCode": "IFBP", "luggageIncluded": true, "status": "VKE", "connectionList": {"connection": [ { "departure": "FRA", "destination": "JFK", "flightDate": "2018-08-15", "serviceClass": "Y", "touristicDepartureDate": "2018-08-15", "touristicArrivalDate": "2018-08-15", "numberOfFlightNights": 0, "segmentList": {"segment": [ { "departure": "FRA", "destination": "JFK", "departureDateTime": "2018-08-15T16:00:00", "arrivalDateTime": "2018-08-15T20:00:00", "carrierCodeMkt": "LH", "carrierCodeOp": "LH", "bookingClass": "Y ", "flightNumber": "4839", "overnight": false, "nonStop": true, "seatReservationPossible": false }]} }]} }, { "salePrice": 313835, "salesPriceCurrency": "EUR", "onlyWithHotel": false, "ticketTimeLimit": "2018-06-11", "bookingInOptionUntil": "1111-11-11", "sypoCode": "MERC", "agfaCode": "IFBP", "luggageIncluded": true, "status": "VKE", "connectionList": {"connection": [ { "departure": "FRA", "destination": "JFK", "flightDate": "2018-08-15", "serviceClass": "Y", "touristicDepartureDate": "2018-08-15", "touristicArrivalDate": "2018-08-15", "numberOfFlightNights": 0, "segmentList": {"segment": [ { "departure": "FRA", "destination": "JFK", "departureDateTime": "2018-08-15T17:10:00", "arrivalDateTime": "2018-08-15T19:55:00", "carrierCodeMkt": "LH", "carrierCodeOp": "LH", "bookingClass": "Y ", "flightNumber": "404", "overnight": false, "nonStop": true, "seatReservationPossible": false }]} }]} } ]}} And my JSON Path, that I would like to use is $.flightOfferList.flightOffer[*].connectionList.connection[*].segmentList.segment[?(@.departureDateTime =~ /2018-08-15T17:10:00/)] Thanks for any hints!858Views0likes0Comments