Assertion fail
See original GitHub issueWhen 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:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was using 1.2.11, now it works! Thank you so much!
A ticket has been raised now to solve this. ✌️ https://github.com/authorjapps/zerocode/issues/420