Exemplo n.º 1
0
 public AnalysisInfoTest()
 {
     t = new TestProduct { uid = "CE53A34494FAD3C4BB524D4EA62DB6FF", pCode = "00000000000_GENEV_PCODE_ANALYSIS", displayName = "HP Analysis", displayVersion = "12.00", installDate = "20140319", installLocation = @"C:\Program Files (x86)\HP\LoadRunner\" };
       if (t.InstallTestProduct())
       {
     Debug.WriteLine("Test product installed: " + t.displayName);
     Analysis = new AnalysisInfo();
       }
 }
Exemplo n.º 2
0
        public VTSTest()
        {
            t = new TestProduct { uid = "E86DE06E377BEEC4F8B5E243A797A42B", pCode = "00000000000000000_GENEV_PCODE_VTS", displayName = "HP VTS", displayVersion = "11.52", installDate = "20140319", installLocation = @"C:\Program Files\HP\VTS", exesLocation = "VTS_11.52", removeExesOnUninstall = true };
              if (t.InstallTestProduct())
              {
            Debug.WriteLine("Test product installed: " + t.displayName);

            t.exes = new List<string> { @"client\SharedParameter.dll", @"install\srvany.exe", @"web\node.exe" };
            if (t.copyExesToInstallDir())
              VTS = new VirtualTableServer();

              }
        }
Exemplo n.º 3
0
        public BPMTest()
        {
            t = new TestProduct { uid = "F3770988A38F9A74AABC8781784C173D", pCode = "00000000000000000_GENEV_PCODE_BPM", displayName = "HP BPM", displayVersion = "9.23", installDate = "20140419", installLocation = @"C:\HP\BPM", exesLocation = "BPM_11.52", removeExesOnUninstall = true };
              if (t.InstallTestProduct())
              {
            Debug.WriteLine("Test product installed: " + t.displayName);

            t.exes = new List<string> { @"client\SharedParameter.dll", @"install\srvany.exe", @"web\node.exe" };
            if (t.copyExesToInstallDir())
              BPM = new VirtualTableServer();

              }
        }
Exemplo n.º 4
0
 //ProductInfo Analysis = null;
 public ProductInfoTest()
 {
     FullLR = new LoadRunnerInfo();
 }
Exemplo n.º 5
0
        static ProductDetection()
        {
            Logger.Debug("Started " + MethodBase.GetCurrentMethod());
              try
              {
            Logger.Info("Started collection of HP  products information");

            //1. Check for LR Full installation
            //2. Check for PC Host installation
            //3. Check for VuGen SA installation, Analysis SA, Load Generator SA etc...
            Logger.Info("Detecting LoadRunner installation");
            FullLR = new LoadRunnerInfo();
            if (FullLR.IsInstalled)
            {
              installedProducts.Add(FullLR);
              isFullLRInstalled = true;
              Vugen = FullLR;
              Analysis = FullLR;
              Loadgen = FullLR;
            }
            else //if no LR is installed check for PC Host
            {
              Logger.Info("Detecting Performance Center Host installation");
              FullLR = new PerformanceCenterHostInfo();
              if (FullLR.IsInstalled)
              {
            installedProducts.Add(FullLR);
            isFullLRInstalled = true;
            isPCHostInstalled = true;
            Vugen = FullLR;
            Analysis = FullLR;
            Loadgen = FullLR;
              }
              else //if no LR and PC Host are not installed check for VuGen SA
              {
            Logger.Info("Detecting VuGen Stand Alone installation");
            Vugen = new VugenSAInfo();
            if (Vugen.IsInstalled)
              installedProducts.Add(Vugen);

            Logger.Info("Detecting Analysis Stand Alone installation");
            Analysis = new AnalysisInfo();
            if (Analysis.IsInstalled)
              installedProducts.Add(Analysis);

            Logger.Info("Detecting Load Generator installation");
            Loadgen = new LoadGeneratorInfo();
            if (Loadgen.IsInstalled)
              installedProducts.Add(Loadgen);

            Logger.Info("Detecting MI Listener installation");
            miListener = new MIListener();
            if (miListener.IsInstalled)
              installedProducts.Add(miListener);
              }
            }

            Logger.Info("Detecting Monitor Over Firewall installation");
            monitorOverFirewall = new MonitorOverFirewallInfo();
            if (monitorOverFirewall.IsInstalled)
              installedProducts.Add(monitorOverFirewall);

            Logger.Info("Detecting Performance Center Host installation");
            pcServer = new PerformanceCenterServerInfo();
            if (pcServer.IsInstalled)
              installedProducts.Add(pcServer);

              }
              catch (Exception ex)
              {
            System.Windows.Forms.MessageBox.Show(ex.ToString());
              }
              finally
              {
            Logger.Debug("Ended " + MethodBase.GetCurrentMethod());
              }
        }
Exemplo n.º 6
0
        /*
         * /// <summary>
         * /// Check if certain .net version is installed
         * /// </summary>
         * /// <param name="version">v3.5 | v4.0</param>
         * /// <returns></returns>
         * public bool IsDotNetVersionInstalled(string version)
         * {
         *  try
         *  {
         *      string path = (version == "v4") ? @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" : @"SOFTWARE\Microsoft\NET Framework Setup\NDP\" + version;
         *      string key = Registry.LocalMachine.OpenSubKey(path).GetValue("Install").ToString();
         *      return key == "1" ? true : false;
         *  }
         *  catch (Exception ex)
         *  {
         *      Logger.Error(ex.ToString());
         *      return false;
         *  }
         *
         * }*/

        #endregion

        #region SiteScope detection
        /// <summary>
        /// SiteScope DETECTION
        /// </summary>
        /// <returns></returns>
        public static string GetSiteScopeInfo()
        {
            try
            {
                Logger.Debug("GetSiteScopeInfo() started.");
                // check for installations of
                String[] siteScopeUpgradeCodes = new String[]
                {
                    "7C9790C8356D6A142B1E73F0AE4F22AB", //HP SiteScope for LoadTesting
                    "55D444412FEC9B349A920326911A26F1", //HP SiteScope Integrations
                    "F60D57E75AF65A84E888D007E2799EE9", //HP SiteScope Monitoring
                    "350F46B85A30F7240911CD2A1C293400", //HP SiteScope Server
                    "54509F95E83F79C43A15FDAFB2FF3CA3", //HP SiteScope User Interface
                    "CFCBC45A6F7CE934286FF54746AF7708"  //HP SiteScope Tools
                };

                // Get product codes for installed SiteScope features
                StringBuilder productInfo = new StringBuilder(1024);
                String        productCode = String.Empty;

                Stopwatch stopWatch = Stopwatch.StartNew();

                //if Parallel execution is enabled (default)
                if (FormArguments.async)
                {
                    Helper.EachParallel(siteScopeUpgradeCodes, upgradeCode =>
                    {
                        //foreach (string upgradeCode in siteScopeUpgradeCodes)
                        //{
                        productCode = ProductInfo.GetProductCode(upgradeCode);
                        if (productCode != null)
                        {
                            string registryPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\" + productCode + @"\InstallProperties";
                            //Logger.Log("Searching for SiteScope in registry path " + registryPath);
                            string productName = RegistryWrapper.GetValue(RegHive.LocalMachine, registryPath, "DisplayName");
                            Logger.Info("SiteScope product name " + productName);
                            // Product name found now find the product version
                            string productVersion = String.Empty;
                            if (productName != null)
                            {
                                productVersion = RegistryWrapper.GetValue(RegHive.LocalMachine, registryPath, "DisplayVersion");
                            }

                            string intallDate = RegistryWrapper.GetValue(RegHive.LocalMachine, registryPath, "InstallDate");
                            productInfo.Append(productName + ", version " + productVersion + " " + Helper.ConvertInstallDate(intallDate) + Html.br);
                        }
                    });
                }
                else
                {
                    foreach (string upgradeCode in siteScopeUpgradeCodes)
                    {
                        productCode = ProductInfo.GetProductCode(upgradeCode);
                        if (productCode != null)
                        {
                            string registryPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\" + productCode + @"\InstallProperties";
                            //Helper.Log("Searching for SiteScope in registry path " + registryPath);
                            string productName = RegistryWrapper.GetValue(RegHive.LocalMachine, registryPath, "DisplayName");
                            Logger.Info("SiteScope product name " + productName);
                            // Product name found now find the product version
                            string productVersion = String.Empty;
                            if (productName != null)
                            {
                                productVersion = RegistryWrapper.GetValue(RegHive.LocalMachine, registryPath, "DisplayVersion");
                            }

                            string intallDate = RegistryWrapper.GetValue(RegHive.LocalMachine, registryPath, "InstallDate");
                            productInfo.Append(productName + ", version " + productVersion + " " + Helper.ConvertInstallDate(intallDate) + Html.br);
                        }
                    }
                }

                TimeSpan ts = stopWatch.Elapsed;
                stopWatch.Stop();
                Logger.Debug("DetectOtherSoftware.GetProductCode finished. Execution time: " + ts.ToString());
                Debug.WriteLine(ts.ToString());

                return((productInfo.Length != 0) ? productInfo.ToString() : "No");
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                return(Html.ErrorMsg());
            }
        }