Acceptance Test Framework

by Paul 3/27/2008 6:40:00 AM

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!

 

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

7/25/2008 9:39:22 AM

Powered by BlogEngine.NET 1.3.1.0
Theme by Mads Kristensen

About the author

Paul Kohler Paul Kohler
A .NET software developer living and working in Brisbane, Australia.

PK Software
E-mail me Send mail

Calendar

<<  July 2008  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008