Пример #1
0
        public int STAction()
        {
            STRunTimeContext ctx = new STRunTimeContext(Directory.GetParent(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName, string.Empty);
            WorkFlowScript script = new WorkFlowScript(ctx);
            script.InitializeComponent();
            script.Start();

            return 0;
        }
Пример #2
0
        public int STAction()
        {
            AddAssemblyResolver();
            STRunTimeContext ctx    = new STRunTimeContext(Directory.GetParent(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName, string.Empty);
            WorkFlowScript   script = new WorkFlowScript(ctx);

            script.InitializeComponent();
            script.Start();

            return(0);
        }
Пример #3
0
 public void NotifyLicenseException(string msg)
 {
     try
     {
         STRunTimeContext ctx    = new STRunTimeContext(Directory.GetParent(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName, string.Empty);
         WorkFlowScript   script = new WorkFlowScript(ctx);
         script.InitializeComponent();
         script.Context.ReplayClient.OnLicenseFailure(msg);
     }
     catch (Exception)
     {
         // ToDo: log the error message
     }
 }
Пример #4
0
        public void NotifyLicenseException(string msg)
        {
            try
            {
                STRunTimeContext ctx = new STRunTimeContext(Directory.GetParent(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName, string.Empty);
                WorkFlowScript script = new WorkFlowScript(ctx);
                script.InitializeComponent();
                script.Context.ReplayClient.OnLicenseFailure(msg);

            }
            catch (Exception)
            {
                // ToDo: log the error message
            }
        }
Пример #5
0
        public int vuser_init()
        {
            lr = new LoadRunner.LrApi();             // Initialize LR-API Interface

            string scriptDir      = Directory.GetParent(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName;
            string log4net_config = string.Empty;

            if (lr.get_attrib_string("lr_replay_pipeName") != null)
            {
                log4net_config = Path.Combine(scriptDir, @"Log\vtd_log4loadSTShell.config");
            }
            else
            {
                log4net_config = Path.Combine(scriptDir, @"Log\vtd_log4load.config");
            }
            ctx = new STRunTimeContext(scriptDir, log4net_config);

            if (lr.get_debug_message() != 0)
            {
                LRAppender.logTextAppend += SendLogToVugen;
            }

            if (executionUnitInput == null)
            {
                var input = new TestInput();
                input.Load(lr.get_attrib_string("lr_usr_dir"));
                executionUnitInput = input;

                string pipeName = lr.get_attrib_string("lr_replay_pipeName");
                if (pipeName != null && VuserClass.CommandLineArguments == null)
                {
                    VuserClass.CommandLineArguments    = new string[2];
                    VuserClass.CommandLineArguments[0] = "-lr_replay_pipeName";
                    VuserClass.CommandLineArguments[1] = pipeName;
                }
            }

            script = new LRWorkFlowScript(ctx);
            script.InitializeEncryptionManagerValues();

            return(0);
        }