First Steps
Aus ExpeccoWiki
Introduction
The First Steps are aimed at everyone who wants to use expecco for the first time and will be a support to the user in the beginning.
We want to provide you an overview of expecco, using a simple example.
It is recommended to also start the demo tutorial in parallel to the first steps in order to understand and follow everything.
Creating a new testsuite
A testsuite is the term used for a packaged test project. It manages a collection of elements like testplans, blocks and datatypes as well as resources or attachments and documentation.
To create a new testsuite, click on the menu File → New Test Suite.
expecco version 1.7 and higher
The Standard Library is automatically imported after creation of the new testsuite .
expecco up to version 1.6.x
The Standard Library has to be imported manually. To import the library click on the menu File → Import/Export → Import Library....
A file browser opens. Click on the button
to change to the library folder and select the Standard Library (StandardLibrary.ets). Press OK.
Blocks in libraries
Libraries are collections of functional blocks. Libraries are located in the project tree (Navigator) under the category "Imports". All elements within an imported library are read-only. For each block, there is a description and, where appropriate, an example that you can execute immediately.
Select the Standard Library in the project tree. This library provides basic blocks for different areas.
Select in the category "String Processing" the block "String [ AsUppercase ]".
Editors regarding the selected item are displayed on the right in a number of tabs. In the tab "Documentation" you will find a brief description about the functionality.
Select the tab "Test". The shown Testeditor allows the immediate execution of the block by pressing the button
.
The result of the execution is displayed in the lower part. In the tab "Pins" you can see the input and output values.
Creating your first (compound) block
A block is the definition of an activity. We distinguish between elementary blocks and compound blocks.
An elementary block defines a basic action, for example built-in functions, DLL-calls and JavaScript functions.
The behaviour of a compound block is represented by an activity diagram. The elements of an activity diagram are steps which are connected through data and/or control flows.
To create a new compound block click the button
on the toolbar
.
Click the button
to open an additional project tree which allows you to drag elements into the network editor.
In the external tree change to the category "Arithmetic" and select the block "Arith [ Sum ]". Keep the mouse pressed and drag the selected element into the network of the new block. Release the mouse button and a new step will be created.
Since this step requires input values, it can not be executed (showing a red exclamation mark
). Inputs and outputs are termed as pins (connectors). In the first step we allocate the inputs with fixed values. You can do this by double clicking on the input pin
or via the corresponding entry in the context menu:
Enter any number in the box:
Allocate the second input pin. The step now has all the required input values to be executed.
Execute your newly created block in the tab Test.
In the tab "Pins" you see the input values and the expected output value.
To take over the changes to the block in the system, click on the button "Accept".
Enter a name for the block, which can be accessed via the context menu of the newly created module in the project tree.
Enter the name "1.Block" in the box.
Creating a more complex block
As starting point, we use a copy of the previous block. To do so, select the block and open the right-click context menu. Then select the Copy item and afterwards the Paste item.
After pasting, you will have a copy of the previous block.
Place the block "Arith [ Product ]" from the additional tree via drag & drop into the network. Afterwards, your network should look like the following one:
After the execution of the module you will get the following picture:
The activities will be displayed in different colors, depending on their execution state. As seen here in green - for successful. As you can also see, no activity has started for the new step. The step is lacking the required input values (recognizable through the red exclamation mark).
Therefore, we connect the inputs and outputs of the steps.
Most connections are data-driven, which means they have to have the same data at the beginning and at the end of the connection. For example, it is not possible to add text into an addition block.
If the input and output data types do not match, various conversion blocks are available in the standard library under the category "Type Conversion".
To create a connection, follow these steps:
- Select with the left mouse button, the output pin "sum" at the step "Arith [ Sum ]" and keep it pressed.
- Drag the mouse button to connect to the input pin "number1" at the step "Arith [ Product ]" and release the mouse button while on the input pin
.
Repeat this step and connect the additional output "sum" with the input pin "number2".
Run the module again, as you can see all the steps were executed now.
Take over the block and rename it into "2.Block".
Adding output pins to a block
As starting point, we use a copy of the previous block, which you can create through the context menu (Copy then Paste).
You will get the following picture:
The interface of a block is described by its inputs and outputs. In the schema editor, the input pins are displayed on the left and the output pins on the right. Each pin is assigned to a data type.
In order to create new pins, there are different possibilities:
- Click the
button inside the schema editor to create a new input or output pin. To change the default data type, click on the data type and select the desired data type from the appearing menu.
- Drag the corresponding input or output pin to the left or right side of the editor.

