Execute TestCases

In Tricentis Tosca, you can sum up all completed TestCases in ExecutionLists and run them. Each TestCase is shown as an ExecutionEntry. Execution results and their history are automatically written to a log file (ActualLog).

If you want to run specific TestSteps separately or check TestCases that are still incomplete, you can use the Scratchbook function (see chapter "ScratchBook").

ExecutionLists

Run your Automobile TestCase in an ExecutionList:

Click on the Execution tab in Tosca Commander.

Right-click on the ExecutionList folder ExecutionLists and select Create Folder from the mini toolbar.

Alternatively, you can left-click on the ExecutionList folder and select Create Folder in the dynamic menu ExecutionLists.

Assign the name My first ExecutionList to the new ExecutionList folder.

ExecutionLists

Create ExecutionEntries

In Tricentis Tosca, you can create ExecutionEntries by dragging and dropping TestCases onto ExecutionLists.

Right-click on the ExecutionList folder My first ExecutionList and select Create ExecutionList from the mini toolbar.

Alternatively, you can left-click on the ExecutionList folder and select Create Object in the dynamic menu ExecutionLists.

Assign the name Vehicle Insurance to the new ExecutionList.

Drag and drop your Automobile TestCase onto your Vehicle Insurance ExecutionList.

This automatically creates the ExecutionEntry Automobile and links it to the corresponding TestCase.

ExecutionEntry Automobile

To see which TestCase is linked to which ExecutionEntry, right-click on an ExecutionEntry and select the option Jump to TestCase.

Alternatively, you can left-click on the ExecutionEntry and select Jump to TestCase in the dynamic menu ExecutionLists.

To see which TestStep is linked to which Module, select Jump to Module from the context menu of a TestStep..

Alternatively, you can left-click on the TestStep and select Jump to Module in the dynamic menu TestCases.

Run ExecutionLists

Open the Tricentis Sample Application in Microsoft® Internet Explorer.

For a successful execution of the TestCase, the sample application must show the start screen.

Switch back to Tosca Commander, go to the ExecutionLists window, and select Run from the context menu of the Vehicle Insurance ExecutionList.

Alternatively, you can left-click on the ExecutionList and select Run from the dynamic menu ExecutionLists.

Run ExecutionLists

Tricentis Tosca starts to execute the TestCase.

Since Tricentis Tosca takes over control of your mouse and keyboard upon test execution, Tricentis highly recommends that you refrain from performing mouse clicks and keyboard inputs while Tricentis Tosca is running your TestCase.

You can now observe how Tricentis Tosca clicks the links and fills out all the forms in the insurance calculator. The execution stops on the last page of the Tricentis sample application where you can view the quotes that have been created for the respective packages.

Execution information

The Loginfo column shows the execution state:

  • Green: Passed

  • Red: Failed

  • White: No Result (i.e. this ExecutionEntry has not yet been executed)

  • Gray: The TestCase does no longer exist in this workspace

If your TestCase was successfully executed without any errors, Tricentis Tosca indicates this with a green bar. Since your current TestCase consists of one single ExecutionEntry, the green bar includes the figure 1.

Execution result Automobile

To get an idea of how Tricentis Tosca displays execution information, you will now create an ExecutionList containing 5 ExecutionEntries:

Switch to the TestCases window and create the TestCase folder Quotes beneath the TestCase folder My first TestCase.

Copy the TestCase Automobile to the Quotes TestCase folder and rename it to Automobile_01.

Switch to the Modules window, and drag and drop the Quote Module onto your Automobile_01 TestCase.

Tricentis Tosca automatically creates the TestStep Quote_1.

Select {Click} from the drop-down list of the TestStepValue Home, or enter X into the Value field.

TestStep Quote_1

Tricentis Tosca returns to the start screen of the Tricentis sample application after it has created the quote. This allows you to run several TestCases in a row since each TestCase starts on the start screen of the sample application.

Make 4 copies of your Automobile_01 TestCase and paste them into the Quotes folder. The TestCases are numbered consecutively.

TestCases from Automobile_01 to Automobile_05

