The most verbose log provider, this calls .ToString() on each and every LogMessage that it processes. The output will appear in an attached debugger's "Output" window.
Inheritance: Microsoft.Silverlight.Testing.Harness.LogProvider
        private UnitTestSettings ConfigureSettings()
        {
            #if MSTest2009July || MSTest2009October || MSTest2009November
            var settings = UnitTestSystem.CreateDefaultSettings();
            #else
            var settings = new UnitTestSettings();
            settings.TestHarness = new UnitTestHarness();

            DebugOutputProvider item = new DebugOutputProvider();
            item.ShowAllFailures = true;
            settings.LogProviders.Add(item);
            try
            {
                VisualStudioLogProvider visualStudioLogProvider = new VisualStudioLogProvider();
                settings.LogProviders.Add(visualStudioLogProvider);
            }
            catch
            {
            }

            // Don't enable a U.I. when not specifying the U.I. Mode.
            if (!_clientTestRunConfiguration.WindowGeometry.ShouldShowWindow)
            {
                var statLightTestPage = new StatLightTestPage();
                settings.TestHarness.TestPage = statLightTestPage;

                settings.TestPanelType = typeof(StatLightTestPage);
            }

            settings.StartRunImmediately = true;
            settings.ShowTagExpressionEditor = false;
            settings.TestService = null;

            #endif
            // Below is the custom stuff...
            settings.TagExpression = _clientTestRunConfiguration.TagFilter;
            settings.LogProviders.Add(new ServerHandlingLogProvider());
            foreach (var assembly in _loadedXapData.TestAssemblies)
            {
                settings.TestAssemblies.Add(assembly);
            }
            settings.TestHarness.TestHarnessCompleted += CurrentHarness_TestHarnessCompleted;
            return settings;
        }
Exemple #2
0
        /// <summary>
        /// Prepares the default log manager.
        /// </summary>
        /// <param name="settings">The test harness settings.</param>
        public static void SetStandardLogProviders(UnitTestSettings settings)
        {
            // Debug provider
            DebugOutputProvider debugger = new DebugOutputProvider();
            debugger.ShowAllFailures = true;
            settings.LogProviders.Add(debugger);

            // Visual Studio log provider
            try
            {
                TryAddVisualStudioLogProvider(settings);
            }
            catch
            {
            }

            PrepareCustomLogProviders(settings);
        }