Exemple #1
0
        /// <summary>
        /// Executes demo live tests.
        /// </summary>
        internal static void RunLiveTests7()
        {
            // set package execution parameters eg. variables, connections
            var parameters = new ExecutionParameters();

            // add variables and their values to be set when the package has been loaded
            parameters.AddProjectConnectionString("Customers Src", Constants.CustomersFileSource);
            parameters.AddProjectParameter("ConvertDestinationPath", Constants.CustomersFileConverted);
            parameters.AddProjectParameter("DestinationPath", Constants.CustomersFileDestination);
            parameters.AddProjectParameter("SourcePath", Constants.CustomersFileSource);

            // create engine for live testing
            var engine = EngineFactory.GetClassInstance <ILiveTestEngine>();

            // load packages and relate them to the logical group - repository
            const string repositoryName = "DEMO5";

            int cnt = engine.LoadPackages(repositoryName, Constants.PathToIspac);

            // load live tests from the current assembly
            engine.LoadRepositoryActions(repositoryName);

            // set execution parameters
            engine.SetExecutionParameters(parameters);

            // execute the package and attach live tests
            engine.ExecuteLiveTestsWithGui(repositoryName, "Main.dtsx");
        }