Capture the execution of your tests
If you want to capture and 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 PDF or 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.
-
Use the execution recorder to record a test execution video that shows how Tricentis Tosca navigates the tests you designed. This allows you to review your tests in action and uncover areas that may need some improvement.
Take screenshots of failed TestSteps
To enable screenshots of failed TestSteps, choose the respective value for the setting Make screenshot on failed test steps in the settings dialog
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
You can enable screenshots in one of two ways:
-
Globally, via the settings Screen Flow and Screen Flow Path under Project->Settings->TBox->DokuSnapper
-
For specific TestCases, ExecutionLists, or ExecutionEntries by creating test configuration parameters
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 test execution reports
DokuSnapper allows you to generate detailed documents containing relevant execution details for each of your TestCases. Here are the key aspects of documenting test execution with DokuSnapper:
-
Each report includes detailed data for all executed TestSteps, providing a clear and thorough overview of the test execution.
-
If the application under test has a graphical user interface (GUI), the report also includes screenshots of your application at the time of the test.
-
You can choose between PDF, Microsoft Word, or Microsoft Excel formats for your reports, depending on your needs and preferences.
-
You can use your own templates to tailor the report content, ensuring it meets your specific requirements. Templates work for PDF and Microsoft Word, but not Microsoft Excel.
Get started with DokuSnapper
To enable DokuSnapper, change the setting Enable Snapper in Settings->TBox->DokuSnapper. Once that's done, Tricentis Tosca automatically starts saving DokuSnapper reports in the directory specified in the Path setting.
Note that for large sets of TestCases, DokuSnapper may consume significant processing power and memory. If you have performance concerns, consider excluding Modules or ModuleAttributes from recording.
You can customize your PDF or Microsoft Word DokuSnapper report by modifying its existing template. This way, you can tailor your reports to your exact needs. To do so, you can use specific placeholders that Tosca replaces with actual test information at runtime.
You can find example templates at C:\Program Files\Tricentis\Tosca Testsuite\TBox\Resources.
Templates include a cover and overview as the first pages, where you can exclusively use placeholders related to your TestCase:
Placeholder |
Equivalent information |
---|---|
<Duration> |
The length of your TestCase run. |
<ErrorTestSteps> |
The number of TestSteps that encountered an error. |
<FailedTestSteps> |
The number of failed TestSteps. |
<NoResultsTestSteps> |
The number of TestSteps without results. |
<PassedTestSteps> |
The number of successful TestSteps. |
<TestCaseName> |
The name of your TestCase. |
<TestCaseResult> |
The result of your TestCase: passed or failed, for instance. |
<TestCaseStartTime> |
The exact time your TestCase started execution. |
<TestCaseEndTime> |
The exact time your TestCase finished execution. |
<[ToscaObjectProperty]> |
The value of any property of your TestCase. Replace [ToscaObjectProperty] with the property you want to report on. For instance <TestCaseWorkState>, if you want to report on the actual WorkState of your TestCase. Note that to use this placeholder, you must set Settings->TBox->DokuSnapper->Make all properties available to Yes. |
After the cover and overview, there's a table with two columns. The first column is exclusively for screenshots that Tricentis Tosca captures during the execution of applications with a graphical user interface (GUI). You can't include any placeholders in this column.
However, in the right column, you can include placeholders related to the execution information of your TestSteps:
Placeholder |
Equivalent information |
---|---|
<Log> |
A predefined set of basic test information and values used. Try this option if you don't want to be too granular about which details go into your report. |
<TestStepName> |
The name of the TestStep that was executed. |
<TestStepResult> |
The result of the TestStep that was executed. |
<TestStepStartTime> |
The exact time when your TestStep started execution. |
<TestStepEndTime> |
The exact time when your TestStep finished execution. |
<UsedValue> |
The actual value used in your TestStep used during its execution. |
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.