Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Wednesday, 24 January 2024

Tosca Interview Questions and Answers

Q: Can you explain what TCShell is and its uses?

TCShell is a command-line tool provided by Tosca. It allows for the automation of various Tosca processes like executing test cases, updating the project structure, importing and exporting project data, and so on. It's a powerful tool that enhances automation and efficiency in managing and running Tosca tests.


Q. What is a Class in the TCD ?


A Class allows an Attribute to be reused multiple times. 


Using Classes : 

1. Similar to the Library concept, Classess can be reused.

2. Classed Can also contain whole structures and combinations

3. Classes should be created if redundancy is expected.

4. In a TestSheet, classes are shown as a reference.

5. Classes can save time and effort.

6. Classes and their references are updated automatically


Four ways to creating a Classes : 


1. Create Class manually on TestCaseDesign folder with the context menu.

2. Drag & Drop existing attribute from TestSheet onto a folder.

3. Extract Class from an entire TestSheet.

4. Derive Class from a Module in the Modules session to use the values.

Q: Can you list the different types of errors one might encounter in Tosca?

A4: There are several types of errors you could encounter in Tosca:

  1. Test configuration errors: These occur if the test environment isn't set up correctly.
  2. Execution errors: These occur when test cases fail during execution.
  3. Syntax errors: These occur when there's a mistake in the test data or a keyword is used incorrectly.
  4. System errors: These occur when there's a system failure or issue.

Q. Could you name the main components of the Tosca TestSuite?

A2: The main components of the Tosca TestSuite are the Tosca Commander, Tosca Executor, and the Tosca Repository. Tosca Commander is the central component for creating, maintaining, and executing test cases. Tosca Executor handles the execution of the test cases, and the Tosca Repository is used for storing and managing all the test artifacts.

Q: Can you describe some of the key features of Tricentis Tosca?

Tricentis Tosca is a leading automated testing tool that leverages model-based test automation to drive improvements in software quality. Some of its key features include:

  1. Risk-based testing: Tosca identifies areas of high risk in your application and prioritizes those for testing.
  2. Model-based automation: This approach helps minimize the maintenance required for your test cases.
  3. No coding required: Tosca uses script-less automation, which allows for quicker test case design and implementation.
  4. Cross-browser testing: Tosca supports testing across multiple browsers and platforms.
  5. Integration with various CI/CD tools: Tosca integrates with other tools in the DevOps pipeline, improving overall collaboration and efficiency.

Q.API Testing In TOSCA:

Tricentis Tosca, which simplifies API testing using a codeless, model-based approach.The Tosca API Scan provides a simple, no-code solution that supports the easy creation, management, and execution of automated API tests. One can easily test the performance and error handling of your API with its rapid end-to-end tests. To put it simply, it lets you design and automate API test cases. 

The TOSCA  API testing process is as follows:

API Services: Determine the API details and functionality for automation.

API Scan: After scanning the API for a specific system, the API scan feature allows you to create Tosca modules.

Create Test Case: Create test cases and perform cleanup with parameterization.

Run: Execute tests and share reports with stack holders.

Q3.How do you create a testsheet in Tosca

As part of the TestCase-Design process, TestSheets are used as the main framework. The purpose of TestSheets is to organize/manage test data to follow a logical testing process. A test sheet should cover each requirement of the application. Below are the steps for creating a TestSheet: 

Step 1: To begin with, right-click on the folder where you'd like to create a TestSheet.

Step 2: From the mini toolbar, select Create TestSheet.

Step 3: Specify the name of your TestSheet.

Q4.TCShell

The TC-Shell is the command-line controller of Tosca Commander, it providing access to most of Tosca Commander's functionality. It has two different modes of execution: interactive and scripted.  

1. In interactive mode, the user is offered assistance and options and can access all of the functions of Tosca Commander's GUI (Graphical User Interface). 

Example - execution of tests without opening the Tosca Commander. 

2. In script mode, Shell runs commands from a script data file, so we must write a series of commands on a script data file and then run them. Users cannot intervene in this process. This mode is used for automating processes, for example, for working with an extensive portfolio of tests without supervision.

