Test e2e Arazzo - #1756
Test e2e Arazzo#1756daniellopera15 wants to merge 2 commits into
Conversation
| assertTrue(arazzoService.arazzoWorkflows.isNotEmpty()) | ||
| assertTrue(sampler.numberOfDistinctActions() > 0) | ||
|
|
||
| val workflow = arazzoService.arazzoWorkflowsById["apply-coupon"]!! |
There was a problem hiding this comment.
This is not an end-to-end test, since this is not testing EvoMaster, but a subclass within evomaster. An end-to-end test invokes val solution = initAndRun(args) and then asserts on the solution using assertHasAtLeastOne(). For example, assertHasAtLeastOne(solution, HttpVerb.GET, 400, "/api/dictionarybase/{aggregatortype}", null).
There was a problem hiding this comment.
I am modifying the test.
| // apply-coupon: findPetsByTags -> getPetCoupons -> placeOrder | ||
| assertHasAtLeastOne(solution, HttpVerb.GET, 200, "/pet/findByTags", null) | ||
| assertHasAtLeastOne(solution, HttpVerb.GET, 200, "/pet/{petId}/coupons", null) | ||
| assertHasAtLeastOne(solution, HttpVerb.POST, 200, "/store/order", null) |
There was a problem hiding this comment.
this is much better! Now, as this oracle states only that these HTTP calls occur in some order, is there any form of assuring that the actual workflow was sampled? In other words, 1) what happens to the test case if Arazzo is disabled? does the test still pass? 2) Is it possible for the placeOrder code to return a 200 even then the findPetsByTags -> getPetCoupons was not actually called?
No description provided.