我使用的.NET单元测试和从代码中
这里呼吁bizunit是一个例子
// create list of files
TestGeneratedFiles = new System.Collections.Generic.List<String>();
var TestCase = new BizUnit.Xaml.TestCase { Name = "Interface128UnitTestSetup" };
//Create the file validate step
var testStep = new FileReadMultipleStep
{
DirectoryPath = inputPath,
SearchPattern = InputTemplate,
ExpectedNumberOfFiles = 1,
Timeout = 3000,
DeleteFiles = false
};
//Create an XML Validation step
//This will check against the XSD for the document
var validation = new XmlValidationStep();
var schemaSummary = new SchemaDefinition
{
// test deployment copies this file to test directory
XmlSchemaPath = @"Publish_Employee.xsd",
XmlSchemaNameSpace = "http://AMC.Oracle.Employee"
};
validation.XmlSchemas.Add(schemaSummary);
TestCase.ExecutionSteps.Add(testStep);
// run the test case
var bizUnit = new BizUnit.BizUnit(TestCase);
bizUnit.RunTest();
来源
2012-05-09 19:39:51
Jay