Skip to content

Test e2e Arazzo - #1756

Open
daniellopera15 wants to merge 2 commits into
masterfrom
feature/arazzo-e2eTest
Open

daniellopera15 wants to merge 2 commits into
masterfrom
feature/arazzo-e2eTest

Conversation

@daniellopera15

Copy link
Copy Markdown
Collaborator

No description provided.

Base automatically changed from feature/arazzo-sampler to master September 14, 2026 11:14
assertTrue(arazzoService.arazzoWorkflows.isNotEmpty())
assertTrue(sampler.numberOfDistinctActions() > 0)

val workflow = arazzoService.arazzoWorkflowsById["apply-coupon"]!!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants