Skip to main content

Benchmarks

These benchmarks compare the happy-path overhead of aweXpect.Xml (passing assertions, the dominant case in a healthy test suite) against the equivalent FluentAssertions calls.

Methodology
  • Suite: HappyCaseBenchmarks driven by BenchmarkDotNet.
  • Job: MediumRun with the in-process toolchain.
  • Runner: ubuntu-latest GitHub Actions agent, refreshed on every push to main.
  • FluentAssertions has expectations on XElement and XDocument, but not on XML strings. Where it lacks an expectation, its benchmark does what a FluentAssertions user writes instead, e.g. parse the string into an XDocument.
  • Each tab shows the latest measured time and allocated memory; bars are scaled within the row so length corresponds to magnitude. Lower is better.
FluentAssertions v8.11.0
1.3×as long
2.0×as much memory
relative to aweXpect · median of 4 benchmarks

Verifies that an XML string is equivalent to the expected one, regardless of its formatting and the order of its attributes. FluentAssertions parses both strings into an XDocument.

Time
aweXpect4.84 µs
FluentAssertions5.63 µs+17%
Memory
aweXpect23.61 KiB
FluentAssertions25.15 KiB+7%
Captured on commit 77e01f4b (2026-10-31) on ubuntu-latest.
aweXpect
await That(_xmlSubject).IsEqualTo(_xmlExpectation).AsXml();
FluentAssertions
XDocument.Parse(_xmlSubject).Should().BeEquivalentTo(XDocument.Parse(_xmlExpectation));

View source on GitHub →