Qt Creator ManualTests QtQuick: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Decode HTML entity names)
(Fix formatting of tables)
Line 1: Line 1:
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}
[[Category:Tools::QtCreator::QualityAssurance]]


[[Category:Tools::QtCreator::QualityAssurance]]
{| class="wikitable"
|+ QML Editor
! Test
! Result
! Annotation
|+
| Open Qml files, make them invalid & again valid, check that errors are underlined
|
|
|+
| Indent a big Qml file via "Ctrl-I"
| automated
|
|+
| Hover over elements, properties, expressions
| automated
|
|+
| Rename an ID via context menu
| automated
|
|+
| Trigger Find Usages on an id and property
| automated
|
|}
 
{| class="wikitable"
|+ Outline (sidebar)
! Test
! Result
! Annotation
|+
| Navigate to elements / properties by clicking on the item in the outline
|
|
|+
| Change qml in text, check that Outline updates
| automated: tst_qml_outline
|
|+
| Drag&Drop elements around in outline, check that text updates
|
|
|+
| Check/Uncheck 'Show all Bindings' in the Filter, outline should update accordingly
|
|
|}


= Qt Creator Manual Tests: Qt Quick =
{| class="wikitable"
|+ Qt Quick Wizards
! Test
! Result
! Annotation
|+
| Create new "Qt Quick Application" through wizard, run application
| automated
|
|+
| Create new "Qt Quick UI" through wizard, run application
| automated
|
|+
| Generate "Qt Quick 1/2 Extension Plugin", compile
| automated
|
|}


