You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please, should this test be in EvoMaster_fault_representatives_Test.java and what is the purpose of this test using: org.evomaster.client.java.controller.api.resolveLocation()?
The test first inserts 4 records into the databasa and creates the 5th record via POST. This is normal and expected beheviour. After the POST situation in the DB is as depicted below:
location_myentity contains "/api/myentity/5" and baseUrlOfSut contains "http://localhost:8080"
/**
*
* @param locationHeader a URI-reference, coming from a "location" header. See RFC 7231.
* Note: it can be a relative reference
* @param expectedTemplate a full URI of the target resource, but with some path elements
* that might (or might not) be unresolved. If {@code locationHeader} is not
* empty, it will replace the beginning of this template.
* @return a fully resolved URI for the target resource. If there are problems, just
* return the input locationHeader. If this latter is empty/null, then return the template
*/
is that not clear? if not, I can try to provide more info. The idea here is that it tries to re-use the resource created on the fly, by inferring its full URL.
it seems there is bug in the schema/API. the endpoint declares to return only 200, but a 201 is rather obtained. However, we should do a better job at explaining what bugs are found in the generated tests, eg, with clarifying comments, something like: "//ERROR: the non-declared status code 201 was returned. Declared status codes are: 200.". Implementing this is on our TODO list
Number 1 is clear and now I understand how resolveLocation works.
For the purpose of exploring EvoMaster a simple REST API was created and OAS3 was generated using springdoc-openapi-starter-webmvc-ui. Indeed OAS3 specifies 200 and code returns 201. Thanks a lot.
Hi,
Please, should this test be in EvoMaster_fault_representatives_Test.java and what is the purpose of this test using: org.evomaster.client.java.controller.api.resolveLocation()?
The test first inserts 4 records into the databasa and creates the 5th record via POST. This is normal and expected beheviour. After the POST situation in the DB is as depicted below:
![image](https://private-user-images.githubusercontent.com/40695592/332733115-a0d45d39-7700-410f-b837-35ee74ec1808.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwNDA2MjEsIm5iZiI6MTcyNDA0MDMyMSwicGF0aCI6Ii80MDY5NTU5Mi8zMzI3MzMxMTUtYTBkNDVkMzktNzcwMC00MTBmLWI4MzctMzVlZTc0ZWMxODA4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDA0MDUyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3MmI4ZGQ2ZmViYjA2Y2ZmZjM1NWY0Mjg3M2YyODFjNTRlN2VkMDA4MTIyYjgxNDU5MGExODEyYjY2NDcyNGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.mHARxCUP99X51qsoYEYJZAKHq3YPgCVxslIrg9tyAQ8)
location_myentity contains "/api/myentity/5" and baseUrlOfSut contains "http://localhost:8080"
Using:
resolveLocation("/api/myentity/5", "http://localhost:8080/api/myentity/-15942/jsonpath?jsonPath=status&EMextraParam123=42")
Following was actualy executed:
REQUEST:
RESPONSE:
Was the intention of the test to use a negative ID -15942 and even in that case code returns 404 Not Found
TEST:
The text was updated successfully, but these errors were encountered: