Is there a "Selenium" for Textual (and TUIs in general)? #1688
-
I'm trying to write some meaningful UI tests for my app, but haven't made a lot of progress to date. How does one automatically interact with a TUI? Is there something like Selenium for TUIs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We have App.run_test. I don't think it's been documented much beyond the API docs right now, but you'll see it in action in Textual's own unit tests. Also, internally (as in, in Textual but not "documented" yet), there are snapshot tests which allow you to test that an app's look hasn't changed. Again, you'll find examples of that in the unit tests -- if you search Will's twitter timeline you'll also see him showing it off a few times. |
Beta Was this translation helpful? Give feedback.
We have App.run_test. I don't think it's been documented much beyond the API docs right now, but you'll see it in action in Textual's own unit tests.
Also, internally (as in, in Textual but not "documented" yet), there are snapshot tests which allow you to test that an app's look hasn't changed. Again, you'll find examples of that in the unit tests -- if you search Will's twitter timeline you'll also see him showing it off a few times.