{background:#009900}. |''. QML Editor |''. Result |''. Annotation |
{| class="wikitable"
| Open Qml files, make them invalid & again valid, check that errors are underlined | | |
|+ Application Output
| Indent a big Qml file via "Ctrl-I" | automated | |
! Test
| Hover over elements, properties, expressions | automated | |
! Result  
| Rename an ID via context menu | automated | |
! Annotation  
| Trigger Find Usages on an id and property | automated | |
|+
{background:#009900}. |''. Outline (sidebar) |''. Result |''. Annotation |
| Navigate to elements / properties by clicking on the item in the outline | | |
| Change qml in text, check that Outline updates | automated: tst_qml_outline | |
| Drag&Drop elements around in outline, check that text updates | | |
| Check/Uncheck 'Show all Bindings' in the Filter, outline should update accordingly | | |
{background:#009900}. |''. Qt Quick Wizards |''. Result |''. Annotation |
| Create new "Qt Quick Application" through wizard, run application | automated | |
| Create new "Qt Quick UI" through wizard, run application | automated | |
| Generate "Qt Quick 1/2 Extension Plugin", compile | automated | |
{background:#009900}. |''. Application Output |''. Result |''. Annotation |
| QML errors:
| QML errors:
# Create a hybrid QML/C++ project (Qt Quick Application). In Projects mode, leave "Shadow build" checked.
# Create a hybrid QML/C++ project (Qt Quick Application). In Projects mode, leave "Shadow build" checked.
Line 26: Line 81:
# Save and close the file.
# Save and close the file.
# Run this project on the desktop.
# Run this project on the desktop.
Are the error messages in Application Output clickable when running the app? Do they open the "right", file (not in shadow build)? | | |
Are the error messages in Application Output clickable when running the app? Do they open the "right", file (not in shadow build)?
| Deploy & run the project with errors on a device. Is the application output still clickable / opens the right file, line, column? | | |
|
{background:#009900}. |''. Qt Quick Designer |''. Result |''. Annotation |
|
| Open all files in $CREATORDIR/tests/manual/qml/testfiles/testfiles.qmlproject and $CREATORDIR/tests/manual/qml/testfiles_quick2/testfiles_quick2.qmlproject and check whether
|+
| Deploy & run the project with errors on a device. Is the application output still clickable / opens the right file, line, column?
|
|
|}
 
{| class="wikitable"
|+ Qt Quick Designer
! Test
! Result  
! Annotation  
|+
| Open all files in $CREATORDIR/tests/manual/qml/testfiles/testfiles.qmlproject and $CREATORDIR/tests/manual/qml/testfiles_quick2/testfiles_quick2.qmlproject and check whether:
* previews look sane
* previews look sane
* the Properties editor works for different item types
* the Properties editor works for different item types
* changes in the Designer cause correct changes to the QML source | | |
* changes in the Designer cause correct changes to the QML source
| Create & Rename & Delete states | | |
|
| Open project $CREATORDIR/tests/manual/qml/testprojects/plugins/plugins.qmlproject and see whether the Designer treats MyComponent and MyComponent2 correctly | | |
|
| Test whether F1 works | | |
|+
{background:#009900}. |''. JavaScript Debugging |''. Result |''. Annotation |
| Create & Rename & Delete states
|
|
|+
| Open project $CREATORDIR/tests/manual/qml/testprojects/plugins/plugins.qmlproject and see whether the Designer treats MyComponent and MyComponent2 correctly
|
|
|+
| Test whether F1 works
|
|
|}
 
{| class="wikitable"
|+ JavaScript Debugging
! Test
! Result  
! Annotation  
|+
| Preparation:
| Preparation:
# Open demos/declarative/samegame/samegame.qmlproject from Qt4's or qtdeclarative/examples/quick/demos/samegame/samegame.qmlproject from Qt5's repository.
# Open demos/declarative/samegame/samegame.qmlproject from Qt4's or qtdeclarative/examples/quick/demos/samegame/samegame.qmlproject from Qt5's repository.
# Place a breakpoint at the first line of the startNewGame() function (samegame.js) which contains executable code (i.e. not (only) a comment).
# Place a breakpoint at the first line of the startNewGame() function (samegame.js) which contains executable code (i.e. not (only) a comment).
# Start debugging app | | |
# Start debugging app
| Check that first breakpoint is hit when clicking on "New game" , and that the breakpoint looses it's 'hour glass' when hit | | |
|
| Step through startNewGame() function. Check Locals and Watchers update (should display 'this', 'column', 'i', 'row'). Also try adding watchers, and change content in locals & watchers. (Needs Qt >= 5.4) | | |
|
| Add breakpoint while debugging QML. Does the breakpoint interrupt the program? | | |
|+
| Add breakpoint before starting QML Debugger. Does the breakpoint interrupt the program? | | |
| Check that first breakpoint is hit when clicking on "New game" , and that the breakpoint looses it's 'hour glass' when hit
| While interrupted in a javascript method (with more than one line), step over. Does it go to the next line? | | |
|
| While interrupted in a javascript method that calls another javascript method, step into. Does it enter that method's definition? | | |
|
| While interrupted in a javascript method, step out. Does execution resume again (or does debugger go back in context)? | | |
|+
{background:#009900}. |''. Mixed Qml/JavaScript Debugging |''. Result |''. Annotation |
| Step through startNewGame() function. Check Locals and Watchers update (should display 'this', 'column', 'i', 'row'). Also try adding watchers, and change content in locals & watchers. (Needs Qt >= 5.4)
|
|
|+
| Add breakpoint while debugging QML. Does the breakpoint interrupt the program?
|
|
|+
| Add breakpoint before starting QML Debugger. Does the breakpoint interrupt the program?
|
|
|+
| While interrupted in a javascript method (with more than one line), step over. Does it go to the next line?
|
|
|+
| While interrupted in a javascript method that calls another javascript method, step into. Does it enter that method's definition?
|
|
|+
| While interrupted in a javascript method, step out. Does execution resume again (or does debugger go back in context)?
|
|
|}
 
{| class="wikitable"
|+ Mixed Qml/JavaScript Debugging
! Test
! Result  
! Annotation  
|+
| Breakpoints:
| Breakpoints:
# Create a hybrid QML/C++ project (Qt Quick Application). Leave shadow build on.
# Create a hybrid QML/C++ project (Qt Quick Application). Leave shadow build on.
Line 58: Line 173:
# Place a breakpoint in the onClicked or onTriggered handler in main.qml.
# Place a breakpoint in the onClicked or onTriggered handler in main.qml.
# Start debugging the project.
# Start debugging the project.
Are breakpoints being hit? Do they open the right (non-shadow-build) file? | | |
Are breakpoints being hit? Do they open the right (non-shadow-build) file?
|
|
|+
| Breakpoints in bigger project:
| Breakpoints in bigger project:
# Load demos/declarative/minehunt/minehunt.pro from Qt4's, qtquick1/examples/declarative/demos/minehunt/minehunt.pro from Qt5's repository or qtdeclarative/examples/quick/demos/samegame/samegame.pro from Qt5's repository.
# Load demos/declarative/minehunt/minehunt.pro from Qt4's, qtquick1/examples/declarative/demos/minehunt/minehunt.pro from Qt5's repository or qtdeclarative/examples/quick/demos/samegame/samegame.pro from Qt5's repository.
# Set a breakpoint in Tile.qml (minehunt) respectively GameArea.qml (samegame), onClicked handler of MouseArea. Is it hit? Is the right file opened in the editor? Click continue
# Set a breakpoint in Tile.qml (minehunt) respectively GameArea.qml (samegame), onClicked handler of MouseArea. Is it hit? Is the right file opened in the editor? Click continue
# While the program is running, use the "Locals and Expressions" view to navigate in the object tree. Are the right files opened in the editor? | | |
# While the program is running, use the "Locals and Expressions" view to navigate in the object tree. Are the right files opened in the editor?
{background:#009900}. |''. Locals and Expressions |''. Result |''. Annotation |
|
|
|}
 
{| class="wikitable"
|+ Locals and Expressions
! Test
! Result  
! Annotation  
|+
| Preparation:
| Preparation:
# Start debugging a Quick UI Application.
# Start debugging a Quick UI Application.
# Activate the "Select" mode with the arrow button in the debugger toolbar.
# Activate the "Select" mode with the arrow button in the debugger toolbar.
# Make sure the "Locals and Expressions" view is visible.
# Make sure the "Locals and Expressions" view is visible.
# Click on an item in the running application. | | |
# Click on an item in the running application.
| Is selection highlighted in the editor? | | |
|
|
|+
| Is selection highlighted in the editor?
|
|
|+
| Is the selection in the "Locals and Expressions" view updated?
| Is the selection in the "Locals and Expressions" view updated?
Note: In a stack of items, lower-level items can be accessed via double-clicking | | |
Note: In a stack of items, lower-level items can be accessed via double-clicking
| Move mouse cursor to another item. Is selection only highlighted in the running application? | | |
|
{background:#009900}. |''. Live Preview |''. Result |''. Annotation |
|
| While being in 'Select' mode (debugger toolbar), click on an item in the running application. Is the right file in the build directory opened, the right line/column selected? | | |
|+
{background:#009900}. |''. QML Profiling |''. Result |''. Annotation |
| Move mouse cursor to another item. Is selection only highlighted in the running application?
| Can you record some profiling data (see below)? | | |
|
| Do all tabs show well-formed data/information for the shown events? | | |
|
| Can you turn on and off the tabs by using the context menu and do all (re-)shown tabs still show well-formed data according to the last profiling? | | |
|}
| With and without an already profiled app disable profiling by hitting the record button and start running again. Does the widget 's content still hold the data of the former profiling (or none if there wasn't any)? | | |
 
| Start the application and test the record button. It should show the collected data when disabled, and collect new data on already running application when enabled. | | |
{| class="wikitable"
|+ Live Preview
! Test
! Result  
! Annotation  
|+
| While being in 'Select' mode (debugger toolbar), click on an item in the running application. Is the right file in the build directory opened, the right line/column selected?
|
|
|}
 
{| class="wikitable"
|+ QML Profiling
! Test
! Result  
! Annotation  
|+
| Can you record some profiling data (see below)?
|
|
|+
| Do all tabs show well-formed data/information for the shown events?
|
|
|+
| Can you turn on and off the tabs by using the context menu and do all (re-)shown tabs still show well-formed data according to the last profiling?
|
|
|+
| With and without an already profiled app disable profiling by hitting the record button and start running again. Does the widget 's content still hold the data of the former profiling (or none if there wasn't any)?
|
|
|+
| Start the application and test the record button. It should show the collected data when disabled, and collect new data on already running application when enabled.
|
|
|+
| According to the time-line:
| According to the time-line:
(Note: The little blue titled subwindows in the timeline are called "tool tip" below, even though they don't behave like normal tooltips.)
(Note: The little blue titled subwindows in the timeline are called "tool tip" below, even though they don't behave like normal tooltips.)
Line 88: Line 257:
* Can you stretch and squeeze it by using the blue bar beneath the time-line and the zoom-slider and can you seek the blue bar by dragging it or clicking the "thumbnail" of the time-line?
* Can you stretch and squeeze it by using the blue bar beneath the time-line and the zoom-slider and can you seek the blue bar by dragging it or clicking the "thumbnail" of the time-line?
* Can you cycle through the events on the time-line by pressing "Jump to previous/next event"?
* Can you cycle through the events on the time-line by pressing "Jump to previous/next event"?
* When selecting time ranges with the "Select range" tool: does the tool tip show the correct time under the cursor? Can you set a mark at a timestamp and can you set a time range and is the displayed time correct? When double clicking on the selected range, does it zoom in to exactly that range? | | |
* When selecting time ranges with the "Select range" tool: does the tool tip show the correct time under the cursor? Can you set a mark at a timestamp and can you set a time range and is the displayed time correct? When double clicking on the selected range, does it zoom in to exactly that range?
|
|
|+
| According to the Callees/Caller/Events tab:
| According to the Callees/Caller/Events tab:
* Does the editor switch to the correct file and line number when clicking on an event (Events) or location (Callees/Caller) that is not marked as "<bytecode>"?
* Does the editor switch to the correct file and line number when clicking on an event (Events) or location (Callees/Caller) that is not marked as "<bytecode>"?
Line 94: Line 266:
* Does column sorting work properly?
* Does column sorting work properly?
* Are the events in the root node of each tab the same? (None missing in one of the views?)
* Are the events in the root node of each tab the same? (None missing in one of the views?)
Note: The "Events" tab intentionally doesn't show anonymous events. | | |
Note: The "Events" tab intentionally doesn't show anonymous events.
{background:#009900}. |''. Debugging/Profiling on Device |''. Result |_. Annotation |
|
| You need 4.8 or newer on device | | |
|
| Try to do both QML and mixed debugging on device | | |
|}
| Try to profile an app on the device | | |
 
{| class="wikitable"
|+ Debugging/Profiling on Device
(You need 4.8 or newer on device)
! Test
! Result
! Annotation
|+
| Try to do both QML and mixed debugging on device
|
|
|+
| Try profiling an app on the device
|
|
|}


== Recording Profiling Data ==
== Recording Profiling Data ==

Revision as of 15:49, 2 July 2015


QML Editor
Test Result Annotation
Open Qml files, make them invalid & again valid, check that errors are underlined
Indent a big Qml file via "Ctrl-I" automated
Hover over elements, properties, expressions automated
Rename an ID via context menu automated
Trigger Find Usages on an id and property automated
Outline (sidebar)
Test Result Annotation
Navigate to elements / properties by clicking on the item in the outline
Change qml in text, check that Outline updates automated: tst_qml_outline
Drag&Drop elements around in outline, check that text updates
Check/Uncheck 'Show all Bindings' in the Filter, outline should update accordingly
Qt Quick Wizards
Test Result Annotation
Create new "Qt Quick Application" through wizard, run application automated
Create new "Qt Quick UI" through wizard, run application automated
Generate "Qt Quick 1/2 Extension Plugin", compile automated
Application Output
Test Result Annotation
QML errors:
  1. Create a hybrid QML/C++ project (Qt Quick Application). In Projects mode, leave "Shadow build" checked.
  2. Add errors to the qml file.
  3. Save and close the file.
  4. Run this project on the desktop.

Are the error messages in Application Output clickable when running the app? Do they open the "right", file (not in shadow build)?

Deploy & run the project with errors on a device. Is the application output still clickable / opens the right file, line, column?
Qt Quick Designer
Test Result Annotation
Open all files in $CREATORDIR/tests/manual/qml/testfiles/testfiles.qmlproject and $CREATORDIR/tests/manual/qml/testfiles_quick2/testfiles_quick2.qmlproject and check whether:
  • previews look sane
  • the Properties editor works for different item types
  • changes in the Designer cause correct changes to the QML source
Create & Rename & Delete states
Open project $CREATORDIR/tests/manual/qml/testprojects/plugins/plugins.qmlproject and see whether the Designer treats MyComponent and MyComponent2 correctly
Test whether F1 works
JavaScript Debugging
Test Result Annotation
Preparation:
  1. Open demos/declarative/samegame/samegame.qmlproject from Qt4's or qtdeclarative/examples/quick/demos/samegame/samegame.qmlproject from Qt5's repository.
  2. Place a breakpoint at the first line of the startNewGame() function (samegame.js) which contains executable code (i.e. not (only) a comment).
  3. Start debugging app
Check that first breakpoint is hit when clicking on "New game" , and that the breakpoint looses it's 'hour glass' when hit
Step through startNewGame() function. Check Locals and Watchers update (should display 'this', 'column', 'i', 'row'). Also try adding watchers, and change content in locals & watchers. (Needs Qt >= 5.4)
Add breakpoint while debugging QML. Does the breakpoint interrupt the program?
Add breakpoint before starting QML Debugger. Does the breakpoint interrupt the program?
While interrupted in a javascript method (with more than one line), step over. Does it go to the next line?
While interrupted in a javascript method that calls another javascript method, step into. Does it enter that method's definition?
While interrupted in a javascript method, step out. Does execution resume again (or does debugger go back in context)?
Mixed Qml/JavaScript Debugging
Test Result Annotation
Breakpoints:
  1. Create a hybrid QML/C++ project (Qt Quick Application). Leave shadow build on.
  2. Select a Qt Version >= 4.8.0.
  3. Check that 'Enable QML debugging' is checked in qmake step on the Build configuration page.
  4. Rebuild.
  5. Make sure "C++" and "QML" Debugging under "Debugger Settings" are enabled in Run Settings.
  6. Place a breakpoint in main.cpp, before QApplication object is constructed.
  7. Place a breakpoint in the onClicked or onTriggered handler in main.qml.
  8. Start debugging the project.

Are breakpoints being hit? Do they open the right (non-shadow-build) file?

Breakpoints in bigger project:
  1. Load demos/declarative/minehunt/minehunt.pro from Qt4's, qtquick1/examples/declarative/demos/minehunt/minehunt.pro from Qt5's repository or qtdeclarative/examples/quick/demos/samegame/samegame.pro from Qt5's repository.
  2. Set a breakpoint in Tile.qml (minehunt) respectively GameArea.qml (samegame), onClicked handler of MouseArea. Is it hit? Is the right file opened in the editor? Click continue
  3. While the program is running, use the "Locals and Expressions" view to navigate in the object tree. Are the right files opened in the editor?
Locals and Expressions
Test Result Annotation
Preparation:
  1. Start debugging a Quick UI Application.
  2. Activate the "Select" mode with the arrow button in the debugger toolbar.
  3. Make sure the "Locals and Expressions" view is visible.
  4. Click on an item in the running application.
Is selection highlighted in the editor?
Is the selection in the "Locals and Expressions" view updated?

Note: In a stack of items, lower-level items can be accessed via double-clicking

Move mouse cursor to another item. Is selection only highlighted in the running application?
Live Preview
Test Result Annotation
While being in 'Select' mode (debugger toolbar), click on an item in the running application. Is the right file in the build directory opened, the right line/column selected?
QML Profiling
Test Result Annotation
Can you record some profiling data (see below)?
Do all tabs show well-formed data/information for the shown events?
Can you turn on and off the tabs by using the context menu and do all (re-)shown tabs still show well-formed data according to the last profiling?
With and without an already profiled app disable profiling by hitting the record button and start running again. Does the widget 's content still hold the data of the former profiling (or none if there wasn't any)?
Start the application and test the record button. It should show the collected data when disabled, and collect new data on already running application when enabled.
According to the time-line:

(Note: The little blue titled subwindows in the timeline are called "tool tip" below, even though they don't behave like normal tooltips.)

  • Toggle "view event information on mouseover" back and forth. When enabled, does it show up tool tips when hovering over painting, compiling, creating, binding and signal handler markers and do they show well-formed information? When disabled, does it not show the tooltips?
  • Does the editor switch to the correct file and line number when clicking on an event (where a location is mentioned)?
  • Can you drag it in both directions from 0 (zero) to the last event's timestamp?
  • Can you stretch and squeeze it by using the blue bar beneath the time-line and the zoom-slider and can you seek the blue bar by dragging it or clicking the "thumbnail" of the time-line?
  • Can you cycle through the events on the time-line by pressing "Jump to previous/next event"?
  • When selecting time ranges with the "Select range" tool: does the tool tip show the correct time under the cursor? Can you set a mark at a timestamp and can you set a time range and is the displayed time correct? When double clicking on the selected range, does it zoom in to exactly that range?
According to the Callees/Caller/Events tab:
  • Does the editor switch to the correct file and line number when clicking on an event (Events) or location (Callees/Caller) that is not marked as "<bytecode>"?
  • Are the relationships between callees and callers correct? (Check at least one, not necessary to be to exhaustive here)
  • Does column sorting work properly?
  • Are the events in the root node of each tab the same? (None missing in one of the views?)

Note: The "Events" tab intentionally doesn't show anonymous events.

Debugging/Profiling on Device (You need 4.8 or newer on device)
Test Result Annotation
Try to do both QML and mixed debugging on device
Try profiling an app on the device

Recording Profiling Data

Create or open a Qt Quick Application AND a Qml Project ($QTDIR/demos/declarative/minehunt/minehunt.pro and $QTDIR/demos/declarative/samegame/samegame.qmlproject should be adequate). Do the following for each of the projects:

  • Enable QML debugging on the Projects view (might require rebuilding the app)
  • Switch to Analyzer view and press the "Start" button at the QML Profiler widget
  • Generate some events by playing around