Acceptance Test Framework

by Paul Kohler 27. March 2008 15:40

I have started work on an acceptance test framework with concepts similar to FIT. Actually the acceptance testing is just part of a bigger picture that I am building up. I have a very integrated vision for requirements, their tests, code generation etc. I have not been able to get customers using systems like FIT, I think they find it too academic or something but would rather stick with the traditional methods that (seem) to work. Perhaps tolerate is a better word!

The acceptance tests for now are in the form of business rules as data in a spreadsheet, such as:

Pay Type  Amount  Overtime Hours  Result
Hourly    25.85   1               1056.00
Hourly    10      0               400.00
Daily     500     0               2500.00

The developers provide a “test view” that takes the data and processes it, the “Result” is then compared and a report produced. Business rules are extracted and documented as you work through examples. The acceptance tests then become regression tests to ensure no existing functionality is broken by further development.

public class PayCalcTestView : ITestView
{     
	private PayCalc _calculator;
	public int Overtime_Hours;
	public PayType Pay_Type;
	[AcceptanceTestOutput]public decimal Result;    
	public PayCalcTestView()
	{
		_calculator = new PayCalc();
	}
	public void ExecuteTest()
	{
		Result = _calculator.CalculatePay(Pay_Type, Amount);
	}
}

You can use fields or properties and an output variable (the one used for camparison) is marked with an attribute.

I am also looking at applying it to simple GUI testing for Windows Forms apps and possibly web sites.

It's the kind of project I would like to full time on for a couple f months!

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

General

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.10
Theme by Mads Kristensen