コード例 #1
0
        static void Main(string[] args)
        {
            SAPTestHelper.Current.SetSession();
            //Simple workflow
            //DataTable dt = new DataTable();
            //dt.ReadFromExcel(@"c:\temp\simpleWorkFlow.xlsx", "sheet1");
            //DataTable<va01_initial> myTest = new DataTable<va01_initial>(dt);

            //foreach (var data in myTest)
            //{
            //    va01_initial.RunAction(data);
            //}
            //Simple Workflow
            ReportSerializeTest();
            SAPTestHelper.Current.TurnScreenLog(true);
            Global.DataSet = ExcelHelper.Current.Open(@"C:\temp\Test.xlsx").ReadAll();
            Global.CurrentId = 1;
            //initialize report
            Reporter.Reporter reporter = new Reporter.Reporter();
            reporter.initialize("VA01Test");
            SAPBasis mySAPBasis = new SAPBasis();
            VA01 myScript = new VA01();
            BusinessComponent.SD mySD = new BusinessComponent.SD();
            reporter.AddStep("VA01_CreateSalesOrder", "Pass", "VA01_CreateSalesOrder", 1);
            mySD.VA01_CreateSalesOrder("CreateSO_Initial");
            mySD.VA01_CreateSalesOrder("CreateSO_Overview");
            mySD.VA01_CreateSalesOrder("Create_Header_Sales");
            mySD.VA01_CreateSalesOrder("CreateSO_Header_AdditionaldataB");
            mySD.VA01_CreateSalesOrder("CreateSO_Header_Texts");
            mySD.VA01_CreateSalesOrder("CreateSO_Save");
            string DocNo = mySD.DocNo;
            reporter.updateoutputdata("SalesDocNo", DocNo);
            reporter.close();
        }
コード例 #2
0
 public void ReportTest_Initialize()
 {
     //initialize a report
     var reporter = new Reporter.Reporter();
     var report = new Reporter.ReportRoot();
     var RS = new Reporter.ReportSerialization();
     reporter.initialize("Test_Name_1231231234");//don't use space;
     //add details
         //deserializae xml file
     List<Reporter.InputData> inputdata = new List<Reporter.InputData>();
     List<Reporter.OutputData> outputdata = new List<Reporter.OutputData>();
     inputdata.Add(new Reporter.InputData { FieldName="OrderType",FieldValue="ZOR"});
     outputdata.Add (new Reporter.OutputData{FieldName = "DocNo",FieldValue =  "11223344"});
     reporter.AddStep("CaseName001", "Pass", "StepName", 1);
     reporter.AddStep("CaseName002", "Pass", "StepName", 2);
     reporter.updateinputdata("asdfasdf", "true");
     reporter.updateoutputdata("dfasdfasdfs", "false");
     //add details
 }