Creating Test Steps and Test Step Values in Tosca
Tricentis Tosca is a popular test automation tool that enables teams to perform model-based testing across web, desktop, API, and mobile applications. One of the core concepts in Tosca is the use of Test Steps and Test Step Values, which form the foundation of how test cases are designed and executed.
In this blog post, we’ll explore what Test Steps and Test Step Values are, how to create and configure them, and best practices to make your test automation more maintainable and efficient.
What are Test Steps in Tosca?
A Test Step in Tosca represents a single unit of action or verification within a test case. It can be anything from clicking a button, entering text into a field, or validating a message on the screen. Each Test Step uses a Module (a reusable component created during scanning) and defines how that module is used in a specific test.
Modules in Tosca are like blueprints of UI or API elements that have been scanned from the application under test. When you add a Module to a test case, it becomes a Test Step.
What are Test Step Values?
Test Step Values define what action the test should perform or what value should be verified for each control (field, button, label, etc.) in the Test Step. Each control in the module becomes a Test Step Value in the test step.
Depending on the type of interaction, you can:
- Input data (e.g., enter a username in a text field).
- Verify values (e.g., check if a label contains a specific message).
- Perform actions (e.g., click a button or select an item from a dropdown).
Creating Test Steps in Tosca
Here’s how to create Test Steps in Tosca:
- Scan the Application: Use Tosca’s Tosca XScan tool to scan your application and create Modules.
- Create a Test Case: Right-click a Test Case folder and select Create TestCase.
- Add a Module to the Test Case: Drag and drop a Module onto your Test Case. Tosca will automatically create a Test Step with all the controls as Test Step Values.
- Edit Test Step Values: Enter the desired data or verification values into the appropriate fields.
Example:
Suppose you’re automating a login page with two fields (Username, Password) and a Login button.
- The Module will contain three controls: Username, Password, and Login.
- In the Test Case:
- For Username, enter a value like testuser.
- For Password, enter password123.
- For Login, set the action to Click.
Types of Actions in Test Step Values
You can define various actions using the ActionMode:
- Input: Enter or send data to a field.
- Verify: Check that a value matches an expected result.
- Buffer: Save a value for later use.
- Select: Choose from a dropdown or list.
- Click: Simulate clicking a button or link.
Each Test Step Value can also be enhanced with dynamic values, expressions, or references to Tosca Buffers and Business Parameters.
Best Practices
- Reuse Modules: Avoid scanning the same screen repeatedly. Use reusable Modules to keep tests maintainable.
- Use Descriptive Naming: Clearly name your Test Steps and Test Cases to make them readable and understandable to team members.
- Modularize Test Cases: Break complex workflows into smaller, reusable test cases or modules.
- Parameterize: Use TestCase Templates and parameters for data-driven testing.
Conclusion
Test Steps and Test Step Values are at the heart of Tosca’s model-based testing approach. By mastering how to create, configure, and optimize them, testers can design robust, scalable, and maintainable test cases. Whether you're new to Tosca or enhancing an existing test suite, understanding these concepts will significantly improve your efficiency in test automation.
Learn TOSCA Training Course
Read More: What Are Tosca Test Cases and How to Create ThemVisit Quality Thought Training Institute in Hyderabad
Get Direction
Comments
Post a Comment