In this project, I'm exploring feasibility of a browser testing framework using Selenium. I've played around with Ghost Inspector, a browser testing service, and I think it's pretty cool. But I have some discomforts with the record and playback model since you have to record each test manually, and I'm concerned that this doesn't scale very well to large apps. My other concern is that pass/fail has to be done by "scraping" web pages for evidence. It would be simpler to be able to query the back-end database directly. So that's what I want to achieve with this -- some sort of scale advantage for testing large apps, and database-level assertions for pass/fail detection. The "scale advantage" I'm referring to means the ability to generate use cases dynamically as well as to empower the developer ("shift left") with some kind of declarative shorthand.
I have to say I'm not a huge fan of Test-Driven Development. Although I believe there are good scenarios for it, in my experience it's just too intrusive and complicated. But I do recognize a need for test automation of some kind -- especially at the browser level since that's what the user experiences. As apps get larger and more complicated, manual testing becomes a bottleneck to completing fixes and enhancements. As time goes by, a creeping dread of breaking apps with each deployment has a chilling effect on productivity. I have lived this!
There are two projects in this repo going in somewhat different directions:
-
Gander.Library is intended as the basis of a GUI app for defining and launching tests. The end user would be project managers and/or business analysts. The more I think about it, the less confident I am about this because there's already a mature market of sophisticated testing tools, and I'm not sure there's an opportunity here. I'm interested in this nonetheless because I want to give PMs and BAs more ownership of the testing process if it can be done "easily." Ghost Inspector may be the easiest tool I know, but like I said, I have some hesitation around record-and-playback when it comes to handling dynamic data.
-
Gander.Unit is intended for MSTest integration strictly for a developer audience. The downside of this is that BM/PA stakeholders are denied ownership of testing, and it gets pushed back to the developer. The upside is that with the SeleniumHelper base class, writing browser-based unit tests is pretty easy for the simple case I'm handling now -- filling out a form and submitting it. For a realistic example, see GinsengBrowserTests.cs and GinsengEnvironment.cs.