pabot
pabot copied to clipboard
`DependencyLibrary` integration?
Figured I'd bring this up here to get wider discussion going.
A user of my DependencyLibrary
opened this issue which got me thinking about how pabot
and DependencyLibrary
could combine great together.
I wrote a bunch of my thoughts in that issue, but the TL;DR of my current thoughts is:
-
Seems to me like with some significant work inside
DependencyLibrary
, you could run your tests withpabot
test-level parallelism and have it Just Work if only some of the tests need to be ordered sequentially. -
If it is possible for
pabot
to provide an exception that a test keyword can raise to say "please run/resume me after you've finished running {{specific test or suite}}", then it seems thatDependencyLibrary
can combine withpabot
such that users get the most parallelism possible while keeping any test sequencing that they really need.
I noticed pabot.SharedLibrary
, and that seems like it will simplify work on the DependencyLibrary
end.
But it looks like if the shared library is a Robot event listener, there's no event proxying. Unless I missed where that's implemented?
I'd like to get that implemented within pabot shared library, and I'm happy to do the work and open the PR myself if you'd like. I can also open another issue to discuss that specifically if you'd like.
Hi @mentalisttraceur , Thanks for interesting ideas. I'll need to spend a bit of time to understand the whole scope of your library and how to best approach this.
Hi @mkorpela I am also interested on this feature. And I already took a look at the code and starting working on something. My suggestion will be, to use the .pabotsuite generated file, adding an extra keyword (for example: "#DEPENDS"), and this can be translated to "#WAIT" keyword afterwards. If you want I can make a draft pull request and work together on it. - right now is only a little bit of refactoring, in order to isolate the scope of the changes - Shall I make a fork and push the changes to my local copy or just pushing the new branch here?
Hi @mkorpela here is the first draft regarding the proposal from 20 days ago. It is still somewhat far related to the last goal, which would involve some more related task scheduling. The trick for now is organizing the dependencies in different groups under the hood. Hope you like it.
I haven't had much time to review this idea since I opened this issue in March, but I still think that the best (and very viable!) solution to this problem is:
- enrich
pabot.SharedLibrary
to also be a Robot event listener, and pass events to the library it wraps. Then:-
the entire ecosystem benefits: all libraries using Robot's event listener API start working with
pabot.SharedLibrary
, and incidentally - users of both
pabot
andDependencyLibrary
can just compose them by importingDependencyLibrary
throughpabot.SharedLibrary
and the dependency tracking inDependencyLibrary
works as normal.
-
the entire ecosystem benefits: all libraries using Robot's event listener API start working with
- ideally, add a special exception subclass or API function to
pabot
, which tests can raise/call to tellpabot
to rerun/resume that test when another some condition is true (this part might be hard - I haven't had time to look at the implementation, which is also why I haven't done anything on this issue). Then all sorts of libraries can be written or enhanced to dynamically provide ordering information topabot
, at runtime, such asDependencyLibrary
.
I haven't looked at what @nestoracunablanco is doing in #479 besides the PR description, but maybe it is helpful along the way to achieving the second point, because once we have logic for dependencies, the next step is letting tests dynamically tell pabot
dependency information at runtime, and having pabot
react.