How Tosca Handles TestData Parameterization

Tosca by Tricentis is a powerful test automation tool that provides robust support for test data parameterization, enabling reusable and maintainable test cases. Parameterization in Tosca allows testers to replace hardcoded values with dynamic data, making it easier to run the same test with multiple data sets.

Here’s how Tosca handles test data parameterization:

Using TestCase-Level Parameters

You can define TestCase parameters to pass values dynamically into a test case.

Steps:

  • Right-click the TestCase and choose "Create TestCase Parameter".
  • Assign a name (e.g., Username) and a default value.
  • In your TestStep, reference the parameter using the syntax ={ParameterName}.

Example: ={Username}

You can override these parameters when calling the TestCase in another TestCase or in the TestCase folder.

Using TestSheet/TestDataService (TDS)

Tosca allows parameterization via TestSheets, a part of the Tosca TestCase Design module. This is the most scalable and maintainable way to manage large data sets.

Steps:

  • Open the TestCase Design section.
  • Create a TestSheet and add attributes (columns) such as Username, Password, Email, etc.
  • Add data rows under each attribute.
  • Create Templates based on TestCases.
  • Link the TestSheet to the Template to generate TestCase Instances.

Each TestCase Instance will use a different set of data from the TestSheet, enabling data-driven testing.

Using Excel or External Data Sources

Tosca supports data input from Excel or other external sources via Tosca Excel Engine or Tosca TDS (Test Data Service).

Map Excel columns to TestCase parameters using the Excel Engine.

Alternatively, connect to databases or APIs using TDS and map values dynamically.

Business Parameters in Reusable TestSteps (Modules)

If you’re using Business Components or reusable TestStep Blocks, Tosca allows business parameters that can be passed down from calling TestCases.

Define the parameter at the business component level.

Use these placeholders in the test steps as ={ParameterName}.

When you call the component, supply values for the parameter.

Dynamic Expressions and Buffering

Tosca allows the use of dynamic expressions and buffers to store and reuse values during runtime.

Example:

{B[Username]} stores the value of Username in a buffer.

You can reuse it in other steps using {B[Username]}.

Conclusion

Tosca provides multiple ways to handle test data parameterization:

  • TestCase parameters for quick replacements
  • TestSheets/Templates for large-scale data-driven testing
  • External sources like Excel or databases
  • Business parameters for reusable modules
  • Buffers for dynamic value handling at runtime

This flexibility helps create maintainable, scalable, and reusable test automation frameworks suitable for complex enterprise applications.

Learn Tosca Training in Hyderabad

Read More: 

API Testing with Tosca: Step-by-Step Guide

Using Tosca ScratchBook for Test Execution

Tosca TestCase Versioning and Reuse

Automating SAP Applications with Tosca

Visit our IHub Talent Training Institute

Get Direction

Comments

Popular posts from this blog

Tosca Installation and Environment Setup

Automated Regression Testing with Selenium

How Playwright Supports Multiple Browsers