| 1 |
============== |
| 2 |
Manual Testing |
| 3 |
============== |
| 4 |
|
| 5 |
Outline |
| 6 |
------- |
| 7 |
Sometimes it is not possible to easily make an automated test for some |
| 8 |
use-cases. However just because something isn't easily tested automatically |
| 9 |
doesn't mean that there isn't value in creating a test for it, just that the |
| 10 |
test needs to be executed by a person until it is converted into an automated |
| 11 |
test. |
| 12 |
|
| 13 |
However please be very discriminatory about your manual tests. |
| 14 |
It's highly likely that you can automate whatever it is you're testing, |
| 15 |
and doing so will be of much more value to the quality of UI Toolkit. |
| 16 |
Manual tests are a last resort. They should not be written lightly, |
| 17 |
and should give you a feeling of shame. |
| 18 |
|
| 19 |
If you're to the point where you believe you need a manual test, |
| 20 |
then please come talk to the QA team and we will see if we can find an automatable solution. |
| 21 |
|
| 22 |
|
| 23 |
Format |
| 24 |
------ |
| 25 |
Manual tests take the format of text files in this directory (the manual-test |
| 26 |
one). These files are formatted using `reStructured Text`_. A very |
| 27 |
comprehensive `quick reference`_ is available. |
| 28 |
|
| 29 |
.. _reStructured Text: http://en.wikipedia.org/wiki/ReStructuredText |
| 30 |
.. _quick reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html |
| 31 |
|
| 32 |
Tests have a header, actions (steps to follow), and an expected result. |
| 33 |
You can use the TEST_TEMPLATE.txt file as template for new tests. |
| 34 |
|
| 35 |
There can be multiple tests in a single file, but they should all be related, |
| 36 |
and the filename should indicate the tests it contains. |
| 37 |
|
| 38 |
Example: |
| 39 |
|
| 40 |
Test Button |
| 41 |
--------- |
| 42 |
This test shows that the button emits a signal when pressed |
| 43 |
|
| 44 |
Setup: |
| 45 |
#. start examples/lomiri-ui-toolkit-gallery/lomiri-ui-toolkit-gallery.qml in qmlscene |
| 46 |
|
| 47 |
Actions: |
| 48 |
#. Select Buttons |
| 49 |
#. Press and hold LMB on top of the QML Button next to the Label which says "Standard" |
| 50 |
#. Release LMB |
| 51 |
|
| 52 |
Expected Result: |
| 53 |
#. Buttons page is visible |
| 54 |
#. QML Button is in pressedColor while LMB is pressed. |
| 55 |
#. QML Button emits signal clicked() when LMB is released. |
| 56 |
|
| 57 |
|
| 58 |
Directory Structure |
| 59 |
------------------- |
| 60 |
It is expected that as we grow a number of manual tests, we will use |
| 61 |
directories to organise them. |
| 62 |
|
| 63 |
|
| 64 |
========= |
| 65 |
Glossary |
| 66 |
========= |
| 67 |
LMB = Left Mouse Button |
| 68 |
|
| 69 |
|
| 70 |
========= |
| 71 |
HOW TO |
| 72 |
========= |
| 73 |
|
| 74 |
|
| 75 |
How To See Which Testcase Tests Which Part Of The QML Component? = |
| 76 |
---------- |
| 77 |
open .map file in text editor |
| 78 |
|
| 79 |
|
| 80 |
How To Get The Testcase Executor Binary |
| 81 |
---------- |
| 82 |
/compile_testcaseexecutor.sh |
| 83 |
|
| 84 |
|
| 85 |
How To Execute Tests |
| 86 |
---------- |
| 87 |
./run_testcases.sh |