Tosca Standard Modules Explained
Tosca TBox Modules and Their Uses: A Complete Guide
Tosca by Tricentis is a powerful automation tool widely used for functional and regression testing. At the heart of Tosca’s no-code, model-based automation lies the TBox framework.
In this blog, you’ll learn what TBox Modules are, and how to use the most essential ones to create powerful and maintainable test cases.
π§± What is the TBox Framework?
The TBox (TestBox) Framework is a core engine in Tosca that provides standard modules (reusable functions) to:
Interact with UI elements
Perform logic and calculations
Execute test steps without scripting
TBox Modules are technology-agnostic — they work across Web, Desktop, SAP, Mobile, and more.
π¦ Where to Find TBox Modules
TBox modules are located in Standard Modules > TBox in Tosca Commander.
You can drag and drop them into test steps.
No need to write code — just set values and attributes.
π Top TBox Modules and Their Uses
Let’s explore the most commonly used TBox modules with examples.
1️⃣ TBox Set Buffer
Use: Stores a dynamic value in a buffer to reuse later.
π Example: Store a generated email to use in later steps.
2️⃣ TBox Set Value
Use: Sets a specific value into a field (text boxes, dropdowns, etc.)
π Example: Enter email into a login form.
3️⃣ TBox Get Value
Use: Extracts a value from a field and saves it to a buffer.
π Example: Capture the displayed total price on a checkout page.
4️⃣ TBox If
Use: Conditional logic — executes test steps based on conditions.
π Example: Only proceed with shipment steps if the order is confirmed.
5️⃣ TBox Do
Use: Groups multiple test steps — like a container.
π Example: Combine multiple UI actions like login into a single group.
6️⃣ TBox Loop
Use: Repeat a set of actions multiple times.
π Example: Add 3 items to cart using the same steps.
7️⃣ TBox Wait
Use: Add wait time between steps (static or dynamic).
π Example: Wait for page load or animation to complete.
8️⃣ TBox Evaluation
Use: Perform calculations or logical evaluations.
π Example: Calculate price after applying tax.
9️⃣ TBox File Operations
Use: Read/write files, especially for validating downloaded content.
π Example: Check if a PDF was downloaded and contains the correct text.
π TBox Date and Time Operations
Use: Handle date-time formatting, addition, subtraction.
π Example: Enter a date 7 days from today in a booking app.
π§° More Useful TBox Modules
| Module Name | Use Case |
|---|---|
| TBox Merge Strings | Combine multiple values into a single string |
| TBox Delete Buffer | Remove a buffer after use |
| TBox Regex Match | Extract specific text using regex |
| TBox DB Expert | Run SQL queries during test execution |
| TBox Excel | Read/write Excel files for data-driven tests |
| TBox Clipboard | Interact with the clipboard (copy/paste) |
| TBox Restart | Restart the application or session |
| TBox Return | Exit current module chain if needed |
| TBox MessageBox | Display custom alert messages during tests |
π§ͺ Example: Real-Life Test Scenario Using TBox
Let’s say we are automating an eCommerce checkout process:
Step-by-Step Breakdown:
| Step | TBox Module Used |
|---|---|
| Open login page | TBox Set Value |
| Enter username & password | TBox Set Value |
| Click login button | Standard click |
| Store cart value | TBox Get Value |
| Apply discount | TBox Evaluation |
| Proceed if cart > ₹500 | TBox If |
| Confirm order | TBox Set Value |
| Capture order ID | TBox Get Value |
| Store it in buffer | TBox Set Buffer |
| Loop over 3 items | TBox Loop |
π§© Combining TBox Modules with Controls
TBox modules can be linked to UI controls:
Enter data into forms
Read labels and error messages
Validate popups and dialogs
π Example:
π§ͺ Benefits of TBox Modules
✅ No scripting or code
✅ Technology-independent
✅ Easily reusable across projects
✅ Simplifies dynamic test design
✅ Supports data-driven and keyword testing
π§ Tips for Using TBox Efficiently
Use buffers to pass dynamic data between steps
Use
TBox Iffor smarter test flowsUse
TBox Evaluationfor calculations instead of ExcelGroup logical steps using
TBox Dofor clarityUse
TBox Modulesin Business Components for reuse
π§ͺ TBox + Classic Modules?
TBox is more modern and stable than classic modules
Prefer TBox for:
Web apps
Mobile apps
SAP GUI
You can still use classic modules if needed for legacy tests
π Security & Best Practices
Avoid hardcoding sensitive data
Store test data in external Excel or TestSheets
Use
TBox Waitsparingly — prefer implicit waitsModularize reusable logic using
Business Components
π Final Thoughts
TBox Modules are the secret weapon in Tosca's automation toolbox. They let testers:
Automate complex scenarios
Use logic and loops
Work with data without scripting
Whether you're testing a website, a desktop app, or an enterprise tool — mastering TBox will make your automation more powerful, readable, and maintainable.
Comments
Post a Comment