From: Phlip Date: 2007-08-26T12:19:05+09:00 Subject: Re: Ruby access to Win Forms application Jim Knowlton wrote: > I am a QA Engineer implementing a Ruby-based test framework to test > the applications in my organization...the issue I have is about 20% of >> what we do is Windows Forms (.NET) applications... The majority of your tests simply must use .NET. They should run as close as possible to the tested code. Every step farther from that code, the fuzzier and sloppier the tests get. In general, there's always a role for tests that are easy to script. Raw Ruby, or Ruby+YAML, would allow you to invent graceful DSLs that simultaneously document and test business rules. Yet that's not where you should start. > 1. Set up a mock of the server and establish connection with the > application. > 2. Send the application a message which should result in a screen > pop. > 3. Verify the screen pop came up. Mock the thing that pops the screen up. You don't need to test the GUI itself, because you aren't going to refactor or upgrade that. (Hopefully!) You need tests that cover only your own logic. That logic isn't going anywhere if a test simply catches its outputs _before_ those outputs go into the real GUI. -- Phlip http://www.oreilly.com/catalog/9780596510657/ "Test Driven Ajax (on Rails)" assert_xpath, assert_javascript, & assert_ajax