Writing Unit Tests: Difference between revisions
Jump to navigation
Jump to search
AutoSpider (talk | contribs) (Decode HTML entity names) |
(Update wildly out-of-date discussion of testlib, containing broken links.) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Developing Qt::QA]] | |||
[[Category:HowTo]] | |||
Whenever you fix a bug, please add a regression test for it: this is a test (ideally automatic) that fails before the fix, exhibiting the bug, and passes after the fix. | |||
Whenever you implement a new feature, please add tests that verify that the new feature works as intended. | |||
Once you've written and committed your tests (along with your fix or new feature), you can check out the branch on which your work is based then check out into this the test-files for your new tests; this lets you verify that the tests do fail on the prior branch. | |||
See the [https://doc.qt.io/qt-6/qttest-index.html Qt Test documentation] and [https://doc.qt.io/qt-6/qttest-best-practices-qdoc.html Qt Test Best Practices] for details of how to write tests; and [[Writing good tests]] for further hints on this wiki. | |||
Latest revision as of 10:01, 25 August 2021
Whenever you fix a bug, please add a regression test for it: this is a test (ideally automatic) that fails before the fix, exhibiting the bug, and passes after the fix.
Whenever you implement a new feature, please add tests that verify that the new feature works as intended.
Once you've written and committed your tests (along with your fix or new feature), you can check out the branch on which your work is based then check out into this the test-files for your new tests; this lets you verify that the tests do fail on the prior branch.
See the Qt Test documentation and Qt Test Best Practices for details of how to write tests; and Writing good tests for further hints on this wiki.