diff --git a/Lombiq.Tests.UI/Extensions/WebApplicationInstanceExtensions.cs b/Lombiq.Tests.UI/Extensions/WebApplicationInstanceExtensions.cs
index 2e699330f..2dda322b2 100644
--- a/Lombiq.Tests.UI/Extensions/WebApplicationInstanceExtensions.cs
+++ b/Lombiq.Tests.UI/Extensions/WebApplicationInstanceExtensions.cs
@@ -1,5 +1,6 @@
using Lombiq.Tests.UI.Services;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
using Shouldly;
using System;
using System.Collections.Generic;
@@ -54,6 +55,28 @@ public static Task LogsShouldContainAsync(
CancellationToken cancellationToken = default) =>
AssertLogsAsync(webApplicationInstance, logEntryPredicate, ShouldBeEnumerableTestExtensions.ShouldContain, cancellationToken);
+ ///
+ /// Asserts that the logs should NOT contain any entries with and above. If the
+ /// assertion fails, the Shouldly exception will contain all log entries.
+ ///
+ ///
+ ///
+ /// If you want to inspect the logs in a more structured way, message by message, consider using directly instead. Alternatively, set log
+ /// filtering options to not log unwanted messages in first place with the standard Logging:LogLevel app
+ /// configuration (see the samples).
+ ///
+ ///
+ /// A that can cancel the log retrieval.
+ public static Task LogsShouldNotContainErrorsAsync(
+ this IWebApplicationInstance webApplicationInstance,
+ CancellationToken cancellationToken = default) =>
+ AssertLogsAsync(
+ webApplicationInstance,
+ logEntry => logEntry.Level > LogLevel.Error,
+ ShouldBeEnumerableTestExtensions.ShouldNotContain,
+ cancellationToken);
+
///
/// Asserts that the logs should NOT contain any entries matching the given predicate. If the assertion fails, the
/// Shouldly exception will contain all log entries.