Q5.Configuration parameter

To configure your tests, you can set configuration values through test configuration parameters. The test configuration parameters give you the ability to set parameters for Tosca objects. You can simplify the maintenance of your tests and reduce repetitive tasks by setting specific values to test configuration parameters. For example:  

  1. Versions of test objects, such as release numbers.
  2. Various test environment identifiers, for instance Windows 7.
  3. Connection identifiers, such as URLs and parameters.
  4. Identifiers of business process chains.

You can create test configuration parameters for the following Tricentis Tosca objects: :
  1. Project root element
  2. ExecutionList
  3. Component folder
  4. ExecutionEntry folder
  5. Configuration's folder
  6. ExecutionEntry
  7. TestCase folder
  8. Scratchbook
  9. TestCase
  10. TestCase-Design folder
  11. ExecutionList folder

Q6.Template

In Tosca, templates are structured/conventional formats that can be reused to create concrete TestCases. It is possible to convert test cases that have very similar steps into templates so that they can be used for a variety of data combinations. Data from test datasheets are used in the template. When you instantiate a template, you convert a single test case template into several test cases using the test data that you supply as input to the template.

Explain the template and process to create : The templates in Tosca defines a unique test flow with the help of modules. Instead of actual data, the data parameters from the TCD are linked with. Generally, the template is nothing but something in a conventional format. The Technical test case can be converted to the template by right-clicking on it. The template uses the data from TCD datasheet.


Q6.How to launch more than one browser in Tricentis TOSCA?

 Ans: Launching multiple browsers is not possible in TOSCA. But the user can achieve cross-browser execution. 

To perform cross-browser execution, users need to follow the below steps: 

  1. A Test Configuration Parameter “Browser” should be designed either at TestCase or its Parent Levels.
  2. Users can choose the value as InternetExplorer, Firefox, Chrome.
  3. The individual browsers will trigger executions. 

Q7.Cross-Browser execution

In Tosca, we are not able to trigger multiple browsers at once, but we can perform cross-browser execution. In order to automate TestCases with applications that have to run on different browsers, buffers can be used. The test configuration parameter can be changed at runtime using buffers, and the browser to be used can be specified using the TBox Set Buffer. The following steps need to be followed in order to perform cross-browser execution:  

  • Design a Test Configuration Parameter “Browser”.
  • Using the buffer, change the value of the Test Configuration Parameter to [B[Browser]].
  • Specify which browser should be used using the TBOX Set Buffer. Users have the option of selecting Internet Explorer, Firefox, Chrome, etc.
  • Executions will be triggered by individual browsers.

Q8.Object Identification in TOSCa

In Tosca, objects can be identified in four different ways as listed below: 

Identify by properties: By default, Tosca XScan identifies objects by their properties. All technical information and the properties of an object can be found in the Identify by Properties window.

Identify by Anchor: The technical properties of objects can be used in Tricentis Tosca to identify other objects.

Identify by image: Tosca can identify objects by capturing a screenshot of the object.

Identify by index: In this case, the object is identified by its index. If an object selected does not have a unique ID, you can specify an index to be used to identify the object at test execution.

Q9.Recovery Scenario

Recovery scenarios are used to recover from the failure of a testcase/teststep. During test execution, if for some reason your test case fails (this could be any reason), the Recovery scenario ensures that the next test case after that failed test case will proceed normally. This will ensure that the following test case runs correctly, without any impact from the previous test case. There are two conditions in which recovery is possible i.e., dialog failure and verification failure. When a recovery scenario fails, Tosca then tries the next higher level recovery scenario, and if all recovery scenarios fail, it reports the test case as failed.

Q10. Limitations of ScratchBook in TOSCA

Ans: The temporary execution logs are stored in ScratchBook. During the test development, we used this option for temporary execution to check the script correctness.

If the action within a test step is executed repeatedly, the details will not be available. Also, the execution logs are not available permanently.

Q11.What are the different status available after post-execution in Tosca?

