How can I unit test a GUI?

后端 未结 14 1370
迷失自我
迷失自我 2020-11-30 17:25

The calculations in my code are well-tested, but because there is so much GUI code, my overall code coverage is lower than I\'d like. Are there any guidelines on unit-testin

14条回答
  •  萌比男神i
    2020-11-30 17:54

    It's not your job to test the GUI library. So you can dodge the responsibility to check what is actually drawn on screen and check widgets' properties instead, trusting the library that they accurately represent what is drawn.

提交回复
热议问题