diff --git a/developer/new-developers/qt-qml-testing-tools.md b/developer/new-developers/qt-qml-testing-tools.md index 468b4a1e1e3799bdc57bcc221e5226c53e8e72a2..82377e3cc320466e66e02ca515de24bb4017f1b0 100644 --- a/developer/new-developers/qt-qml-testing-tools.md +++ b/developer/new-developers/qt-qml-testing-tools.md @@ -1,6 +1,5 @@ # Qt and QML testing tools - ## QML qml_tests launch all the tests related to the interface. @@ -9,7 +8,6 @@ Ideally, mock data should be used to avoid depending on network events. This may be difficult sometimes, and some tools may be missed because tests in this part are a work in progress. Here are some tools and principles to enable tests to be written quickly. - ### Mock data Say a UI test for the AccountComboBox depending on a list of accounts is required. @@ -85,20 +83,16 @@ TestWrapper { } ``` - ## C++ - ### GoogleTest [GoogleTest](https://google.github.io/googletest/) is Google’s C++ testing and mocking framework. - #### Installation - Ubuntu / Debian: `apt install googletest libgtest-dev` - ### Example main.cpp ``` #include <gtest/gtest.h> @@ -118,13 +112,10 @@ int main(int argc, char *argv[]) } ``` - ## QML - ### QtQuickTest - #### Installation - Ubuntu / Debian: `apt install qml-module-qqtest libqt5quicktest5` @@ -150,4 +141,4 @@ public slots: QUICK_TEST_MAIN_WITH_SETUP(testqml, Setup) #include "main.moc" -``` +``` \ No newline at end of file