Drag and drop your Quotes TestCase folder onto your Vehicle Insurance ExecutionList.

Tricentis Tosca automatically creates new ExecutionEntries and adapts the ExecutionList statistics accordingly. Since your newly created ExecutionEntries have not yet been executed, they display the status No Result and a white bar in the Loginfo column.

White bar of 5 ExecutionEntries that have not yet been executed

Set the test results manually to see all execution states that are available in Tricentis Tosca:

Right-click on the Automobile_01 ExecutionEntry and select Set result->Failed from the context menu.

Alternatively, you can left-click on the ExecutionEntry and select Set result->Failed from the dynamic menu ExecutionLists.

Give reasons for your test result decision by entering Reason 01 into the pop-up window.

Set the result for ExecutionEntries Automobile_02 and Automobile_03 to Failed. You don't need to give reasons here, simply click OK.

Right-click on the Automobile_04 ExecutionEntry and select Set result->Passed from the context menu.

Alternatively, you can left-click on the ExecutionEntry and select Set result->Passed from the dynamic menu ExecutionLists. Confirm your selection with a click on OK in the pop-up window.

Switch to the TestCases window and remove TestCase Automobile_02 from your TestCase folder Quotes.

Confirm the warning message with a click on OK.

Warning message

Switch to the ExecutionLists window and left-click on your Quotes ExecutionList.

The Loginfo column shows the execution states:

One TestCase is marked as passed (green), one has not yet been executed (white), and one TestCase does no longer exist in the workspace (gray). Two TestCases are marked as failed (red).

Execution states

History

To become acquainted with ExecutionList histories, you will now modify a TestCase and trigger an error. Specify a wrong verification value:

Switch to the TestCases window, go to your Automobile_04 TestCase in TestCase folder Quotes and set the value to be verified to 12345 in the Quote TestStep.

The value to be verified is wrong

Open the Tricentis Sample Application in Microsoft® Internet Explorer

For a successful execution of your TestCase, the sample application must show the start screen.

Run your Quotes ExecutionList.

Disable Show only last ActualLog under View->ExecutionLists, and enable the following entries: Show multiline Logs, Show Statistics only on visible ExecutionLists, and Show Statistics.

ExecutionLists view - settings

Right-click on the ExecutionEntry Automobile_04 in the Details view. Select Expand all in the mini toolbar to view all TestStepValue details.

Tricentis Tosca displays the log history in chronological order. The most recent results are located on top.

The ExecutionEntry Automobile_04 provides a description of the error that occurred, along with details on which TestStep caused the error.

ExecutionList: history

ScratchBook

Use the ScratchBook in Tosca Commander to run individual TestSteps upon TestCase creation.

You can combine various TestCases, TestSteps, and TestCase folders and run them in the ScratchBook.

In contrast to ExecutionLists, the ScratchBook neither saves how TestCases are combined for test execution nor the test results. Tricentisrecommends using the ScratchBook solely upon TestCase creation.

Run the Vehicle data TestStep in your Automobile TestCase in ScratchBook. Since this TestStep contains vehicle data you have to make sure that the corresponding page of the sample application is open so that Tricentis Tosca can enter the data accordingly.

Open the Tricentis Sample Application in Microsoft® Internet Explorerand go to the Enter Vehicle Data page.

Enter Vehicle Data screen

Return to Tosca Commander. Right-click on your Vehicle data TestStep under the Automobile TestCase and select the option Run in ScratchBook from the context menu.

Alternatively, you can left-click on the TestStep and select Run in ScratchBook from the dynamic menu TestCases.

Run the TestStep in ScratchBook

The ScratchBook window opens and Tricentis Tosca runs the Vehicle data TestStep.

Since Tricentis Tosca takes over control of your mouse and keyboard upon test execution, Tricentis highly recommends that you refrain from performing mouse clicks and keyboard inputs while Tricentis Tosca is running your TestStep.

The ScratchBook window lists the executed TestSteps. In the illustration below you can see the Vehicle data TestStep along with the execution results.

ScratchBook

Congratulations! You've successfully completed this tutorial.

At this stage you should be familiar with the most important processes in Tricentis Tosca.

Related chapters