IllegalArgumentException: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!864Views0likes0CommentsAsserting a partial XML using regex
Hi All, Is there any assertion in Soapui Pro, that can be used to assert the response XML partially using regex pattern. For Eg : Lets assume the response XML is something like this below: <root> <a1>This is a1 test</a1> <a2>adding a2 text</a2> <a3> <b1>Some random text</b1> <c1>hello</c1> </a3> </root> And i want to assert this xml partially using some regex. Lets say like this below: Contains Assertion: <root> <a1>This is a1 test</a1> *.* </a3> </root> ----------------------------------- When i actually try to do this, it's not working. Can some suggest me the actual regex pattern that can be applied on the above XML to assert its response body. (Note : I am making use of 'contains' assertion) Kindly let me know, if this feature exists (if yes, plz suggest regex for above & if NO, can we add this feature in next release of soapui pro). Thanks Singh8.8KViews0likes9Comments