question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When I run the test, I got this response

java.lang.RuntimeException: Assertion failed for :-

[Get property by closed date and city] | | ±–Step --> [get_property_by_closed_date_and_city]

Failures:

Assertion path ‘$.body[0].id’ with actual value ‘1’ did not match the expected value ‘1’

Scenario .json file

{
  "scenarioName": "Get property by closed date and city",
  "steps": [
    {
      "name": "get_property_by_closed_date_and_city",
      "url": "/api/v1/property",
      "operation": "GET",
      "request": {
        "headers": {
          "Content-Type": "application/json",
          "Authorization": "Basic xxxxx"
        },
        "queryParams": {
          "closeDate": "12/19/2020",
          "city": "Sacramento"
        }
      },
      "assertions": {
        "status": 200,
        "body": [
          {
            "id": "${$.get_property_by_closed_date_and_city.response.body[0].id}",
            "import": null,
            "location": {
              "id": 2,
              "city": "",
              "county": "",
              "state": "",
              "country": ""
            },
            "originalValue": "",
            "jsonContent": "",
            "realEstateTransactionId": -1,
            "dateCreated": "2020-07-06T20:56:22.206",
            "listingId": "0",
            "propertyType": "0",
            "streetName": "0",
            "streetNumberNumeric": 0,
            "streetNumber": "",
            "unitNumber": "",
            "city": "0",
            "countyOrParish": "SA",
            "postalCode": "0",
            "stateOrProvince": "CA",
            "yearBuilt": 0,
            "closeDate": "2020-12-19",
            "closePrice": 0,
            "listPrice": 0,
            "originalListPrice": 0,
            "listingKey": "",
            "mlsAreaMajor": "",
            "mlsStatus": "S",
            "onMarketDate": "",
            "parcelNumber": "",
            "buyerAgentFullName": "",
            "buyerAgentMlsId": "",
            "listAgentFullName": "",
            "listAgentKey": "",
            "listAgentMlsId": "",
            "listOfficeKey": "",
            "listOfficeMlsId": "",
            "listOfficeName": "",
            "buyerOfficeKey": "",
            "buyerOfficeMlsId": "",
            "buyerOfficeName": "",
            "standardStatus": "S",
            "originalEntryTimestamp": "2019-10-29T10:22:59",
            "parties": "",
            "buyer1": "",
            "buyer2": "",
            "fullAddress": "",
            "modificationTimestamp": null,
            "propertySubType": null
          }
        ]
      }
    }
  ]
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
crauadamscommented, Jul 29, 2020

I was using 1.2.11, now it works! Thank you so much!

1reaction
authorjappscommented, Aug 5, 2020

A ticket has been raised now to solve this. ✌️ https://github.com/authorjapps/zerocode/issues/420

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Fail Assertion in JUnit - Baeldung
The fail assertion fails a test throwing an AssertionError unconditionally. When writing unit tests, we can use fail to explicitly create a ...
Read more >
Why do I get an assertion failure? - Stack Overflow
My guess is that the file is failing to open, and you're still passing it to fgets. Your if(rd==NULL) doesn't stop execution of...
Read more >
Correcting assertion failures - IBM
An assertion failure occurs when the database server cannot continue normal processing and must shut down. You can correct some of the problems...
Read more >
Assertion Failed Dialog Box - Visual Studio (Windows)
An assertion statement specifies a condition that you expect to hold true at some particular point in your program. If that condition does...
Read more >
JUnit Assert.fail() Method Example - Java Guides
The fail assertion fails a test throwing an AssertionError. It can be used to verify that an actual exception is thrown or when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found