Exemplo n.º 1
0
        //public IEnumerable<KeyValuePair<string, string>> GetTestExecutionEnvironmentVariables() => Environment;

        void TestHostLaunched_Handler(object sender, TestHostLaunchedEventArgs e)
        {
            log.Value.Log(new
            {
                Name      = "TestHostLaunched",
                RequestId = BuildArn ?? $"{e.Context?.SessionId?.Id}",
            });
            log2.LogWarning(e.Context, "TestHostLaunched");
        }
 private void Events_SessionEnd(object sender, SessionEndEventArgs e)
 {
     try
     {
         foreach (var file in Directory.GetFiles(_traceDirectory))
         {
             _logger.LogWarning(e.Context, $"Saving event pipe session: {file}");
             _dataSink.SendFileAsync(e.Context, file, deleteFile: true);
         }
     }
     catch (Exception ex)
     {
         _logger.LogError(e.Context, "Error during SessionEnd", ex);
     }
 }
 public override void Initialize(XmlElement configurationElement, DataCollectionEvents events, DataCollectionSink dataSink, DataCollectionLogger logger, DataCollectionEnvironmentContext environmentContext)
 {
     _ = StartTracing(message => logger.LogWarning(environmentContext.SessionDataCollectionContext, message));
 }
 public override void Initialize(XmlElement configurationElement, DataCollectionEvents events, DataCollectionSink dataSink, DataCollectionLogger logger, DataCollectionEnvironmentContext environmentContext)
 {
     events.TestCaseStart += (sender, e) => logger.LogWarning(environmentContext.SessionDataCollectionContext, e.TestCaseName + " [Start]");
     events.TestCaseEnd   += (sender, e) => logger.LogWarning(environmentContext.SessionDataCollectionContext, e.TestCaseName + " [Ended]");
 }
Exemplo n.º 5
0
 /// <summary>
 /// Log warning
 /// </summary>
 /// <param name="warning">Warning message</param>
 public void LogWarning(string warning)
 {
     _logger.LogWarning(_dataCollectionContext, $"[coverlet]{warning}");
 }
Exemplo n.º 6
0
 private void LogMessage(string message)
 {
     _logger.LogWarning(_context.SessionDataCollectionContext, message);
 }
Exemplo n.º 7
0
 public void Warning(string?text)
 {
     _logger.LogWarning(_collectionContext, text ?? string.Empty);
 }
Exemplo n.º 8
0
 private void EventsOnSessionStart(object sender, SessionStartEventArgs e)
 {
     _logger.LogWarning(context.SessionDataCollectionContext, "Coverage Test Session Started");
 }
Exemplo n.º 9
0
 /// <summary>
 /// Log warning
 /// </summary>
 /// <param name="warning">Warning message</param>
 public void LogWarning(string warning)
 {
     _logger.LogWarning(_dataCollectionContext, warning);
 }