I understand there’s a RUN in OperatingSystem library OperatingSystem (robotframework.org)
So my idea is let’s say a Docker focused Library. It builds upon OperatingSystem and have keywords that are meant to install Docker and run certain Docker and Docker Compose instructions.
Is this possible?
Sure it’s possible, OperatingSystem library also has other keywords that you can use to verify the install was successful as well.
Run And Return Rc And Output might be a better option than simply
Run so you can check if the install was successful.
String Library might also be useful for manipulating the contents of your docker files.
There is one thing I meant to mention but forgot, whether the robot test will work or not may depend on if the user who runs your keywords has permissions to run those commands.
This will be true regardless of Windows/MacOS/*nix, so you might want to have a generic check in all your keywords for something along the lines of ‘permission denied’ in the output from the docker commands and report the fail reason as insufficient permissions.