1

こんにちは、bizunit 4.0 で test1.xml という名前の xml テスト ケースを作成しました。

私が抱えている問題は、テストを実行する方法です。私が見つけたすべての例は、bizunit 2.0 および 3.0 用ですが、4.0 用ではありません。私が見つけた例では、これを行うように言っています:

 BizUnit.BizUnit bizUnit = new BizUnit.BizUnit("testl.xml");
 bizUnit.RunTest();

しかし、私はそれが非推奨であるというメモを受け取ります。

4

2 に答える 2

2

.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-09T19:39:51.343 に答える