You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following content is translated by machine from DeepL, please forgive if the language is not correct
There are many asynchronous methods in SketchUp, such as UI::start_timer, HtmlDialog#add_action_callback, we sometimes encapsulate these asynchronous methods (the result of encapsulation is naturally asynchronous), how do we unit test these? Thanks!
The text was updated successfully, but these errors were encountered:
linying1991
changed the title
how to testing async program?
How to testing async program?
Nov 10, 2021
Hm... I'm not sure. I've not setup any tests for HtmlDialog callbacks or timers. TestUp is just a wrapper on top of Minitest, and I don't think Minitest (or any other typical unit test framework) is well suited for this kind of testing.
This sounds like you are testing UI interaction. In which case you might want to look at other tools that specialize on testing UI (simulating mouse events and keyboard events.)
There are many asynchronous methods in SketchUp, such as UI::start_timer, HtmlDialog#add_action_callback, we sometimes encapsulate these asynchronous methods (the result of encapsulation is naturally asynchronous), how do we unit test these? Thanks!
The text was updated successfully, but these errors were encountered: