SuffolkLITLab / ALKiln

Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.
https://assemblyline.suffolklitlab.org/docs/alkiln/intro
MIT License
14 stars 4 forks source link

Detect when background actions finish #927

Open plocket opened 1 month ago

plocket commented 1 month ago

A user expressed this as a nice feature. I think they didn't like waiting a set amount of time for something that could end more quickly, but I don't remember all of the context.

I'm not sure exactly how we'd implement it. A Step that waits for a background action? A listener that listens for a request to be sent to a background action and then listens for that background action to be finished?

plocket commented 1 month ago

Notes from user:

Some steps with background actions took a long time to finish. ALKiln was trying to continue before that task got finished, so it couldn't continue and caused an error. We could manually increase the wait time in the test, but sometimes the API calls took too long. It would have been useful to have ALKiln wait for a response before trying to continue.

We ended up changing our code to sort the API calls to find the most recent one instead of having to initially get all of them and then find the latest one, so that situation has improved and there's less of a need for a solution from ALKiln.

Notes from me:

I'm not sure if this was in a Story Table. A user could take a pause from the story table to use the "wait" Step before tapping to continue and then starting the next Story Table. That would help speed up other failures. Still, that leaves them with the always-long manual wait time. This is still something worth keeping on our radar.