developer/new-developers/qt-qml-testing-tools: cleanup
Follow-up patch: https://review.jami.net/c/jami-docs/+/30003 Change-Id: I8639e6e772dfe27e68631a494cdfc6b5fa4d3ea7
This commit is contained in:
parent
55f15c921d
commit
bc7dce66a6
|
@ -1,6 +1,5 @@
|
||||||
# Qt and QML testing tools
|
# Qt and QML testing tools
|
||||||
|
|
||||||
|
|
||||||
## QML
|
## QML
|
||||||
|
|
||||||
qml_tests launch all the tests related to the interface.
|
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.
|
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.
|
Here are some tools and principles to enable tests to be written quickly.
|
||||||
|
|
||||||
|
|
||||||
### Mock data
|
### Mock data
|
||||||
|
|
||||||
Say a UI test for the AccountComboBox depending on a list of accounts is required.
|
Say a UI test for the AccountComboBox depending on a list of accounts is required.
|
||||||
|
@ -85,20 +83,16 @@ TestWrapper {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## C++
|
## C++
|
||||||
|
|
||||||
|
|
||||||
### GoogleTest
|
### GoogleTest
|
||||||
|
|
||||||
[GoogleTest](https://google.github.io/googletest/) is Google’s C++ testing and mocking framework.
|
[GoogleTest](https://google.github.io/googletest/) is Google’s C++ testing and mocking framework.
|
||||||
|
|
||||||
|
|
||||||
#### Installation
|
#### Installation
|
||||||
- Ubuntu / Debian:
|
- Ubuntu / Debian:
|
||||||
`apt install googletest libgtest-dev`
|
`apt install googletest libgtest-dev`
|
||||||
|
|
||||||
|
|
||||||
### Example main.cpp
|
### Example main.cpp
|
||||||
```
|
```
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
@ -118,13 +112,10 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## QML
|
## QML
|
||||||
|
|
||||||
|
|
||||||
### QtQuickTest
|
### QtQuickTest
|
||||||
|
|
||||||
|
|
||||||
#### Installation
|
#### Installation
|
||||||
- Ubuntu / Debian: `apt install qml-module-qqtest libqt5quicktest5`
|
- Ubuntu / Debian: `apt install qml-module-qqtest libqt5quicktest5`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue