I have used the streamlit testing library in combination with mocking of file inputs (thank you @mschwoer for help with that).
I now have 4 tests so far:
page loads
page loads with mocking
sample dataset loads
maxquant testdata (proteinGroups and metadata) loads
In each case I have only asserted the session state and not what the interface actually displays.
This way, we can test if the app runs through and can also make sure that what's persistent between pages is correct, while not affecting testing by aestetic changes to the interface.
I would further be happy to receive suggestions on how to best structure the tests to not duplicate too much code, if I add a test for each software option. (A link to a good example for shared/parameterized setup would be appreciated.)
I will also add tests to make sure the procedurally generated widgets are populated correctly, unless you think this is unnecessary work.
I would not go into testing different input combinations too much, as this is covered by the loader unittests.
I have used the streamlit testing library in combination with mocking of file inputs (thank you @mschwoer for help with that).
I now have 4 tests so far:
In each case I have only asserted the session state and not what the interface actually displays.
This way, we can test if the app runs through and can also make sure that what's persistent between pages is correct, while not affecting testing by aestetic changes to the interface.
I would further be happy to receive suggestions on how to best structure the tests to not duplicate too much code, if I add a test for each software option. (A link to a good example for shared/parameterized setup would be appreciated.)
I will also add tests to make sure the procedurally generated widgets are populated correctly, unless you think this is unnecessary work.
I would not go into testing different input combinations too much, as this is covered by the loader unittests.