i am developing a server that receives a request about specifications on a robot framework tests runs them and sends back the step responses in a stream to the client to render them , i want to be able to get the step execution status through listeners since i can’t interrupt the execution is there any event that lets me do that i am using GRPCto handle client server communication
thanks in advance
Hi Louay,
As was mentioned in the other thread, you use listeners to listen to robot framework and then run something.
As for gRPC, there is a python module for that (see Quick start | Python | gRPC)
If you’re worried about the time the listener takes to run between keywords interfering with the execution time of the test then use threading. Gather the data you need from the executed keyword and pass that to a function in another thread that makes the gRPC calls to send the data
This is how the listener for rfswarm works, it grabs the keyword result and execution time, passes that to a function that runs in a background thread to send that result to the rfswarm manager with some retry handling if it fails to send, meanwhile the robot script continues in the main thread of the process. rfswarm uses the python requests module rather than the grpcio module to send the data, but otherwise it’s doing the same thing.
Hope that helps,
Dave.
thank you very much Dave people like you who are kind and take some of their time to guide beginners are a blessing