Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Qt Creator ManualTests ProjectsAndCode: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Convert ExpressionEngine links)
(Fixing import, first step - making it a table again and removing outdated menu tag)
Line 2: Line 2:


[[Category:Tools::QtCreator::QualityAssurance]]
[[Category:Tools::QtCreator::QualityAssurance]]
[toc align_right="yes" depth="2"]


= Qt Creator Manual Tests: Projects and Code =
= Qt Creator Manual Tests: Projects and Code =


{background:#009900}. |''. Project Management |''. Result |_. Annotation |
{| class="wikitable"
|+ Project Management  
! Test
! Result  
! Annotation
|+
|Check parsing of qmake projects:
|Check parsing of qmake projects:
# Prepare sources of Qt and Qt Creator (see below)
# Prepare sources of Qt and Qt Creator (see below)
Line 13: Line 16:
# Select "File"-> "Open File or Project…" from Creator's menu and open qtcreator.pro from Qt Creator's sources.
# Select "File"-> "Open File or Project…" from Creator's menu and open qtcreator.pro from Qt Creator's sources.
# Wait until parsing finished.
# Wait until parsing finished.
# Check that the projects are completely indexed, e.g. by searching for some of [http://doc.qt.io/qt-5/classes.html Qt's Classes] using the [http://doc.qt.io/qtcreator-3.2/creator-editor-locator.html Locator]. | automated | |
# Check that the projects are completely indexed, e.g. by searching for some of [http://doc.qt.io/qt-5/classes.html Qt's Classes] using the [http://doc.qt.io/qtcreator-3.2/creator-editor-locator.html Locator].
| automated
|
|+
|Check parsing of qbs projects:
|Check parsing of qbs projects:
# Prepare sources of Qt Creator (see below)
# Prepare sources of Qt Creator (see below)
Line 19: Line 25:
# Select "File"-> "Open File or Project…" from Creator's menu and open qtcreator.qbs from Qt Creator's sources.
# Select "File"-> "Open File or Project…" from Creator's menu and open qtcreator.qbs from Qt Creator's sources.
# Wait until parsing finished.
# Wait until parsing finished.
# Check that the project is completely indexed, e.g. by searching for some of [http://doc.qt.io/qt-5/classes.html Qt's Classes] using the [http://doc.qt.io/qtcreator-3.2/creator-editor-locator.html Locator]. | | |
# Check that the project is completely indexed, e.g. by searching for some of [http://doc.qt.io/qt-5/classes.html Qt's Classes] using the [http://doc.qt.io/qtcreator-3.2/creator-editor-locator.html Locator].
|
|
|+
| Adding a build configuration:
| Adding a build configuration:
# Open a project.
# Open a project.
# Go to "Projects" mode.
# Go to "Projects" mode.
# [http://doc.qt.io/qtcreator-3.2/creator-build-settings.html Add a new build configuration].
# [http://doc.qt.io/qtcreator-3.2/creator-build-settings.html Add a new build configuration].
# The project can be built successfully with this build configuration. | | |
# The project can be built successfully with this build configuration.
|
|
|+
| Adding a run configuration:
| Adding a run configuration:
# Open a project.
# Open a project.
# Go to "Projects" mode.
# Go to "Projects" mode.
# [http://doc.qt.io/qtcreator-3.2/creator-run-settings.html Add a new run configuration].
# [http://doc.qt.io/qtcreator-3.2/creator-run-settings.html Add a new run configuration].
# The project can be run successfully with this run configuration. | | |
# The project can be run successfully with this run configuration.
|
|
|+
| Opening a project from Welcome screen:
| Opening a project from Welcome screen:
# Close all open projects.
# Close all open projects.
# Go to "Welcome" mode.
# Go to "Welcome" mode.
# Open a previously opened project by clicking its name in the Welcome screen. | automated | |
# Open a previously opened project by clicking its name in the Welcome screen.
| automated
|
|+
| CMake project management:
| CMake project management:
# Have [http://www.cmake.org CMake] installed.
# Have [http://www.cmake.org CMake] installed.
Line 42: Line 60:
# Follow the instructions in the wizard.
# Follow the instructions in the wizard.
# Wait until parsing finished.
# Wait until parsing finished.
# Check that the project is completely indexed, e.g. by expanding items of the tree structure in the "Class View". | semi-automated | |
# Check that the project is completely indexed, e.g. by expanding items of the tree structure in the "Class View".
| Creator can build and run the project from the previous test. | automated | |
| semi-automated
|
|+
| Creator can build and run the project from the previous test.
| automated
|
|+
| External changes:
| External changes:
# Open a file in Creator.
# Open a file in Creator.
# Edit this file outside Creator, e.g. using some text editor.
# Edit this file outside Creator, e.g. using some text editor.
# Go back to the file in Creator. Creator must report that the file was changed. | automated | |
# Go back to the file in Creator. Creator must report that the file was changed.
| automated
|
|+
| Deleted files:
| Deleted files:
# Open a file in Creator.
# Open a file in Creator.
# Delete this file outside Creator, e.g. using some file manager.
# Delete this file outside Creator, e.g. using some file manager.
# Go back to the file in Creator. Creator must report that the file was deleted. | automated | |
# Go back to the file in Creator. Creator must report that the file was deleted.
| automated
|
|+
| Windows: Foreign character sets:
| Windows: Foreign character sets:
# Add a user whose name contains non-latin characters ( Віталій , ‏ناصر , 右京 ) using Windows Control Panel.
# Add a user whose name contains non-latin characters ( Віталій , ‏ناصر , 右京 ) using Windows Control Panel.
# Login to this user account and run Creator.
# Login to this user account and run Creator.
# Create a session and activate this session. No warnings or error messages should appear. | | |
# Create a session and activate this session. No warnings or error messages should appear.
| Try to make Creator crash, be evil | | |
|
{background:#009900}. |''. C++ Support |''. Result |_. Annotation |
|
| Open the project tests/manual/cplusplus-tools/cplusplus-tools.pro from Creator's sources and perform the following tasks: | | |
|+
| Try to make Creator crash, be evil
|
|}
 
{| class="wikitable"
|C++ Support
! Test
! Result
! Annotation
|+
| Open the project tests/manual/cplusplus-tools/cplusplus-tools.pro from Creator's sources and perform the following tasks:
|
|
|+
| Variable declarations:
| Variable declarations:
# Move the cursor to the usage of a variable.
# Move the cursor to the usage of a variable.
# Press F2 or select from the menu: Tools-> C++ -> Follow Symbol under Cursor
# Press F2 or select from the menu: Tools-> C++ -> Follow Symbol under Cursor
Creator will show you the declaration of the variable. | automated | |
Creator will show you the declaration of the variable.
| automated
|
|+
| Function definitions:
| Function definitions:
# Move the cursor to a function call.
# Move the cursor to a function call.
# Press F2 or select from the menu: Tools-> C++ -> Follow Symbol under Cursor
# Press F2 or select from the menu: Tools-> C++ -> Follow Symbol under Cursor
Creator will show you the definition of the function. | automated | |
Creator will show you the definition of the function.
| automated
|
|+
| Definition/declaration:
| Definition/declaration:
# Move the cursor to a function declaration
# Move the cursor to a function declaration
Line 72: Line 122:
Creator should show the definition of this function
Creator should show the definition of this function
# Press Shift+F2 or select from menu: Tools-> C++ -> Switch Between Method Declaration/Definition again
# Press Shift+F2 or select from menu: Tools-> C++ -> Switch Between Method Declaration/Definition again
Creator should show the declaration of the function again. | automated | |
Creator should show the declaration of the function again.
| automated
|
|+
| Switching between sources and headers:
| Switching between sources and headers:
# Open a source or header file of a source/header couple (same base name)
# Open a source or header file of a source/header couple (same base name)
# Press F4 or select from menu: Tools-> C++ -> Switch Header/Source
# Press F4 or select from menu: Tools-> C++ -> Switch Header/Source
Creator should show the respective other file (header/source).| | |
Creator should show the respective other file (header/source).|
|
|+
| Finding usages:
| Finding usages:
# Open a header or source file
# Open a header or source file
Line 82: Line 137:
# Press Ctrl+Shift+U or select from menu: Tools-> C++ -> Find Usages
# Press Ctrl+Shift+U or select from menu: Tools-> C++ -> Find Usages
A search result view should appear at the bottom indicating files containing usages of this variable or function.
A search result view should appear at the bottom indicating files containing usages of this variable or function.
When expanding the tree view-like structures, the respective lines can be seen. Double clicking on them should direct you to this file and line | | |
When expanding the tree view-like structures, the respective lines can be seen. Double clicking on them should direct you to this file and line
|
|
|+
| Renaming usages:
| Renaming usages:
# Move cursor to a variable or function call
# Move cursor to a variable or function call
# Press Ctrl+Shift+R or select from menu Tools-> C++ -> Rename Symbol Under Cursor
# Press Ctrl+Shift+R or select from menu Tools-> C++ -> Rename Symbol Under Cursor
You should be able to enter another name changing every occurrence of this variable or function
You should be able to enter another name changing every occurrence of this variable or function
Note: When changing variable "a" to "b", other variables like "a1" must not be changed! | automated | |
Note: When changing variable "a" to "b", other variables like "a1" must not be changed!
| When entering the first few letters of a variable or function (or: includes, keywords, function arguments, snippets, etc), Creator should automatically show possible completions. You might have to hit Ctrl+Space. | | |
| automated
|
|+
| When entering the first few letters of a variable or function (or: includes, keywords, function arguments, snippets, etc), Creator should automatically show possible completions. You might have to hit Ctrl+Space.
|
|
|+
| When hovering the mouse over some variable or function call, a tooltip should appear telling you the type of this element.
| When hovering the mouse over some variable or function call, a tooltip should appear telling you the type of this element.
In case it's a Qt object (like QString, QWidget, …), you should see a picture of the F1 button in the top right corner of the tooltip, indicating that you can easily switch to the Qt documentation of this class or method by pressing F1. Pressing F1 will open the related page. | | |
In case it's a Qt object (like QString, QWidget, …), you should see a picture of the F1 button in the top right corner of the tooltip, indicating that you can easily switch to the Qt documentation of this class or method by pressing F1. Pressing F1 will open the related page.
| Try code folding. Fold and unfold classes and functions. Does everything work as expected? | | |
|
|
|+
| Try code folding. Fold and unfold classes and functions. Does everything work as expected?
|
|
|}


== Preparing sources of Qt and Qt Creator ==
== Preparing sources of Qt and Qt Creator ==


This can be used for all following tests after it was done once.
This can be used for all following tests after it was done once.

Revision as of 15:40, 9 March 2015

This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

Qt Creator Manual Tests: Projects and Code

Project Management
Test Result Annotation
Check parsing of qmake projects:
  1. Prepare sources of Qt and Qt Creator (see below)
  2. Select "File" -> "Open File or Project…" from Creator's menu and open projects.pro from Qt's sources.
  3. Select "File"-> "Open File or Project…" from Creator's menu and open qtcreator.pro from Qt Creator's sources.
  4. Wait until parsing finished.
  5. Check that the projects are completely indexed, e.g. by searching for some of Qt's Classes using the Locator.
automated
Check parsing of qbs projects:
  1. Prepare sources of Qt Creator (see below)
  2. In "Help" -> "About Plugins…", verify that QbsProjectManager is enabled.
  3. Select "File"-> "Open File or Project…" from Creator's menu and open qtcreator.qbs from Qt Creator's sources.
  4. Wait until parsing finished.
  5. Check that the project is completely indexed, e.g. by searching for some of Qt's Classes using the Locator.
Adding a build configuration:
  1. Open a project.
  2. Go to "Projects" mode.
  3. Add a new build configuration.
  4. The project can be built successfully with this build configuration.
Adding a run configuration:
  1. Open a project.
  2. Go to "Projects" mode.
  3. Add a new run configuration.
  4. The project can be run successfully with this run configuration.
Opening a project from Welcome screen:
  1. Close all open projects.
  2. Go to "Welcome" mode.
  3. Open a previously opened project by clicking its name in the Welcome screen.
automated
CMake project management:
  1. Have CMake installed.
  2. Windows: Add the path to the installed cmake.exe to your system's PATH environment variable.
  3. Download SpeedCrunch's source code package.
  4. Extract the package.
  5. Select "File" -> "Open File or Project…" from Creator's menu and open src/CMakeLists.txt.
  6. Follow the instructions in the wizard.
  7. Wait until parsing finished.
  8. Check that the project is completely indexed, e.g. by expanding items of the tree structure in the "Class View".
semi-automated
Creator can build and run the project from the previous test. automated
External changes:
  1. Open a file in Creator.
  2. Edit this file outside Creator, e.g. using some text editor.
  3. Go back to the file in Creator. Creator must report that the file was changed.
automated
Deleted files:
  1. Open a file in Creator.
  2. Delete this file outside Creator, e.g. using some file manager.
  3. Go back to the file in Creator. Creator must report that the file was deleted.
automated
Windows: Foreign character sets:
  1. Add a user whose name contains non-latin characters ( Віталій , ‏ناصر , 右京 ) using Windows Control Panel.
  2. Login to this user account and run Creator.
  3. Create a session and activate this session. No warnings or error messages should appear.
Try to make Creator crash, be evil
C++ Support
Test Result Annotation
Open the project tests/manual/cplusplus-tools/cplusplus-tools.pro from Creator's sources and perform the following tasks:
Variable declarations:
  1. Move the cursor to the usage of a variable.
  2. Press F2 or select from the menu: Tools-> C++ -> Follow Symbol under Cursor

Creator will show you the declaration of the variable.

automated
Function definitions:
  1. Move the cursor to a function call.
  2. Press F2 or select from the menu: Tools-> C++ -> Follow Symbol under Cursor

Creator will show you the definition of the function.

automated
Definition/declaration:
  1. Move the cursor to a function declaration
  2. Press Shift+F2 or select from menu: Tools-> C++ -> Switch Between Method Declaration/Definition

Creator should show the definition of this function

  1. Press Shift+F2 or select from menu: Tools-> C++ -> Switch Between Method Declaration/Definition again

Creator should show the declaration of the function again.

automated
Switching between sources and headers:
  1. Open a source or header file of a source/header couple (same base name)
  2. Press F4 or select from menu: Tools-> C++ -> Switch Header/Source

Creator should show the respective other file (header/source).|

Finding usages:
  1. Open a header or source file
  2. Move cursor to the usage of a variable or function call
  3. Press Ctrl+Shift+U or select from menu: Tools-> C++ -> Find Usages

A search result view should appear at the bottom indicating files containing usages of this variable or function. When expanding the tree view-like structures, the respective lines can be seen. Double clicking on them should direct you to this file and line

Renaming usages:
  1. Move cursor to a variable or function call
  2. Press Ctrl+Shift+R or select from menu Tools-> C++ -> Rename Symbol Under Cursor

You should be able to enter another name changing every occurrence of this variable or function Note: When changing variable "a" to "b", other variables like "a1" must not be changed!

automated
When entering the first few letters of a variable or function (or: includes, keywords, function arguments, snippets, etc), Creator should automatically show possible completions. You might have to hit Ctrl+Space.
When hovering the mouse over some variable or function call, a tooltip should appear telling you the type of this element.

In case it's a Qt object (like QString, QWidget, …), you should see a picture of the F1 button in the top right corner of the tooltip, indicating that you can easily switch to the Qt documentation of this class or method by pressing F1. Pressing F1 will open the related page.

Try code folding. Fold and unfold classes and functions. Does everything work as expected?

Preparing sources of Qt and Qt Creator

This can be used for all following tests after it was done once.