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:
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: