Document the execution of your tests

If you want to document the execution of your tests for reporting purposes, you can configure Tosca Commander to perform the following actions:

  • Take screenshots of failed TestSteps:

    Tosca Commander generates screenshots of all TestSteps that failed because of verification or dialog failures.

  • Take screenshots of TestStepValues:

    Tosca Commander generates screenshots of all TestStepValues that use the ActionMode Input. Use this option if you want to view screenshots of values that Tosca Commander used during execution.

  • Use DokuSnapper to generate a Microsoft® Word document that contains screenshots and data on all executed TestSteps. Rather than generate separate screenshots for every TestStep, DokuSnapper collects all data in one document for each TestCase.

    If you run TestCases via ExecutionList, DokuSnapper creates a document for each completed ExecutionEntry. If you run TestCases in the ScratchBook, DokuSnapper creates a single document.

Take screenshots of failed TestSteps

This option is available for tests created with the following engines:

Tosca Commander does not generate screenshots for Modules with the property SpecialExecutionTask.

Enable screenshots

To enable screenshots of failed TestSteps, choose the respective value for the setting Make screenshot on failed test steps in the settings dialog that applies to your tests:

Engine

Setting

Engines 3.0

Project->Settings->TBox->Logging->Screenshots (see chapter "Settings - Logging")

Tests created with Engines 3.0: Available values for Make screenshot on failed test steps setting

You can also define a directory in which you want to save your screenshots as well as the desired image format in the settings dialog.

If you have enabled Tricentis File Service, you don't have to define a path for your screenshots. In this case, Tricentis Tosca saves the screenshots to the Tricentis File Service.

View screenshots

When you execute your tests, Tosca Commander saves your screenshots in the specified directory and displays the screenshots in the Detail column. Hover your mouse over the screenshot to see a tool tip with the path to the screenshot.

Failed verification in the Make TestStep

If you have enabled Tricentis File Service, the Detail column shows a confirmation message that the screenshots have been saved.

To view your screenshots, right-click the message and select View Screenshots from the context menu.

You can double-click the Before or After image to view it full-screen.

If you try to view a screenshot that has been deleted, Tosca notifies you in a pop-up dialog.

Take screenshots of TestStepValues with ActionMode Input

This option is only available for tests created with the following Engines 3.0: Mobile, DotNet, SAP, UIA, XBrowser, and Image-based test automation.

Tosca Commander does not generate screenshots for Modules with the property SpecialExecutionTask.

Enable screenshots

You can enable screenshots in one of two ways:

Test configuration parameters ScreenFlow and ScreenFlowPath

If you have enabled Tricentis File Service, you don't have to define a path for your screenshots. In this case, Tricentis Tosca saves the screenshots to the Tricentis File Service.

View screenshots

When you execute your tests, Tosca Commander creates a folder with screenshots in the specified directory and displays the path in the Detail column of the TestStepValue.

Path to screenshots in the Detail column

If you have enabled Tricentis File Service, the Detail column shows a confirmation message that the screenshots have been saved.

To view your screenshots, right-click the message and select View Screenshots from the context menu.

View screenshots: Before and after executing the TestStep

You can double-click the Before or After image to view it full-screen.

Use DokuSnapper to generate a Microsoft® Word document

When you enable DokuSnapper, Tosca generates a Microsoft® Word document for each TestCase. These documents contain screenshots and data on all executed TestSteps.

The document format is DOCX.

Tosca Commander does not generate screenshots for Modules with the property SpecialExecutionTask.

DokuSnapper is available for tests created with the following engines:

To enable DokuSnapper, enable the setting Enable Snapper under Project->Settings->TBox->DokuSnapper.

For more information on DokuSnapper settings, see chapter "Settings - DokuSnapper".

Recorded TestStep in the Microsoft® Word document

The amount of memory needed by DokuSnapper depends on the number and complexity of your TestCases.

Exclude Modules or ModuleAttributes

You can exclude individual Modules or ModuleAttributes from recording with DokuSnapper.

To exclude Engine 3.0 XModules or XModuleAttributes, create a configuration parameter called AvoidSnapper and set it to True.

Exclude Example XModule from recording with DokuSnapper

Access your DokuSnapper document

Once you've run your tests, you can access your DokuSnapper document. Where you find it depends on what you selected in the Storage Location Type setting:

  • If the setting's value is Local, your document is in the folder you entered into the DokuSnapper Path setting.

  • If the setting's value is Tosca, right-click your execution log and select Search all->References from the mini toolbar. In the search results, right-click AttachedExecutionLogFile and pick your preferred option from the context menu: open the document or save a copy.