Automated GUI Control testing (1 Viewer)

TesterBoy

Portal Pro
July 10, 2006
160
3
Lower Hutt
Home Country
New Zealand New Zealand
Is it possible to use NUnit to test a GUIControl without having to also run basically the whole of MP?

How have the GUIControls been tested in the past?

I ask because I have a bug (actually in the GUIListControl - infinite loop) that I'd like to fix but don't want to touch antything without a regression suite to be run against it to make sure I haven't broken aything else...
 

mPod

Portal Pro
January 26, 2005
2,084
3
Berlin
Home Country
Germany Germany
GUIControls have not been automatically tested yet. I guess that would need a rewrite of the controls, the current ones seem to be untestable with the current code.
 

TesterBoy

Portal Pro
July 10, 2006
160
3
Lower Hutt
Home Country
New Zealand New Zealand
So - how much of the code would be necessary, do you think? I would only need the window and message handling, but I don't want TV/video/music/plugins, configuration would be minimal etc...

I guess I'm effectively talking about a separate app, based on the MP framework, and being driven from NUnit rather than Main()...

When you say they're untestable, do mean that they rely on all the framework like I'm talking about?
 

mPod

Portal Pro
January 26, 2005
2,084
3
Berlin
Home Country
Germany Germany
Well, have a look at MediaPortal\MediaPortal.Tests in SVN. That's a dll that's run by nUnit, so it IS external.

By untestable I wanted to say that without rewriting the control(s), you will hardly be able to test them (it).

Can't tell how much and what exactly has to be rewritten to be testable, I didn't have a deeper look into it. Maybe you find a (experienced nUnit-) volunteer who's gonna write some tests and do the rewrites together with you? Thing is, I wouldn't invest too much work in the current controls, they are currently being rewritten to use WPF. Before you ask: No, the dev doing it does not use Unit tests for that. So very unlikely that the new controls are testable without changing their code.

Sorry I cannot help you any further there... Unfortunately unit tests lost attention in the team completely. (No doubt, they are a great tool, but only when being used. And currently no team dev uses it.)
 

TesterBoy

Portal Pro
July 10, 2006
160
3
Lower Hutt
Home Country
New Zealand New Zealand
Oh. And there I was thinking that everybody had to do NUnit testing fro MP development...

Forget that, then...

Thanks for the response, anyway...
 

jawbroken

Portal Pro
August 13, 2005
706
0
Home Country
Afghanistan Afghanistan
Ignoring the unit testing is a shame. I personally find them very useful. Though I do have trouble motivating myself to write them, I find that they really help me to get things right the first time and, perhaps more importantly, define a clear and usable interface for my code.
 

mPod

Portal Pro
January 26, 2005
2,084
3
Berlin
Home Country
Germany Germany
Ignoring the unit testing is a shame. I personally find them very useful. Though I do have trouble motivating myself to write them, I find that they really help me to get things right the first time and, perhaps more importantly, define a clear and usable interface for my code.
No doubt.
 

Users who are viewing this thread

Top Bottom