Ans: By default, Tosca provides four different states after test execution. Those are –

  1. Passed
  2. Failed
  3. No result
  4.  Error
Q12. Explain Test Data Management.

Test data management enables you to deal with the test data necessary for test execution. The data driven test automation is possible with the help of TCD (Test Case Design). The test sheet of TCD represents the template where we can create the instances which are representing the test data for individual test cases. Again, we can create the attributes with in test sheet that represent the each data parameters and the data values can be created with in attribute as instances with in it.

For data reusability, we can define classes. After creation of TCD, the test sheets with different data sets can be mapped with template test case from where we can generate different test cases based on the different data. The test case creation process is known as instantiation of the template test cases.

Q. Benfits / Advantages of Using Tosca.

  • All-in-one tool with multiple features like support for model-based and risk-based testing approaches, automate both UI (User Interface) and non-UI applications, etc.
  • Testers can enjoy a script-free experience when testing various applications. There is no need to write scripts and since scripting is not required, people obviously use it more often and more effectively.
  • Able to cater to both small-scale and large-scale applications using Agile test methodology.
  • Provides support for most common technologies such as SAP (System Applications and Products), Oracle, Java, SOA (Service Oriented Architecture), HTML (Hypertext Markup Language), and so on.
  • Available at a reasonable cost, and provide a user-friendly GUI (Graphical user interface)
  • As a result of its risk-based and model-based approach to test automation, Tosca simplifies end-to-end regression testing and reduces the time required for it.
  • Copy-paste functionality for test cases and modules and the possibility to reuse assets.
Q.How to Handle same title of two different tabs usingTosca 

With the help of Constraint index will handle like this scenario.

1. Open the Module
2. Navigate into Module Properties 
3. Right click on Module properties and add configuration parameter is Constraintindex and give index is 1, so always it will do operation on first opened tab.

Q. How to close all opened Multiple instances and browser tabs  before executing script in Tosca.

With the help of TBox Start Program Module we can close all the opened instance and browsers. 

Steps to close all opened chrome/edge/firefox browsers
1. Press Ctrl+T
2. Select TBox Start Programme
3. Fill below details in the module and click run button.

Path - taskkill
Argument - /f
Argument - /im
Argument - Chrome.exe/ msedge.exe/ firefox.exe



Q. How to Identify Elements Using Properties. 

We have four kind of propeties which we use usually to identify elements in the browser. 

Type of properties in tosca -

1. Steering Properties 
2. Representation  Properties
3. Technical properties 
4.. Transition Properties  {Ex- XPath}

If above are not suffienet to identify elements we can use below option which is tosca going to identify unique elements. 

1. Make Unique - If we clicking this option tosca itself identify unique elements

If above one also not suffient to identify the elements then we can use More Option button and select below  mentioned options and find the unique properties.

2. More - 
  • Load All
  • Defined default ID on engine level
  • Define default ID on application level
  • Reset defined default Id
  • Refresh
Q. Action Modes in TOSCA

ActionModes are used to steer the test object. They define how the value in the Value field should be applied for XTestStepValues in order to steer the control.

The ActionModes available to an XTestStepValue depend on the InterfaceType of the referenced XModule.

ActionModes perform reading or input operations on a control. Reading operations read the property that is defined for a control. Input operations modify the defined property during test execution.

ActionModes for input operations:
1. Input
2. Insert
ActionModes for reading operations:
3. Buffer
4. Constraint
5. Verify
6. WaitOn
7. Select

Input -  Input can be used to transfer values to the test object.
InsertAllows to create objects in non-visual, non UI, Interface environments. Used in XML or notepad or excel
Buffer  - Buffer in messages to save values. The values can be used later for input or verifications. Temporary variable.
Constraint -  ActionMode Constraint limits the search for parent node.
Verify - To verify values, I.e whether the value in the message matches the value in the scenario.
WaitOn - Interrupts the execution of the TestCase until the indicated property has the specified
Select -  Allows to select specified nodes

