Introduction
Achieving efficiency in test automation depends on high reuse and minimal redundancy. Manually scripting every variation of a test is not only time-consuming but also difficult to maintain. Data Driven Testing in tosca solves this challenge by separating test logic from test data, enabling testers to validate the same functionality against multiple input sets seamlessly.
In TOSCA Training, Data Driven Testing in TOSCA is emphasized as a fundamental skill because of its real-world relevance. By leveraging Excel integration, Tosca users can dynamically generate test cases, refresh datasets, and scale test execution. This methodology is also a vital focus area in preparing for TOSCA Certification Validity and is covered extensively in any structured TOSCA Automation Course Online.
What is Data Driven Testing?
Definition
Data Driven Testing in TOSCA is a technique where a single test case is executed multiple times with different sets of input data. Instead of duplicating logic, external datasets (commonly Excel) provide variation. In practice, Data Driven Testing in TOSCA ensures efficiency by separating test logic from test data, making automation scalable and maintainable.
Benefits
- Eliminates duplicate test cases
- Increases test coverage
- Simplifies maintenance
- Provides flexibility for regression testing
Example: A login test can run with 20 different user credentials stored in Excel, without writing 20 separate test cases.
Preparing Test Data in Excel
Tosca supports Microsoft® Excel templates located at:
C:\Tosca_Projects\ToscaCommander\Templates\BO
or
%TRICENTIS_PROJECTS%\ToscaCommander\Templates\BO
These templates are pre-built for consistency and minimize errors when Tosca reads data.
Steps:
- Open the template in Excel.
- Add headers such as Make, Gender, and Domain.
- Populate rows with multiple datasets.
This ensures each row corresponds to a unique test execution.
Creating and Converting a Test Case
Step 1: Create a Base Test Case
- In Tosca Commander, build the test case using required modules.
Step 2: Convert to Template
- Right-click → Convert Test Case to Template.
Step 3: Attach Excel File
- In Test Case Properties, locate Schema Path.
- Add the Excel file.
- Select the sheet name.
Step 4: Map Fields
Use Tosca’s mapping feature:
{XL[Make]}
{XL[Gender.Female]}
Creating Template Instances
Once mapping is complete:
- Right-click the Test Case.
- Click on the three dots (…).
- Select Create Template Instance.
- Confirm and click OK.
Tosca generates template instances for each row in Excel.
Executing Test Cases
- Right-click on a Template Instance.
- Run in the Scratch Book.
- Each Excel row executes independently.
Updating Test Cases with New Data
When new records are added to Excel:
- Right-click Template Instance.
- Select Reinstantiate Instance.
- Tosca updates fields with refreshed values or creates new instances.
Test Data Fetching and Settings
Tosca allows you to configure Excel settings for data binding:
Path:
Settings → TestCase From XL → TestSet
This controls how Tosca pulls values, manages domains, and applies them during execution.
How Data Driven Testing is Used in Tosca
Object / Attribute Mapping
Tosca uses Object / Attribute relationships to ensure data binds correctly.
- Domain Field: Organizes test data into contexts.
- Users Domain → Login scenarios
- Orders Domain → Checkout and payment
- Users Domain → Login scenarios
This approach ensures correct test data is applied in the right business context.
Example: E-Commerce Checkout
- Excel Data: Store multiple users, product IDs, and payment methods.
- Mapping: {XL[User]}, {XL[Password]}, {XL[ProductID]}, {XL[PaymentType]}.
- Instantiation: Tosca generates test runs for each dataset.
- Execution: Scratch Book runs scenarios independently.
- Reinstantiation: New products or users added in Excel automatically create new runs.
This illustrates how enterprise test suites scale with Data Driven Testing in tosca.
Mapping Related Documentation
According to official Tosca documentation:
- Test Data from Excel: Tosca can bind any test case property to Excel datasets. Read more here.
- Combining Templates: Multiple templates can be merged to handle complex scenarios with hierarchical data mapping. Read more here.
These practices are emphasized in TOSCA Training Material, helping learners understand real-world project requirements.
Best Practices
- Keep Excel Clean – Avoid empty rows and merged cells.
- Use Descriptive Headers – e.g., “ProductID” instead of “P1”.
- Reinstantiate Regularly – Ensure datasets are up-to-date.
- Group with Domains – Logical grouping improves manageability.
- Document Data Fields – Maintain a reference guide for all Excel fields.
Data Driven Testing in TOSCA Training
Why it matters:
- TOSCA Certification Validity: Requires proficiency in handling Excel-driven automation.
- TOSCA Training Material: Teaches Excel integration as a key module.
- TOSCA Automation Course Online: Dedicates sessions to scaling automation with external datasets.
By mastering these, professionals ensure they can deliver scalable, maintainable, and robust automation frameworks.
Key Benefits
- Scalability: Add new rows in Excel → new test cases instantly.
- Maintainability: Update data instead of rewriting tests.
- Coverage: Validate positive, negative, and edge cases.
- Reusability: One template → unlimited scenarios.
- Efficiency: Faster regression cycles with minimal rework.
Key Takeaways
- Data Driven Testing in tosca executes the same test logic across multiple datasets.
- Tosca integrates Excel templates easily with TestCase From XL.
- Template instances ensure scalability and maintainability.
- Domains provide structure and organization.
- Skills in Excel-driven testing are essential for certification and real-world application.
Conclusion
Data Driven Testing in tosca transforms Tosca automation by combining flexibility with scalability. With Excel integration, testers gain the ability to validate multiple scenarios quickly, maintain tests efficiently, and ensure business workflows are thoroughly verified.
Master Data Driven Testing in Tosca today to boost efficiency and stay prepared for future projects.