Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    68
  • comments
    177
  • views
    82307

TDD of graphical applications

Sign in to follow this  
capn_midnight

306 views

I use a lot of Test Driven Development with my projects, mostly because I'm a shitty programmer without it, it is my crutch. But one problem with TDD is that it isn't really suited to anything graphical. You can do some generalized, precursory tests, stuff like making sure the image is the right proportions (like that's hard to do ;)), or checking pixels in very small images (large ones would be far too tedious), but nothing that really ensures that things are actually "right".

Regression testing is a possibility, but it requires screenshots from an existing system (kind of defeating the purpose of TDD), and the tests will fail even if there is 1 pixel different over 1 million pixels. Not very robust.

However, what possibilities lie in the field of signal processing? We can use various concepts of signal processing to compare a compressed image to the original image to get an idea of the level of information loss due to lossy compretion algorithms. What if we also employed neural networks in an attempt to recognize objects actually in the picture?

Again, another project that I will probably start with no intention of finishing.
Sign in to follow this  


2 Comments


Recommended Comments

Still a nobel and interesting idea.
I have seen tools that test the forms and clicking of things themselves, but nothing for actual layout. Other then web tools like bobby that look at web pages.

Share this comment


Link to comment
There are very definite problems with both types of tools.

For the GUI testers, they work in one of two ways, either record mouse movement from a human and replay it, or "finding" the controls on the form using reflection or just the control access methods of the form.

The first method is extremely brittle, one change in the form requires a whole new test script to be written. It also breaks the whole concept of "test first, then code", because you'll need to have a GUI in place before you can record the input sequence.

The second method is a start at fixing the problems of the first, but it is TOO adaptive. It will be able to find a button that is only 1 pixel wide, and still be able to click it. Obviously, that's not a good idea, either.

None of these GUI testers are capable of inferring anything about the quality of the GUI.

The Webpage testers are equally flawed. First, they parse the HTML of the page, not the rendered HTML itself. One could say that it is rendering the HTML to a format that the computer understands, but it is still not "what the user sees". Also, considering the rendering differences between various browsers, a single tester will NEVER know what the user sees.

Second with the HTML testers, they only use a very basic rules system, such as "don't use TABLEs at all" and "flag all IMGs without size attributes". They stick to basic, catch all guidelines and pass them off as mandatory.

Finally, they are still after-the-fact testers. I can't tell the test engine, "my web page should meet these requirements, and this is how to tell if it meets them" and expect a checklist of the requirements that I pass or don't pass. Instead, I give it a webpage, and it tells me how good the code is. The code could be the fastest, most efficient, greased lightning in the world, but if it doesn't meet the requirements it's just greased pig shit.

So, the task at hand is to create a graphical testing system capable of making inferrences when given a list of requirements.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!