How Tosca Pulls Data from Excel, Databases, and Other Files for Testing?

Mar 21, 2026

Today’s testing is no longer just clicking buttons and validating the screen. Today’s testing is all about feeding the system with the appropriate data at the appropriate time and validating the result at multiple levels. This is where Tosca excels. In the context of sophisticated test automation infrastructure, as discussed in the context of Tosca Training, the importance of data flowing into test cases is more significant than the test case design itself.

Understanding Tosca’s Data Integration Layer

At its core, Tosca employs a methodology called Test Data Management (TDM) and Test Case Design (TCD) in managing external data. Unlike other tools, there is little use of scripting in Tosca. Rather, the tool employs a model-based approach in which data sources are connected through modules.

Some data sources from which data can be fetched include:

  • Excel sheets

  • Relational databases like SQL Server, Oracle, and MySQL

  • CSV and XML files

  • JSON-based APIs

  • Internal buffers and test case parameters

What makes the tool special is the separation of test data from the actual test logic, allowing the same test case to be executed multiple times with different data sets without the need for modifying the logic.

In advanced Tosca Training, students learn about the scalability benefits of the abstraction employed in the tool.

How Does Tosca Connect to Excel and Flat Files?

Excel is one of the most popular data sources for testing. However, the way Tosca deals with Excel data is more organized compared to other tools. The way Tosca deals with Excel data is as follows:

Instead of directly reading the Excel data as a script does:

  • Test Case Design Sheets (TCD Sheets)

  • Attributes and Instances

  • Combinatorial data generation

If the data source is an Excel file and imported into Tosca:

  • Columns are mapped as attributes.

  • Rows are mapped as instances.

  • Data Combinations are automatically generated

For example:

Attribute Name

Value Set 1

Value Set 2

Value Set 3

Username

user1

user2

user3

Password

pass1

pass2

pass3

Role

Admin

User

Guest

Combinations generated by Tosca include:

user1 + pass1 + Admin

user2 + pass2 + User

user3 + pass3 + Guest

It is not normally explained in basic blogs but is an important concept in reducing redundancy.

Tosca Certification professionals face difficulties in understanding this concept as it is based on thinking in data models rather than scripts.

Database Integration and Dynamic Data Fetching

When it comes to databases, the integration with the databases is direct using the “Tosca Database Engine” and “SQL Query Modules.”

Testers can:

  • Execute SQL queries directly from the “Tosca” software

  • Fetch data in real-time from the production-like environment

  • Validate the data from the backend without the need for the user interface

Key Technical Components Involved in the Process

DB Expert Module: This is used for setting up the connection with the databases.

Query Builder: This is used for executing the SQL queries.

Buffers: Buffers are used as a temporary storage area for the data fetched from the databases.

Parameterized “TestSteps”

Working with APIs, JSON, and Structured Files

Modern applications use APIs extensively, and Tosca supports this with JSON and XML data formats.

Here’s how Tosca supports JSON and XML data formats:

  • JSON data files are parsed into key-value pairs

  • XML data is supported through schema definitions

  • API responses are stored in buffers to validate them

Workflow:

  • API request is sent

  • JSON response is received

  • Values are extracted using path expressions

  • Validation is performed against expected data

This way, testers can validate both the frontend as well as the backend using a single tool.

Buffering and Data Flow Within Test Cases

One of the least discussed aspects of Tosca is buffer management.

Buffers provide a kind of "memory" where data can be saved and reused.

Example:

  • Capture user ID from login response

  • Store it in buffer {B[UserID]}

  • Use it later, e.g., while creating an order.

  • This reduces "hard-coding" and makes tests more reliable.

Buffers:

  • Static buffers

  • Dynamic buffers

  • Environment variables

This is especially important when dealing with real-time data scenarios.

Buffers are one of the least understood aspects of Tosca, especially by many professionals seeking Tosca Certification.

Handling Large Data Sets and Performance Considerations

When working with large data sets, Tosca offers the following features:

  • Data slicing, using a subset of the data

  • Execution lists for running the tests

  • Support for parallel execution

Instead of working with large data sets, testers can use the following options:

  • Filtering of data based on certain criteria

  • Running only the required combinations

  • Optimization of the execution time

This is particularly relevant when we consider the following scenarios that may occur in an enterprise environment:

  • The data sets may contain thousands of data points

  • The tests may be scheduled for overnight. runs

  • The performance of the tests may impact delivery

In a real-world scenario, as discussed in a Software Testing Online Course, learners may understand the impact of inadequate data handling on the speed of the automated tests.

Localized Industry Perspective: Gurgaon’s Automation Shift

Gurgaon has transformed into a prominent IT/automation center, especially for enterprise testing services. Organizations here are not only using automation tools, but creating data-driven testing environments.

One of the prominent trends in Gurgaon is:

  • Integrated test data management

  • API-first testing approaches

  • Cloud-based execution environments

This leads to a requirement for professionals with knowledge not only about automation tools but also about data management aspects of testing tools such as Tosca.

This is why Automation Software Testing Course training programs in Gurgaon now have training sessions on data handling aspects of Tosca.

Common Challenges and Lesser-Known Insights

  • Despite its power, Tosca users face challenges such as:

  • Understanding combinatorial logic

  • Overloading test cases with data

  • Buffer management

  • Inefficient database query usage

Another lesser-known fact is that Tosca works best in cases where:

  • The data is normalized before it is imported.

  • Test cases are modular.

  • Buffers are used strategically.

  • The data sources are kept lightweight.

These are rarely mentioned in most beginner blogs but are essential for any Tosca practitioner’s success.

Tosca professionals should be aware that for them to pass in Tosca Certification, they should be able to optimize data flow as opposed to simply running test cases.

Conclusion

Tosca’s ability to harness data from Excel, databases, or structured files is what really sets Tosca apart from other automation tools. Tosca changes testing from a script-based process to a data-based engineering process. Understanding how Tosca works with data, using combinatorial models, buffers, etc., is what makes testers successful with Tosca. This is not a ‘nice-to-have' anymore, especially considering how many industries are moving towards API-first software design.

 

Create a free website with Framer, the website builder loved by startups, designers and agencies.