Skip to content

Automated testing #64

@Gerharddc

Description

@Gerharddc

To better support extensive refactoring and large feature additions, we desperately need to invest in proper automated testing. The reason this has been avoided thus far is because this is because it is rather complex to set up in the case of Litterbox. There are two major challenges:

  1. Since Litterbox needs to interact with Podman and create many files in the home directory, the only reasonable way to test Litterbox would be inside a container or a VM (otherwise testing will quickly "pollute" the host machine and might also be affected by its state). This is already beyond the scope of what is easily supported by the standard testing framework in Rust.

  2. Since the interface to Litterbox is an interactive CLI, it is also very difficult to interact with it programmatically. This is another area where the standard testing framework is not particularly useful.

I haven't looked into it much, but Robot Framework and/or regular Python might be more suitable for this type of complex "integration testing" than the standard testing framework in Rust.

Running tests inside a container will also make it impossible (or at least very difficult) to support development of Litterbox itself inside a litterbox. I really wanted this to be possible but I think it is something worth giving up in the name of simplicity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions