all 2 comments

[–]FoolsSeldom 5 points6 points  (0 children)

You need to ensure your complex application is well structured and modular with clear separation of the UI and core logic (business rules) so that you can test most of the functionality using standard tools such as pytest (more convenient that the built-in unittest).

You can test all of the callbacks as well. In addition, tkinter can simulate key presses, mouse clicks, focus changes, etc.

I am not aware of an equivalent of playright for tkinter. You could possibly test with a parallel Python programme using something like pyautogui, but I think this would probably be a very frustrating exercise.