tracetest
tracetest copied to clipboard
Provide a mechanism to make API calls in sequence
Is your feature request related to a problem? Please describe. Our potential use for tracetest requires making a series of API calls in sequence and validating behavior at each step. For example:
- Make a call to create a thing in the database. Verify results by making assertions about traces that were received and checking JSON response from the call.
- Using data returned from the first call (such as the ID from the JSON response), execute a second API call to query or mutate that data in some way. Verify results again.
- Etc.
Describe the solution you'd like Provide a means to organize several test triggers to be run in sequence (or, even better, execute conditionally, but I would consider this a stretch goal and not necessary for my current requirements). Each test should return its results in such a way that they can be used in future tests in the sequence (i.e., use an ID returned from the first call in the second call).
Describe alternatives you've considered Executing a series of tests via bash scripting or equivalent gets part of the way there, but is labor intensive and possibly brittle.
Additional context N/A
I've been thinking about this issue for some time now, and I've come up with a proposal: https://github.com/kubeshop/tracetest/issues/951. This is just my first though, so feel free to comment any thoughts you have, but I think it's simple and useful
@mrwatson We implemented these changes in v0.8 and implemented a couple of 'clean up' to the rather sizable commit. It is pretty stable now in the 0.8.2 release - would love for you to try it and give us some feedback! You can read about the release, including a reference to your filing this issue, here: https://tracetest.io/blog/v08-release-notes
@mrwatson you can read about transactions here. We use it in our integration tests as well. You can check this as an example
Awesome. We'll revisit this and see how it works for us. Thanks! I appreciate your responsiveness here.