Example #1
0
        public static string GetUFTInstallationInfo()
        {
            try
            {
                var    qtpi   = new QuickTestProInfo();
                string output = "No";

                if (qtpi.IsInstalled)
                {
                    if (qtpi.ProductName.Contains("QC Integration"))
                    {
                        var qtp = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("HP Unified Functional Testing"));
                        if (qtp != null)
                        {
                            output = "Yes, " + qtp.DisplayName + " " + qtp.DisplayVersion;
                        }
                    }
                    else
                    {
                        output = Html.BoolToYesNo(qtpi.IsInstalled) + " " + qtpi.ProductName + " " + qtpi.ProductVersion + Helper.ConvertInstallDate(qtpi.InstallDate);
                    }
                }
                return(output);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                return(Html.ErrorMsg());
            }
        }
            public static string GetIsSiebelCorrelationEnabledInfo()
            {
                StringBuilder output = new StringBuilder();

                //TODO load correlations xml only once
                //use the VugenProtocols.CorrelationRulesEnabledInfo
                try
                {
                    if (ProductDetection.Vugen.IsInstalled)
                    {
                        var  rule       = CorrelationRules.GetRuleByName("AutoDetect_Siebel_Parse_Page", "Siebel");
                        bool ruleExists = (rule != null && rule.callbackName == "flCorrelationCallbackParseWebPage");

                        output.Append("Is 'Siebel' group of rules enabled? " + CorrelationRules.IsGroupEnabledText("Siebel") + Html.br);
                        output.Append(@"Is WebSiebel77Correlation.cor applied? " + Html.BoolToYesNo(ruleExists) + Html.br);
                        output.Append("Is WebSiebelSpanningRules.cor applied? " + CorrelationRules.IsGroupEnabledText("Siebel_Spanning") + Html.br);
                        return(output.ToString());
                    }
                    else
                    {
                        return("Vurtual user generator is not installed");
                    }
                }
                catch (Exception ex)
                {
                    Logger.Error(ex.ToString());
                    return(Html.ErrorMsg());
                }
            }
Example #3
0
 public string GetProductNameVersionDateFormatted()
 {
     try
     {
         return(Html.BoolToYesNo(IsInstalled) + " " + ProductName + " " + ProductVersion + Helper.ConvertInstallDate(InstallDate));
     }
     catch (Exception ex)
     {
         Logger.Error(ex.ToString());
         return(Html.ErrorMsg());
     }
 }
 internal static string GetJavaIniBoolOption(string option)
 {
     try
     {
         var setting = ini.GetBoolSetting(tabName, option, false);
         return(Html.BoolToYesNo(setting));
     }
     catch (Exception ex)
     {
         Logger.Error(ex.ToString());
         return(Html.ErrorMsg() + " " + option + " option");
     }
 }
        internal string IsTerminalServicesEnabledInfo()
        {
            string path = Path.Combine(ProductDetection.Loadgen.InstallLocation, @"launch_service\dat\br_lnch_server.cfg");

            try
            {
                var  ini = new IniParser(path);
                bool res = ini.GetBoolSetting("FireWall", "FireWallServiceActive", false);
                return(Html.BoolToYesNo(res));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                return(Html.Error("Configuration file not found!"));
            }
        }
Example #6
0
 public static string IsGroupEnabledText(string groupName)
 {
     try
     {
         var group = GetGroupByName(groupName);
         return(Html.BoolToYesNo(group.enabled));
     }
     catch (NullReferenceException)
     {
         return("No correlation group with name " + groupName + " found!");
     }
     catch (Exception ex)
     {
         Logger.Error(ex.ToString());
         return(ex.Message);
     }
 }