After releasing the mouse, you see the following picture at the left border:
Create an output pin as described in example 2.
Select the tab Schema and you will get the following picture:
The block has received a new output pin, the data type and name of the output pin were taken over by the internally associated output pin within the network. By clicking on the name, the pin can be renamed.
To delete an existing input or output pin, select the appropriate pin and click on the button
.
Execute the block again and you will get the following picture:
The output value is now available for further use at the output pin.
Take over the block and rename it into "3.Block".
Adding input pins to a block
As starting point, we use a copy of the previous block, which you can create through the context menu (Copy then Paste).
You will get the following picture:
To externally supply the step "Arith [ Sum ]", create the input pins (same approach as for the Output pins):
|
|
| Perform the same action for the second input pin "number2": |
|
|
You will get the following picture:
Execute the block again and you will get the following picture:
As you can see, the block could not be executed because the necessary input values for the input pins of our test module are missing. Allocate the input with fixed values:
Execute the block again and you will get the following picture:
Now go to the tab Schema. Here you can change the trigger conditions for the block. Click on the field "And-Connected". A submenu is displayed on the configuration:
Here you can specify which input pins must have values in order to be executed. Three options are supported:
- And-Connected
All connected input pins must have values, open inputs are ignored. - And
all input pins must have values. - Or
at least one input pin must have a value.
In our case, all input values have to fit, so choose the "And" condition.
Take over the block and rename it into "4.Block".
Reuse of blocks
The way of working with blocks is the key to reusability and flexibility. Once a block is created it can be reused in any compound block.
Insert a new compound block by clicking the button
. Now drag & drop the previously created blocks into the network (activity diagram) of the new block.
Add additional blocks from the Standard Library and make the connections as shown in the following activity diagram.
You can find the blocks under the following categories:
- Data Generators
Random [ Integers ] - Compare
Compare [ Greater 2-Way ] - Assertions, Exceptions & Logging
Log [ Info ], Log [ Failure ]
Due to the upstreamed "Random [Integers ]" step, the created "4.Block" is supplied by different values, leading to different results. This can be seen best, when you execute the block in the Test tab a few times.
Take over the block and rename it into "5.Block".
Sequential execution of steps
For a graph with no data flows (i.e., with exclusive control flows), trigger inputs will be connected with trigger outputs, creating a pure flow chart.
To prepare, create a new compound block by clicking the button
. Drag and drop the blocks 1 and 2 in the network and you will get the following picture:
| After executing the block in theTest tab, you will get the following picture. As you can see "1.Block" was executed before "2.Block". |
|
After executing the block, you will now get the following error screen:
| As you can see the in the network editor, the "2.Block" is marked with a red exclamation mark, which means it is not ready to be executed. |
|
The step has an open trigger input pin. By connecting the trigger input with any other output pin, the action of the step can also be triggered.
In our case, delete the trigger input by selecting it and then press the Delete key.
| To execute a step, it has to have at least one connected not-parameter pin or the auto-start attribute. Therefore, mark step 2 as an auto-start. To do so, select it and click on the button |
|
| After executing the block in theTest tab, you will see the following picture. As you can recognize the "2.Block" was executed before the "1.Block". |
|
Creating a testplan
In expecco, a collection of several testcases is described as a testplan. During execution of a testplan, all individual testcases are executed sequentially.
To generate a new testplan, click the button
on the toolbar
.
Drag & drop the newly created blocks into the test plan editor. You will determine quickly that the "4.Block" is not addable to the testplan. Blocks with open entries can not be used within testplans.
You will get the following picture:
Take over the testplan and execute it by pressing the button
.
You will get the following picture:
Since the "5.Block" works internally with randomly generated input values, you will get different results with multiple executions for the testplan.
Generating a report
For preparation, execute the testplan. To create and view a detailed report about the test execution, click on the button
.
The dialog box "Report Generation / Print" will open. Prior to the report generation, you will have to determine further settings:
- Output Format(s):
The reports can be created in different output formats. A multiple selection is possible.
- Report Language:
Set the language for the report.
- Paper Size:
Only for the PDF output format the paper size is specified. For all other formats this setting will be ignored.
- Report Template:
Here, the content and appearance of the report can be determined.
For more information, go to Report Generation.
Click on the button "Generate Report" to start the report generation. After generating the file is open within a browser.
Saving the testsuite
To save the testsuite, click into the menu "File" → "Save As...". The Save dialog will appear.
Summary
In our example, we have intentionally used simple blocks from the Standard Library to help you work with expecco.
On specific blocks(TCP / IP, DLL calls, FTP, ...) and various libraries and plugins, the system under test tied to expecco.
For the testing of web applications, we recommend you the document:
http://wiki.expecco.de/index.php5/Expecco_web (First steps).
Other examples can be found at:
http://wiki.expecco.de/index.php5/Examples.
















































