Dynamic Test Cases with Tosca’s TestCase Design

🧪 Dynamic Test Cases with Tosca’s TestCase Design

Tosca TestCase Design is a powerful feature in Tricentis Tosca that enables you to create dynamic, data-driven test cases. Instead of manually duplicating test steps for different data combinations, you can define variables and generate multiple test cases from a single design.


✅ What is TestCase Design in Tosca?

TestCase Design (TCD) allows you to:


Separate test logic from test data


Automatically generate many test cases from a single template


Improve test coverage and reduce maintenance


Easily apply equivalence classes, boundary testing, and combinatorial testing


🛠️ How to Create Dynamic Test Cases Using TestCase Design

🔹 Step 1: Create a TestSheet

A TestSheet defines your test data structure. Each row represents a set of input data or a test scenario.


Example:


Country Age Account Type

USA 18 Basic

UK 65 Premium

India 30 Gold


You can enter values manually or import from Excel or databases.


🔹 Step 2: Define Classes and Attributes

Classes: Logical groupings (e.g., "Customer", "Payment")


Attributes: Specific data fields (e.g., Name, Age, Country)


This allows you to reuse the same structure in multiple test scenarios.


🔹 Step 3: Create Combinations

Tosca supports:


Full Combinations: Every possible pair


Linear Expansion: One-to-one mapping of rows


Cartesian Product: All possible combinations across classes


This is useful for boundary value analysis and risk-based testing.


🔹 Step 4: Link TestSheet to a TestCase Template

Use the TestCase Template module to define the generic steps


Map placeholders (e.g., {Country}, {Age}) to fields from your TestSheet


Tosca will dynamically create individual test cases for each data set


🔹 Step 5: Generate and Run Test Cases

Click "Create TestCases" in the TestCase Design section


Tosca generates a separate test case for each data combination


You can now run these test cases like regular tests


🎯 Benefits of Using TestCase Design

Feature Benefit

Data-driven testing Reduce test duplication

Easy updates Modify test data without touching test logic

High reusability Use same templates across modules

Better test coverage Include edge cases and variations easily

Time saving Generate hundreds of tests in seconds


🧠 Example Use Case: Login Test with Multiple Users

Username Password Expected Result

admin 12345 Success

user wrong Fail

guest guest Success


Use a template with login steps and placeholders {Username}, {Password}, {Expected Result}. Tosca will generate a separate test case for each row.


🚀 Final Thoughts

Tosca’s TestCase Design is ideal for:


Large-scale test data scenarios


Automated regression suites


Agile/DevOps environments that require quick updates and scalability


By using TestCase Design, you save time, reduce errors, and increase the flexibility of your test automation.

Learn Tosca Training in Hyderabad

Read More

Test Case Optimization Using Tosca’s Test Data Service

Tosca’s Model-Based Test Automation Explained

Visit Our IHUB Talent Training Institute in Hyderabad

Get Directions

Comments

Popular posts from this blog

How to Install and Set Up Selenium in Python (Step-by-Step)

Feeling Stuck in Manual Testing? Here’s Why You Should Learn Automation Testing

A Beginner's Guide to ETL Testing: What You Need to Know