Example #7
0
        protected override void Collect()
        {
            var dh = new DataHolder("Operating System");

            dh.dataPairs.Add("Machine name", System.Environment.MachineName);
            dh.dataPairs.Add("Full name", OSCollectorHelper.GetOSFullNameFormatted());
            dh.dataPairs.Add("Root directory", OSCollectorHelper.GetOSRootDir());
            // If VuGen is not installed product version will be 0.0
            //if (ProductDetection.Vugen.version >= new Version(11, 04) && ProductDetection.Vugen.version <= new Version(12, 01))
            //  dh.dataPairs.Add("Is OS supported?", OSCollectorHelper.IsOSSupportedInfo());
            dh.dataPairs.Add("Language", OSCollectorHelper.language);
            dh.dataPairs.Add("Locale", OSCollectorHelper.GetOSLocaleInfo());
            dh.dataPairs.Add("Is OS Virtualized?", OSCollectorHelper.IsOSVirtualizedInfo());
            dh.dataPairs.Add("Is 3GB switch enabled?", OSCollectorHelper.Is3GBSwitchEnabled());
            dh.dataPairs.Add("Data Execution Prevention", OSCollectorHelper.DepInfo());
            dh.dataPairs.Add("User Account Control", OSCollectorHelper.UACInfo());
            dh.dataPairs.Add("Is user Admin?", Html.BoolToYesNo(OSCollectorHelper.IsUserInAdminGroup()));
            dh.dataPairs.Add("Is user connected remotely?", Html.BoolToYesNo(SystemInformation.TerminalServerSession));
            dh.dataPairs.Add("Is Windows firewall enabled?", OSCollectorHelper.IsWindowsFirewallEnabled());
            dh.dataPairs.Add("Is secondary logon enabled?", OSCollectorHelper.IsSecondaryLogonEnabledInfo());

            dataHolders.Add(dh);

            dh = new DataHolder("Environment information");
            dh.dataPairs.Add("System environment variables", Html.AddLinkToHiddenContent(OSCollectorHelper.GetEnvVariables()));
            dh.dataPairs.Add("User environment variables", Html.AddLinkToHiddenContent(OSCollectorHelper.GetUsrEnvVariables()));
            dh.dataPairs.Add("Kerberos configuration", OSCollectorHelper.GetKerberosConfiguration());
            var lsp = Html.B(OSCollectorHelper.GetNumberOfInstalledLSPs() + " entries found ") + Html.AddLinkToHiddenContent(OSCollectorHelper.GetInstalledLSPs());

            dh.dataPairs.Add("Layered Service Providers", lsp);
            dh.dataPairs.Add("AppInit_DLLs registry value", OSCollectorHelper.GetAppInitDLLsInfo());

            //LoadAppInit_DLLs registry is only availbale in Windows 7 and later
            if (Environment.OSVersion.Version >= new Version(6, 1))
            {
                dh.dataPairs.Add("LoadAppInit_DLLs registry value", OSCollectorHelper.GetLoadAppInitDLLsInfo());
            }
            dataHolders.Add(dh);
        }