Q. Best Practices in TOSCA 
  1. Use Proper Naming Conventions for all objects like Test Case, Test step Library, Test Design Sheets.
  2. Create separate folder for Template and References in Test Case Design section.
  3. Specify the Test Step Libraries and Standard Tosca Modules in Separate Folder which can be accessed globally for all objects.
  4. Use “In work”,”Ready for review” and “Approved” before Test Cases names for identification of Test case status.
  5. Make Sure no Empty folders has been created in any of the sections.
  6. Create Reusable test case only if intended to be reused.
  7. Use Test Configuration Parameters in Test Case folder for generic variables. Example:Browser, URL, System.
Q. What is the Tosca Test Suite?
Tosca Test Suite is an automated software tool. Regression and functional software testing make use of these test suites. Various tools integrated with the test suite are:
  1. CLI(Command Line Interface). 
  2. GUI(Graphical User Interface).
  3. API(Application Programming Interface).
Q. What is instantiation in Tosca?
The process of creating an instance test case is known as instantiation. These are template-based test cases defined under the test case design section. Instantiation in Tosca is also known as data-driven testing.

Q. How to fetch Excel data using Tosca?

Data from Excel can be fetched in two ways-

  • For a single test to be tested against different datasets, ‘TemplateInstances’ can be used. Using this you can create test cases using a data set. Then excel data can be imported and used in these test cases.
     
  • If data imported from external sources are used, then you can use the modules provided by Tricentis under the name Excel Engine. 

Q. What is TDM(Test Data Management)?

TDM manages the test data required for the execution test. TDM is part of the Tosca Testsuite standard. For MS SQL Server, DB2, and Oracle repositories, Tosca and TDM use the same database. For SQLite repositories, TDM creates a separate repository.

Q. What are templates?
The Templates define a unique workflow with the help of modules. The template links the test case design parameters together. By right-clicking, you can convert a technical test case into a template. The data used by the template is present in TCD(Test Case Design) sheet.

Q. What are the steps for creating a test case template in Tosca?
We need to follow the below-mentioned steps to create the TestCase template –

1. Create a Test case based on the user’s requirements. 
 
2. We can convert the technical test case into a template by selecting the context menu option “convert to the template” after right-clicking on the test case.
 
3. Drag and drop the required test sheet onto the desired TestCase Template.
 
4. Assign the TestSheet attributes for the required TestStepValues using the XL tag.

Q. Can we launch multiple browsers in Tosca?
No, you cannot launch multiple browsers in Tosca. But to achieve this follow a few steps –

1. The TCP(Test Case Parameter) needs to add a test case with the name “Browser”.
 
2. Use the “Browser” values to launch the corresponding web browsers.

Q1.Components in TOSCA:  
The Tosca Testsuite consists of four main components:

1. Tosca Commander:
 
Tosca Commander is the tool's central component for creating, managing, executing, and analyzing test scripts. Tosca Commander is divided into five pieces.
  1. Modules: This section stores all of the Modules (the test object's technical information).
  2. Testcase: This part contains the technical components of all test cases.
  3. TestCaseDesign: This part is responsible for organizing and isolating the test data from the test case. This section's primary goal is to avoid modifying the test data by touching the technical test cases.
  4. Execution: This section preserves a log of test execution results in the execution lists. It is mainly used to control the execution of tests.
  5. Requirements: This section contains all of the requirements-related data.
2. Tosca Wizard:(Tosca XScan)

We need to scan the application and construct modules (object maps) to automate test automation. The old model of application scans is Tosca wizard. It can also be opened from the Commander as a standalone component.
3. Tosca Executor:

The Tosca Executor program is used to run Tosca test cases. This is an alternative to opening the Tosca commander to test execution. We can access the Tosca executor through the Windows start menu: Tosca Executor can be found in Start-> All Programs-> Tricentis.
4. Tosca Repository:

External shared repositories/databases, such as Oracle, SQLServer, SQLite, and others, can be used to store test cases. In Tosca, test data can also be stored in an external repository using processes like TDM – Test Data Management and TDS – Test Data Service. Several testers can work simultaneously with the help of the test repository.