[PR #202] [MERGED] Fail Tests on QML Warnings #238

Closed
opened 2026-05-05 11:21:27 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qmlnet/qmlnet/pull/202
Author: @shartte
Created: 5/23/2020
Status: Merged
Merged: 5/26/2020
Merged by: @pauldotknopf

Base: developHead: fail-tests-on-qml-warnings


📝 Commits (2)

  • e5a6952 Fail Tests on QML Warnings
  • 44bea3c Adding note to circle back to this test at a later point.

📊 Changes

4 files changed (+33 additions, -8 deletions)

View changed files

📝 src/native/QmlNet/QmlNet/qml/NetTestHelper.cpp (+12 -1)
📝 src/net/Qml.Net.Tests/Qml/BaseQmlTests.cs (+3 -2)
📝 src/net/Qml.Net.Tests/Qml/SignalTests.cs (+4 -2)
📝 src/net/Qml.Net/Internal/Qml/NetTestHelper.cs (+14 -3)

📄 Description

Runtime errors when running the QML parts of unit tests are currently ignored and not captured in test output. Warnings are now captured and if not explicitly disabled, any QML warning will fail the test and include the warning messages in the failure.

I came across this while writing tests for #201, since runtime failures were silently ignored, leading to a test assertion failure that was awfully hard to debug. With this change, such runtime errors (i.e. trying to access undefined properties) will now lead to an immediate test failure, and will include the proper messages.

What we would probably also want is to capture all QML warnings in the XUnit test output, but that would require us to pass through the ITestOutputHelper through all test constructors to the base class, which is a pain...


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/qmlnet/qmlnet/pull/202 **Author:** [@shartte](https://github.com/shartte) **Created:** 5/23/2020 **Status:** ✅ Merged **Merged:** 5/26/2020 **Merged by:** [@pauldotknopf](https://github.com/pauldotknopf) **Base:** `develop` ← **Head:** `fail-tests-on-qml-warnings` --- ### 📝 Commits (2) - [`e5a6952`](https://github.com/qmlnet/qmlnet/commit/e5a6952b7eeff383e30c8ad18d068128bdc3af63) Fail Tests on QML Warnings - [`44bea3c`](https://github.com/qmlnet/qmlnet/commit/44bea3c356a1bbd427624dfd5ac522641ce1e27b) Adding note to circle back to this test at a later point. ### 📊 Changes **4 files changed** (+33 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/native/QmlNet/QmlNet/qml/NetTestHelper.cpp` (+12 -1) 📝 `src/net/Qml.Net.Tests/Qml/BaseQmlTests.cs` (+3 -2) 📝 `src/net/Qml.Net.Tests/Qml/SignalTests.cs` (+4 -2) 📝 `src/net/Qml.Net/Internal/Qml/NetTestHelper.cs` (+14 -3) </details> ### 📄 Description Runtime errors when running the QML parts of unit tests are currently ignored and not captured in test output. Warnings are now captured and if not explicitly disabled, any QML warning will fail the test and include the warning messages in the failure. I came across this while writing tests for #201, since runtime failures were silently ignored, leading to a test assertion failure that was awfully hard to debug. With this change, such runtime errors (i.e. trying to access undefined properties) will now lead to an immediate test failure, and will include the proper messages. What we would probably also want is to capture all QML warnings in the XUnit test output, but that would require us to pass through the ITestOutputHelper through _all_ test constructors to the base class, which is a pain... --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 11:21:27 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#238
No description provided.