Example #8
0
        protected override void Collect()
        {
            var link = new HtmlElement("a")
            {
                text = "View Readme"
            };

            link.Attributes.Add("target", "_blank");
            link.Attributes.Add("href", "file:///" + ProductDetection.Vugen.InstallLocation + "dat/Readme.htm");

            string readme = ProductDetection.isFullLRInstalled ? link.ToString() : "";
            string title  = "LoadRunner Information";
            string lrInfo = String.Format("{0} {1} {2} {3} {4}",
                                          Html.BoolToYesNo(ProductDetection.isFullLRInstalled), ProductDetection.FullLR.ProductName, ProductDetection.FullLR.ProductVersion,
                                          Helper.ConvertInstallDate(ProductDetection.FullLR.InstallDate), readme);

            AddDataPair(title, "Is full LoadRunner installed?", lrInfo);

            //If Full LR or PC HOST are not installed:
            if (!ProductDetection.isFullLRInstalled)
            {
                string vugenSAInfo = ProductDetection.Vugen.IsInstalled ? ProductDetection.Vugen.GetProductNameVersionDateFormatted() + " " + link : "No";
                AddDataPair(title, "Is VuGen stand-alone installed?", vugenSAInfo);
                AddDataPair(title, "Is Analysis stand-alone installed?", ProductDetection.Analysis.GetProductNameVersionDateFormatted());
                AddDataPair(title, "Is Load Generator installed?", ProductDetection.Loadgen.GetProductNameVersionDateFormatted());
                AddDataPair(title, "Is Monitor Over Firewall installed?", ProductDetection.monitorOverFirewall.GetProductNameVersionDateFormatted());
                AddDataPair(title, "Is PC Server installed?", ProductDetection.pcServer.GetProductNameVersionDateFormatted());
                AddDataPair(title, "Is MI Listener installed?", ProductDetection.miListener.GetProductNameVersionDateFormatted());
            }

            // Display patches installed for the products. If a product is not install patchesInstalled will return empty string
            if (ProductDetection.installedProducts.Count > 0)
            {
                StringBuilder customComponentsInstalled = new StringBuilder(1024);
                StringBuilder mainExecutableFiles       = new StringBuilder(1024);
                //StringBuilder importantRegKeys = new StringBuilder(1024);
                StringBuilder environmentVariables = new StringBuilder(1024);
                StringBuilder patchesInstalledInfo = new StringBuilder(1024);
                var           languagePacks        = new StringBuilder();

                foreach (var installedProduct in ProductDetection.installedProducts)
                {
                    customComponentsInstalled.Append(installedProduct.CustomComponentsInstalled);
                    mainExecutableFiles.Append(installedProduct.mainExecutableFilesInfo);
                    //importantRegKeys.Append(installedProduct.ImportantRegKeyValues);
                    environmentVariables.Append(installedProduct.environmentVariables);
                    patchesInstalledInfo.Append(installedProduct.patchesInstalled);
                    languagePacks.Append(installedProduct.languagePack);
                }

                // Collect the patches for the installed products
                string patchesInstalled = (patchesInstalledInfo.ToString() != "") ? patchesInstalledInfo.ToString() : "None";
                AddDataPair(title, "Patches installed", patchesInstalled);
                AddDataPair(title, "Language pack", languagePacks.ToString());
                AddDataPair(title, "Custom components installed", customComponentsInstalled.ToString());

                AddDataPair(title, "Main executable files", mainExecutableFiles.ToString());
                //AddStringsToDictionary("LoadRunner Information", "Various registry keys", importantRegKeys.ToString());
                // check if we only have MOF installed
                if (ProductDetection.monitorOverFirewall.IsInstalled && (!ProductDetection.Vugen.IsInstalled || !ProductDetection.Loadgen.IsInstalled))
                {
                    AddDataPair(title, "Related environment variables", ProductDetection.monitorOverFirewall.environmentVariables);
                }
                else
                {
                    AddDataPair(title, "Related environment variables", environmentVariables.ToString());
                }
            }
        }
        protected override void Collect()
        {
            var title = "HP Citrix Agent Information";


            var ctrxAgent = new CitrixHelper.Agent();


            AddDataPair(title, "Citrix Agent", ctrxAgent.ToString());

            if (ctrxAgent.isInstalled)
            {
                AddDataPair(title, "Agent configuration", Html.AddLinkToHiddenContent(ctrxAgent.GetIniContentInfo()));
                AddDataPair(title, "Citrix registry keys", ctrxAgent.GetImptKeyContent());
                AddDataPair(title, "Is text trapping driver installed?", Html.BoolToYesNo(ctrxAgent.isTextTrappingDriverInstalled) + ctrxAgent.textTrappingDriverVersion);
                if (ctrxAgent.isTextTrappingDriverInstalled)
                {
                    AddDataPair(title, "Is text trapping driver signed?", ctrxAgent.driverSignedInfo);
                    AddDataPair(title, "Text trapping driver state", ctrxAgent.textTrappingDriverState);
                }
            }



            //################
            //RDP Role Detection
            //################
            title = "HP RDP Agent Information";
            //AddDataPair(title, "Is RDP access allowed?", DetectOtherSoftware.IsRDPAccessAllowedInfo());
            AddDataPair(title, "Is RDP Role installed?", DetectOtherSoftware.IsRDPRollInstalledInfo());
            AddDataPair(title, "HP RDP Agent", DetectOtherSoftware.RDPAgentInfo());



            //#############
            //VTS DETECTION
            //#############
            Logger.Info("Collecting VTS information");
            var vts = new VirtualTableServer();

            title = "HP Virtual Table Server";

            if (vts.IsInstalled)
            {
                AddDataPair(title, "Is VTS installed?", vts.GetProductNameVersionDateFormatted());
                AddDataPair(title, "Details", vts.GetExecutableFilesInfo());
                AddDataPair(title, "Service status", vts.GetVTSServiceInfo());
            }
            else
            {
                var vts2 = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("[L|l]oad[R|r]unner - VTS"));
                var info = (vts2 != null) ? vts2.ToString() : "No";
                AddDataPair(title, "Is VTS installed?", info);
            }



            //#############
            //LoadRunner Eclipse Add-in for Developers DETECTION
            //#############
            Logger.Info("Collecting LoadRunner Eclipse information");
            title = "LoadRunner Eclipse Add-in for Developers";
            var eclipsePlugin = InstalledProgramsHelper.GetInstalledProgramByName(new System.Text.RegularExpressions.Regex("LoadRunner Eclipse.*Developers"));

            if (eclipsePlugin != null)
            {
                AddDataPair(title, "Is Eclipse Add-in installed?", "Yes " + eclipsePlugin.DisplayName);
                AddDataPair(title, "Version", eclipsePlugin.DisplayVersion);
                AddDataPair(title, "Eclipse path", VuGenProperties.GetAttributeValue("Java.EclipseIdePath", "value", "Not found!"));
            }
            else
            {
                AddDataPair(title, "Is Add-in installed?", "No");
            }



            //#############
            //LoadRunner Visual Studio 2012 Add-in for Developers DETECTION
            //#############
            Logger.Info("Collecting LoadRunner Eclipse information");
            title = "LoadRunner Visual Studio Add-in for Developers";
            var    vsPlugin  = InstalledProgramsHelper.GetInstalledProgramByName(new System.Text.RegularExpressions.Regex("LoadRunner Visual Studio 20[0-9]{2} Add"));
            string installed = vsPlugin != null ? Html.Yes + " " + vsPlugin.DisplayName + " version " + vsPlugin.DisplayVersion : Html.No;

            AddDataPair(title, "Is Add-in installed?", installed);



            //#############
            //BPM DETECTION
            //#############
            Logger.Info("Detecting BPM");
            title = "HP Business Process Monitor";
            var bpm = new BusinessProcessMonitorInfo();
            //Logger.Info("BPM installation " + Html.Bool2Text(bpm.IsInstalled));
            var bpmInstallInfo = (bpm.IsInstalled == true) ? bpm.GetProductNameVersionDateFormatted() : BusinessProcessMonitorInfo.GetBPMInstallationInfoFromUninstaller();

            AddDataPair(title, "Is BPM installed?", bpmInstallInfo);

            if (bpm.IsInstalled == true || !bpmInstallInfo.Contains("No"))
            {
                AddDataPair(title, "Service status", BusinessProcessMonitorInfo.GetBPMServiceInfo());
                AddDataPair(title, "BPM processes", Html.AddLinkToHiddenContent(BusinessProcessMonitorInfo.GetBPMProcessesInfo()));
            }



            //#############
            //ALM Platform Loader
            //#############
            if (FormArguments.details >= 2)
            {
                Logger.Info("Detecting ALM PL information");
                AddDataPair("ALM Platform Loader", "Is ALM Platform Loader installed?", DetectOtherSoftware.GetALMPlatformLoaderInfo());
            }



            //#############
            //QTP DETECTION
            //#############
            Logger.Info("Detecting UFT");
            AddDataPair("HP Unified Functional Testing", "Is QTP/UFT installed?", DetectOtherSoftware.GetUFTInstallationInfo());



            //#############
            //SITESCOPE DETECTION
            //#############
            if (FormArguments.details >= 2)
            {
                Logger.Info("Collecting SiteScope information");
                AddDataPair("HP SiteScope", "Is SiteScope installed?", DetectOtherSoftware.GetSiteScopeInfo());
            }
        }