Esempio n. 1
0
        public IEnumerable <string> GetScriptsForEnvironment(TargetEnvironment environment)
        {
            var env = environment.ToString().ToLowerInvariant();

            var modules = AppDef.Element("application")
                          .Element("modules");

            if (modules == null)
            {
                return(Enumerable.Empty <string>());
            }

            var module = modules.Elements("module").Where(
                m => m.Attribute("environment").Value.ToLowerInvariant() == env);

            if (module == null)
            {
                return(Enumerable.Empty <string>());
            }

            var excluded = new List <string> {
                "_package_start.js", "_package_end.js"
            };

            var files = module.Elements("file")
                        .Where(f => !excluded.Contains(f.Value.ToLowerInvariant()))
                        .Select(f => f.Value);

            return(files);
        }
Esempio n. 2
0
        public ExtentReporter(string reportName, TargetEnvironment environment, string reportFileName = "")
        {
            Extent    = new ExtentReports();
            Features  = new Dictionary <string, ExtentTest>();
            Scenarios = new Dictionary <string, ExtentTest>();

            ReportFolder = Path.Combine(Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.FullName, "TestResults");

            if (!Directory.Exists(ReportFolder))
            {
                Directory.CreateDirectory(ReportFolder);
            }

            Reporter = new ExtentHtmlReporter($@"{ReportFolder}\");
            Reporter.Config.DocumentTitle = "Automated Test Report";
            Reporter.Config.ReportName    = $"{reportName}";
            Reporter.Config.Theme         = AventStack.ExtentReports.Reporter.Configuration.Theme.Standard;
            Extent.AttachReporter(Reporter);
            Extent.AddSystemInfo("Report Name", reportName);
            Extent.AddSystemInfo("Environment", environment.ToString());
            Extent.AddSystemInfo("Machine", Environment.MachineName);
            Extent.AddSystemInfo("OS", Environment.OSVersion.VersionString);

            ReportFileName = reportFileName;
        }
Esempio n. 3
0
        public IEnumerable<string> GetScriptsForEnvironment( TargetEnvironment environment )
        {
            var env = environment.ToString().ToLowerInvariant();

            var modules = AppDef.Element( "application" )
                    .Element( "modules" );

            if( modules == null ) return Enumerable.Empty<string>();

            var module = modules.Elements( "module" ).Where(
                m => m.Attribute( "environment" ).Value.ToLowerInvariant() == env );

            if( module == null ) return Enumerable.Empty<string>();

            var excluded = new List<string> { "_package_start.js", "_package_end.js" };

            var files = module.Elements( "file" )
                .Where( f => !excluded.Contains( f.Value.ToLowerInvariant() ) )
                .Select( f => f.Value );
            return files;
        }
Esempio n. 4
0
        public void ToVcxprojProperties(XmlWriter writer)
        {
            WriteStringArray(writer, "AdditionalIncludeDirectories", AdditionalIncludeDirectories);

            if (AdditionalOptions != null && AdditionalOptions.Length > 0)
            {
                writer.WriteElementString("AdditionalOptions", String.Join(" ", AdditionalOptions));
            }

            writer.WriteElementString("ApplicationConfigurationMode", XmlConvert.ToString(ApplicationConfigurationMode));

            if (!String.IsNullOrWhiteSpace(ClientStubFile))
            {
                writer.WriteElementString("ClientStubFile", ClientStubFile);
            }

            if (CPreprocessOptions != null && CPreprocessOptions.Length > 0)
            {
                writer.WriteElementString("CPreprocessOptions", String.Join(" ", CPreprocessOptions));
            }

            writer.WriteElementString("DefaultCharType", DefaultCharType.ToString());

            if (!String.IsNullOrWhiteSpace(DllDataFileName))
            {
                writer.WriteElementString("DllDataFileName", DllDataFileName);
            }

            writer.WriteElementString("EnableErrorChecks", ErrorChecksToString(EnableErrorChecks));
            writer.WriteElementString("ErrorCheckAllocations", XmlConvert.ToString(ErrorCheckAllocations));
            writer.WriteElementString("ErrorCheckBounds", XmlConvert.ToString(ErrorCheckBounds));
            writer.WriteElementString("ErrorCheckEnumRange", XmlConvert.ToString(ErrorCheckEnumRange));
            writer.WriteElementString("ErrorCheckRefPointers", XmlConvert.ToString(ErrorCheckRefPointers));
            writer.WriteElementString("ErrorCheckStubData", XmlConvert.ToString(ErrorCheckStubData));
            writer.WriteElementString("GenerateClientFiles", StubToString(GenerateClientStub));
            writer.WriteElementString("GenerateServerFiles", StubToString(GenerateServerStub));
            writer.WriteElementString("GenerateStublessProxies", XmlConvert.ToString(GenerateStublessProxies));
            writer.WriteElementString("GenerateTypeLibrary", XmlConvert.ToString(GenerateTypeLibrary));

            if (!String.IsNullOrWhiteSpace(HeaderFileName))
            {
                writer.WriteElementString("HeaderFileName", HeaderFileName);
            }

            writer.WriteElementString("IgnoreStandardIncludePath", XmlConvert.ToString(IgnoreStandardIncludePath));

            if (!String.IsNullOrWhiteSpace(InterfaceIdentifierFileName))
            {
                writer.WriteElementString("InterfaceIdentifierFileName", InterfaceIdentifierFileName);
            }

            if (LocaleID.HasValue)
            {
                writer.WriteElementString("LocaleID", XmlConvert.ToString(LocaleID.Value));
            }
            writer.WriteElementString("MkTypLibCompatible", XmlConvert.ToString(MkTypLibCompatible));

            WriteStringArray(writer, "PreprocessorDefinitions", PreprocessorDefinitions);

            if (!String.IsNullOrWhiteSpace(ProxyFileName))
            {
                writer.WriteElementString("ProxyFileName", ProxyFileName);
            }

            if (!String.IsNullOrWhiteSpace(ServerStubFile))
            {
                writer.WriteElementString("ServerStubFile", ServerStubFile);
            }

            if (StructMemberAlignment.HasValue)
            {
                writer.WriteElementString("StructMemberAlignment", XmlConvert.ToString(StructMemberAlignment.Value));
            }

            writer.WriteElementString("SuppressCompilerWarnings", XmlConvert.ToString(SuppressCompilerWarnings));
            writer.WriteElementString("TargetEnvironment", TargetEnvironment.ToString());
            writer.WriteElementString("TypeLibFormat", TypeLibFormatToString(NewTypeLibFormat));

            if (!String.IsNullOrWhiteSpace(TypeLibraryName))
            {
                writer.WriteElementString("TypeLibraryName", TypeLibraryName);
            }

            WriteStringArray(writer, "UndefinePreprocessorDefinitions", UndefinePreprocessorDefinitions);
            writer.WriteElementString("ValidateAllParameters", XmlConvert.ToString(ValidateAllParameters));
            writer.WriteElementString("WarnAsError", XmlConvert.ToString(WarningsAsError));
            writer.WriteElementString("WarningLevel", XmlConvert.ToString((int)WarningLevel));

            writer.WriteElementString("OutputDirectory", "$(IntDir)");
        }