How can I unit test a GUI?

后端 未结 14 1348
迷失自我
迷失自我 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条回答
  •  离开以前
    2020-11-30 18:05

    Here is some tips:

    Try to remove the most code you can from the GUI (have controller, and model object) this way you will be able to test them without the GUI.

    For the graphic, you should test the value that you supply to the code that generate the graphic.

提交回复
热议问题