0

Is as way test out swing components without having to rely on Thread.sleep() to make sure that the components have realized completely. This problem with this approach is that it becomes difficult to guess how long it would take for components to realize under different environments of execution like vnc may take more time than running in on the local machine, hence if less time is set in the test case will fail with assertions in the local machine. More time set will increase the time for executing the test.

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by peter_budo
0

You shouldn't need to test your components themselves, as they shouldnt have any business logic in them. MVC, man...

0

Well it is not entirely possible to separate the View and business logic which dictates how the view should behave upon human interaction, eg how you will alter and render the visual components when mouse drag happens.
I may have figured out that there is a way to block the test case thread from accessing the unrealized components by using SwingUtilities.invokeLater
In the process of testing it out thoroughly so that there are no failures.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.