MSDN Magazine - March 2009 - (Page 98) .NET INTEROP Automated Acceptance Testing With IronRuby Ben Hall Almost every developer dreams of the day when customer requirements can be correctly communicated without having to waste time implementing incomplete or incorrect functionality. Wouldn’t it be great if we could hand a clear, readable specification to a customer and ask them if this matches their feature requirements, after which we could run exactly the same specification, without any additional effort, to verify our implementation against those requirements? This level of communication between customer and developer can be successfully accomplished using the concept of acceptance testing and executable specifications. By taking advantage of BeThis article is based on a prerelease version of IronRuby. All information is subject to change. havior Driven Development (BDD), we can start communicating requirements more effectively. In my article in the February issue of MSDN Magazine (msdn.microsoft.com/magazine/dd434651.aspx), I introduced you to IronRuby and demonstrated how it lets you use the dynamic Ruby language to interoperate with .NET-compliant code such as C#. In this article, I will introduce you to the concept of acceptance testing. By building on the concepts introduced in my previous article, I will demonstrate how acceptance testing can be automated using IronRuby and RSpec to verify .NET applications and create an executable specification for the system. What Is Acceptance Testing? Acceptance testing has been associated with many different definitions. For me, acceptance testing is more about verifying that the system under development meets the customer’s requirements and less about reducing the number of bugs in our code. In other words, acceptance testing is not about testing code, but about building what the customer or business wants. It sounds obvious, but a lack of acceptance testing and a similar lack of understanding of the requirements are the main reasons for many project failures. Acceptance testing only works with the support of the customer, or at the very least a proxy for the customer, to help define the criteria. Without someone driving the acceptance criteria, you have nothing to verify that the software is correct, which makes it This article discusses: • What is acceptance testing? • Automated acceptance testing • Implementing acceptance tests Technologies discussed: IronRuby Code download available at: code.msdn.microsoft.com/mag200903IronRuby 98 msdn magazine http://msdn.microsoft.com/magazine/dd434651.aspx http://code.msdn.microsoft.com/mag200903IronRuby
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.