Getting Started - Create the First intaQt Project¶
This tutorial is an introduction to the basic concepts and features used within intaQt. This tutorial will go through the process of writing and executing a test case in intaQt Studio. The most basic steps and components that appear in all test cases include:
-
Creating a new project, its files and organizing your directory
-
Writing and executing a Feature File
-
Checking the reports folders
Afterwards, you can expand your test case by creating:
Note |
---|
intaQt Studio is based on the IntelliJ IDEA framework. Its Online Documentation contains a lot of useful information, tips and shortcuts that you might find useful for creating and managing your intaQt test cases. |
1. Launch intaQt and intaQt Studio¶
Start with running intaQt on your device. intaQt must be running if you want to write and execute test cases. Change to the QiTASC main directory and start both adm and intaQt using the following commands:
Windows User
1 2 | qitasc launch adm qitasc launch intaqt |
Linux and Mac OS User
1 2 | ./qitasc launch adm ./qitasc launch intaqt |
Start intaQt Studio by running the following:
Windows User
1 | qitasc launch intaqt-studio |
Linux and Mac OS User
1 | ./qitasc launch intaqt-studio |
Check the connection status widget at the bottom-right corner in intaQt Studio to confirm that intaQt started and that intaQt Studio was able to connect to it:
2. Create New Project¶
Set up the basic project structure. Open intaQt Studio and create a new intaQt project:
Assign the project a name:
The intaQt project icon should be visible in intaQt Studio's top-left corner.
3. Write a Feature File¶
Create a new directory called features
, by right-clicking on your newly-created project and selecting New
-> Directory
:
Note |
---|
Although it is not necessary, it is helpful to create a new directory to keep different types of files (such as Feature Files, Configurations and Custom Steps) separate from one another. |
Assign a name to the new directory:
Create a Feature File called MyFirstFeature
, inside the new directory by right-clicking on your features
directory, then select New
-> Feature
:
Note |
---|
Enter the file name only: The extension (.feature ) will be added automatically. |
Enter a name (for example, MyFirstFeature
) in the Scenario
field as well:
Create a new Feature File, and you will see the following display (intaQt Studio has a default template for newly-created Feature Files):
This template shows the recommended style for structuring Feature Files:
-
Each Feature File starts with the
Feature:
keyword, followed by the feature's name. -
Inside the Feature, there should be at least one Scenario defined after the
Scenario:
keyword. -
Inside each Scenario, specify the steps to be executed during the test run. These steps are formatted using natural language and serve as executable specifications of the system you are testing.
-
The recommended way of structuring tests are described in the comments section (indicated by
#
character):- Prerequesites are specified, for example, assigning phones and their characteristics.
- The actual execution occurs, for example,
A
callsB
. During this step, data is gathered. - Expectations are written to
verify
the data collected during the test.
4. Write the First Scenario - demonstrating the basic functionality of intaQt¶
Type the following into your Feature File:
Note |
---|
When you start typing a step, you will notice that a popup with auto-completion suggestions appear. Choosing an item from the list of suggestions will auto-complete the step for you. |
Type Ctrl
+ Space
, and it will manually trigger the auto-completion popup:
In the example above, we have chosen the verify
Built-in step, which will assert the given expression to be true
. If the expression resolves to false
, the step will fail.
5. Execute the Steps¶
Right-click inside the editor or on the Feature File's name in the project structure and select Run MyFirstFeature.feature
:
This will start the test's execution on intaQt and open a test results console where the progress and test results are displayed. By default, intaQt Studio shows the Protocol Log, which shows which steps were executed and whether they passed, skipped or failed:
Access other log output types by clicking on the filter icon:
.
Note |
---|
The Trace Log includes the protocol log as well as debug information |
The Server Log includes all log messages, including information from the Protocol/Trace Logs. This log is useful when troubleshooting a failed test case. |
.
intaQt stores a report of the test execution under the reports
folder. This folder is in the intaQt's installation directory and look like the following:
Conclusion¶
This tutorial demonstrated how to create a project structure for your tests. It illustrated how to create a simple Feature File, execute it and find its reports. In the next section, Getting Started - Expand the Feature File, we will add a custom Configuration and show you how to use Scenario Outlines.