static Citrix()
 {
     try
     {
       ini = new IniParser(Path.Combine(ProductDetection.Vugen.DatFolder, "citrix_ro.ini"));
     }
     catch (Exception ex)
     {
       Logger.Error(ex.ToString());
     }
 }
Exemplo n.º 2
0
 /// Settings
 /// Recording engine check
 private string GetCorrelationRulesSupport()
 {
     try
     {
         StringBuilder output = new StringBuilder();
         IniParser ini = new IniParser(this.InstallLocation + @"\dat\protocols\QTWeb.lrp");
         output.Append(ini.GetSetting("Vugen", "CorrelationRulesSupport"));
         return output.ToString();
     }
     catch (Exception ex)
     {
         Logger.Error(ex.ToString());
         return Html.Error(ex.Message);
     }
 }
Exemplo n.º 3
0
        public static string GetROHttpProperties()
        {
            StringBuilder output = new StringBuilder();
              output.Append(Html.br + Html.B("HTTP Properties > Advanced") + Html.br);

              try
              {
            string keyPath = @"Software\Mercury Interactive\Networking\Multi Settings\QTWeb\Recording";

            output.Append(CreateCheckBoxFromValue("Reset context for each action", keyPath, "ResetContextBetweenActions") + Html.br);
            output.Append(CreateCheckBoxFromValue("Save snapshots locally", keyPath, "SaveSnapshotResources") + Html.br);
            output.Append(CreateCheckBoxFromValue("Generate web_reg_find functions for page titles", keyPath, "RecordWebRegFind") + Html.br);
            output.Append(Html.IndentWithSpaces() + CreateCheckBoxFromValue("Generate web_reg_find functions for sub-frames", keyPath, "RecordWebRegFindNonPrimary") + Html.br);
            output.Append(CreateCheckBoxFromValue("Add comment to script for HTTP errors while recording", keyPath, "AddCommentsIfResponceBiggerThen400") + Html.br);
            output.Append((Html.IndentWithSpaces() + "Support charset") + Html.br);
            output.Append(Html.IndentWithSpaces() + CreateCheckBoxFromValue("Support charset UTF-8", keyPath, "Utf8Support") + Html.br);
            output.Append(Html.IndentWithSpaces() + CreateCheckBoxFromValue("Support charset EUC-JP", keyPath, "EUC Encode") + Html.br);
            //on LR < 11.5 this doesn't exist
            string ParameterizeServerNames = RegistryWrapper.GetRegKey32(RegHive.CurrentUser, @"Software\Mercury Interactive\Networking\Multi Settings\GlobalParameterizeServer\Recording", "ParameterizeServerNames");
            if (ParameterizeServerNames != null)
              output.Append(CreateCheckBoxFromValue("Parameterize server names", @"Software\Mercury Interactive\Networking\Multi Settings\GlobalParameterizeServer\Recording", "ParameterizeServerNames") + Html.br);

            String file = Path.Combine(ProductDetection.Vugen.ConfigFolder, "vugen.ini");
            String settingEngine = Html.ErrorMsg();

            if (File.Exists(file))
            {
              IniParser vugenIni = new IniParser(file);
              //Pre 12 versions:
              if (ProductDetection.Vugen.version < new Version(12, 00))
              {
                string oldRecEngine = vugenIni.GetSetting("WebRecorder", "EnableOldSingleRecorded");
                settingEngine = Html.CheckBox(oldRecEngine == "1") + "Record using earlier recording engine";

                output.Append(Html.br + (Html.IndentWithSpaces() + "Recording engine: " + Html.br + Html.IndentWithSpaces() + settingEngine + Html.br));
              }
              else
              {
                string UseProxyRecorder = vugenIni.GetSetting("WebRecorder", "UseProxyRecorder");
                string ProxyInStreamMode = vugenIni.GetSetting("WebRecorder", "ProxyInStreamMode");

                output.Append(Html.br + Html.IndentWithSpaces(4) + "Proxy Recording settings:" + Html.br);

                output.Append(Html.CheckBox(UseProxyRecorder == "1", false, 8) + "Use the LoadRunner Proxy to record a local application" + Html.br);
                output.Append(Html.CheckBox(ProxyInStreamMode == "1", false, 8) + "Use streaming mode when recording with the LoadRunner Proxy" + Html.br);

              }
            }
            output.Append(Html.br + Html.IndentWithSpaces(4) + "Recording schemes: " + Html.br);
            string CustomHeadersKey = RegistryWrapper.GetValue(RegHive.CurrentUser, keyPath, "CustomHeaderFlag", "2");
            string headersMessage = "Record headers <b>not</b> in the list";

            if (CustomHeadersKey == "1")
              headersMessage = "Record headers in the list";
            else if (CustomHeadersKey == "0")
              headersMessage = "Do not record headers";
            output.Append(Html.IndentWithSpaces(8) + "Headers: " + headersMessage + Html.br);

            if (CustomHeadersKey != "0")
            {
              string headersKey = CustomHeadersKey == "2" ? "CustomHeadersExclude" : "CustomHeaders";
              string headers = RegistryWrapper.GetValue(RegHive.CurrentUser, keyPath, headersKey, "");
              var parts = Regex.Split(headers, @"(?<=[01])").ToList();
              parts.RemoveAll(item => item.EndsWith("0") || item.Equals(""));
              output.Append(Html.IndentWithSpaces(12) + String.Join(Html.IndentWithSpaces(8), parts.ToArray()).Replace("\n1", Html.br).Replace("\n", Html.IndentWithSpaces(2)));
            }

            string ContentTypeFilterKey = RegistryWrapper.GetValue(RegHive.CurrentUser, keyPath, "ContentTypeFilterFlag", "0");
            var contentMessage = new Hashtable() { { "0", "Do not filter content types" }, { "1", "Exclude content types in list:" }, { "2", "Exclude content types <b>not</b> in list:" } };
            output.Append(Html.br + Html.IndentWithSpaces(8) + "Content types: " + contentMessage[ContentTypeFilterKey] + Html.br);

            if (ContentTypeFilterKey != "0")
            {
              string filtersKey = ContentTypeFilterKey == "2" ? "ContentTypeFilterExclude" : "ContentTypeFilter";
              string content = RegistryWrapper.GetValue(RegHive.CurrentUser, keyPath, filtersKey, "");

             var parts = Regex.Split(content, @"(?<=[01])").ToList();
             parts.RemoveAll(item => item.EndsWith("0") || item.Equals(""));
             output.Append(Html.IndentWithSpaces(12) + String.Join(Html.IndentWithSpaces(8), parts.ToArray()).Replace("\n1", Html.br).Replace("\n", Html.IndentWithSpaces(2)));
            }
              }
              catch (Exception ex)
              {
            Logger.Error(ex.ToString());
            return output + ex.Message;
              }
              return output.ToString();
        }
 static Java()
 {
     try
     {
       ini = new IniParser(Path.Combine(ProductDetection.Vugen.ConfigFolder, "vugen.ini"));
     }
     catch (Exception ex)
     {
       Logger.Error(ex.ToString());
     }
 }
Exemplo n.º 5
0
 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!");
       }
 }