Home  >  Blog  >   General

Tosca Tutorial - A Complete Guide for Beginners

TOSCA stands for Topology and Orchestration Specification for Cloud Applications. If you want to start a career with Tosca, this tutorial will provide you with all of the information you need on the Tricentis TOSCA Automation Tool, from the basics to the advanced.

Rating: 4.4
  
 
593
  1. Share:
General Articles

Today, it has become a compulsion for upgrading the software testing tools with the best features, thereby creating a friendly environment for the testers. Many software testing tools are available in the market, including QTP (UFT), Selenium, RTF, etc. There is a high demand in the IT industry for an efficient and high-quality service that requires minimum to no human effort.

This is where the need for automation testing arises. In short, an automation service is a service that automates the testing process without much human indulgence. Tosca, the modern automation testing tool, is now giving a formidable challenge to the available tools in the market.

Tosca is a platform that performs continuous testing and helps teams speed up with DevOps and Agile by speeding up testing. The limitations in the traditional testing methods have been rectified by Tosca by opting for cutting-edge functional testing technology. The objective of this tutorial is to provide an in-depth overview of TOSCA, a test automation tool for naive users.

This tutorial will teach you all about Tosca, what is it and why is it used? And also how the test cases are executed, Tosca Commander and Components, and how Tosca modules are installed and executed with the help of Tosca Executor.

Tosca Tutorial: Table of Content

What is Tosca?

Topology and Orchestration Specification for Cloud Applications (TOSCA) is a set of rules given by the industry group OASIS. Tosca has the ability to automate the functional and regression testing scenarios. It is also capable of mobile and API testing, which is mandatory for any product delivery in AGILE mode. Tosca supports scripts that need very little automation i.e., writing of scripts and coding is not required to automate any scenario. This makes it easy to learn about the tool and start developing test cases. Using this tool, the users can build efficient test cases in a serene way and detailed reports are provided to the management.

OASIS is a nonprofit association that sets the rules and regulations which can be supported by the vendors and most of the users on the cloud as well as the telecom market.

Why Tosca?

  • JAVA, HTML, SAP, ORACLE, SOA, etc, are fully supported by the Tosca automation tool. 
  • As there is no requirement for the script, it is efficient and easy to use for the testers.
  • It is easy to configure applications and infrastructure using Tosca.
  • Tosca is offered at reasonable prices and offers good vendor support even after the purchase. 

What is Automation testing?

Automation testing is a service to automate the testing process and scenarios with reduced processing time and requires very little to no human effort. Tosca has challenged QTP (UFT), RFT, and Selenium which were leading the market. 

Automation testing increases the coverage, effectiveness, and execution speed of software testing. It is preferred due to the following reasons:

  • Manual Testing is time-consuming and requires a huge sum of monetary investments.
  • Multilingual sites are not easy to test manually.
  • Automation testing does not require human efforts. The testing can also be left unattended.
  • There is an increase in execution speed by Automation Testing.
  • Test Coverage is also increased in Automation Testing.
Related Article - Tricentis Tosca Automation Tool

What are the Advantages of Tosca?

The following are the advantages of Tosca:

  • All the automation test types have a one-stop solution.
  • This tool does not require a script to function.
  • The desktop applications have drag and drop features which are very user friendly. 
  • The test creation and maintenance of traditional or script-based test solutions are increased exponentially.
  • Management test tools help the testers to a greater extent. 
  • Tosca supports both GUI and Non-GUI. 
  • An explicit framework is not required.
  • The test data and artefacts usage is reduced to a greater extent. 
  • The regression testing time is reduced from weeks to minutes. 
  •  Tosca provides a facility for creating a customized test case portfolio with maximum risk coverage.
  • Tosca allows the creation of dynamic test cases which are less time consuming and object-dependent maintenance.
  • The test case portfolios designed using the building block principles of Tosca are free of any redundancy.
  • Very low maintenance is required at the business and technical levels.

Tosca Architecture

The figure given below is the underlying Tricentis Tosca architecture:

Tosca Architecture

Main components of Tosca

The current version of the Tosca Testsuite comprises the following components:

  • Tosca Commander
  • Tosca Executor
  • Tosca Xscan
  • Tosca Repository

1. Tosca Commander

The Tosca commander is the core backbone that is used to enable the test creation, execution, management, and analysis of test scripts efficiently. The commander utilizes the workspace for the administration of the test cases.

The elements in the Tosca commander are structured and are strictly placed in hierarchical order So that each operation is performed using the object hierarchy.

Tosca Commander

With the help of the drag and drop feature, the user can move the elements within the application. The docking function allows the user to arrange the layout as per the requirement.

2. Tosca Executor

The Tosca commander forwards the test cases to the Tosca Executor that runs the test cases on the test object. The test object includes a series of continuous screens directed by using automated tests.

Tosca Executor

3. Tosca Xscan

Tosca Xscan is used to scan the screens, and their input fields and saves the information as modules in Tosca Commander. These modules include technical information that is used to identify and direct screen elements.

It is also known as the Tosca wizard.

For example in the manufacturing industry, the vehicle data will contain the details of the vehicle as in the figure below.

Tosca Xscan

If you would like to enrich your career and become an Automation Testing Engineer, then enrol for "Tosca Training" This course will help you to achieve excellence in this domain

4. Tosca Repository

If the Tosca Commander operates in multi-user mode, the standard repositories are used to manage projects in databases. 

The following types of repositories are available for multi-user environments:

    • MS SQL Server
    • Oracle
    • DB2
    • SQLite

 MindMajix YouTube Channel

Installation of Tosca

The installation of Tricentis Tosca on your system is explained in a step by step procedure, right from creating a user account to successfully installing the product.

  • Download and locate the "Tosca.exe" file on your computer.
  • Right-click on the "Run as administrator" option on the exe file.
  • Here are some prerequisites to be followed to make Tricentis Tosca work effectively:

Installation of Tosca

  • Click on the Continue button and check the agree box.
  • The below screen is shown after clicking continue.
  • If not previously installed, the Tricentis Tosca prerequisites would be installed.

Tricentis Tosca Setup

  • Click the next button

Tosca Setup - 2

  • Choose the component/type for which you have a license, or simply click "next" if you are on trial to select the default option.

Tosca Setup - 3

  • Select a location to install or click "next" to choose a default location.

Tosca Setup - 4

  • Click on the Next button.

Tosca Setup - 5

  • Click on the Next button.

Tosca Setup - 6

  • To begin the installation process, click "Install."

Tosca Setup - 7

  • Click the "Finish" button.
    Note: The operating system (OS) will be rebooted during the installation procedure. Tricentis Tosca would be installed on your computer once all of the components have been successfully installed.
  • After completion of this step, the system may restart many times. This is all part of the installation process. After the completion of installation, open Tosca License Configuration. After clicking, Tosca License will open and validate your license.
    • Now you have 2 options:
    • Connect
    • Activate
  • You can choose the "Connect" option.

Tosca License Configuration

  • Click on “Connect to Cloud”.

Tosca Setup - 8

  • You can now upload the license file that you provided during registration.

Tosca - Connect to cloud Host

  • The credentials are first authenticated and can be collected on your system when you input the credentials of the support portal with which you've enrolled.
  • The following screen once is displayed once it has successfully connected to the license.

Tosca Commander

  • If you see a No Valid License message rather than this screen, contact your manager for a valid license and then open Tosca License Configuration.
  • By selecting the "Manage," "Tosca Trial" node appears. When you expand it, you'll find the license details for each Trial Package, and also the expiration date.

Tosca License Configuration - 2

  • Now, go to "Checkout Licenses" and select a date on the calendar for whenever you want these licenses to be checked out.
  • This finishes your installation of Tosca, from registration to the final step-by-step installation.
  •  Start your projects by opening Tosca Commander.

Tricentis Tosca

 

 

Creating a new workspace

  1. A new workspace is created in Tosca using the following procedure:
  • Choose Project -> New from the menu options
  • Define your new workspace's repository type:
    • None (creates single user workspace)
    • Oracle
    • B2
    • SQLite
    • Tricentis Cloud
    • MS SQL Server
  • Specify the location in which the workspace must be saved under Create a new workspace.
  • In the field Select name for new workspace, and give your workspace a relevant name.
  • When creating a workspace with a new common repository, the option Use workspace template is available. This option is selected when a subset of workspace is to be imported. 
  • When there is a requirement to build multi-user workspaces for an existing common repository, the Create slim workspace option is available. All objects in the newly created workspace are inactive and out of sync by default. 

Tosca Commander - 2

  • The workspace is created by clicking the OK button.

        A list of all the parameters is displayed in the next window that must be entered to create the workspace. After 3 seconds, this window will close automatically or can be closed manually by clicking the Close button.

Tosca - Workspace

  • A newly created workspace will be opened automatically, and a success dialogue is displayed at the bottom right corner of the screen for at least a minute.

Tosca Workspace - 2

How are the modules created in Tosca?

To create a custom module a custom Keywordhandler is needed.

Creating a custom module in Tosca Commander

  1. Open the Tosca Commander Workspace where to create the module.
  2. In a multiuser workspace check out the module folder where to create the module.
  3. Right-click on the module folder and select "Create->Module" from the context menu or press "Ctrl+N Ctrl+M".

Tosca Module

     4. The name of the module can be chosen freely.

     5. Add an object map to the newly created module by selecting "Create->ObjectMap" on the module's context menu.

Tosca Module - 2

    6. Set the screen type on the object map as defined in the ObjectMappings.dat file.

Tosca Module - 3

   7. Add the parameter "Keyword" to the object map.
      This parameter is passed to the ExecuteKeyword() method and can be accessed as follows.

Tosca Module - 4

Tosca Module - 5

Create a TestCase

To create a new TestCase, follow the steps below:

  1. In Tosca Commander, go to the TestCases tab.
  2. You can create a new TestCase in the main TestCases folder, or you can devise your folder structure.
    To create a new folder, right-click the folder TestCases and select Create Folder from the mini toolbar.

Tosca _ TestCase

3. Create your new TestCase. To do so, right-click a TestCase folder and select Create TestCase from the mini toolbar.

Checkout Tosca Interview Questions 

Executing TestCases

Tricentis Tosca allows you to compile and run all finished TestCases in ExecutionLists. An ExecutionEntry is displayed for each TestCase. The outcomes of the execution, and also their history, are automatically saved to a log file (ActualLog).

The Scratchbook method can be used to run individual TestSteps separately or check TestCases that are yet completed.

ExecutionLists

  • Use an ExecutionList to run your Automobile TestCase:
  • In Tosca Commander, select the Execution tab.
  • Select Create Folder from the mini toolbar when right-clicking on the ExecutionList folder ExecutionLists.

You can use the dynamic menu ExecutionLists to create a folder by left-clicking on the ExecutionList folder and selecting Create Folder.

  • To the new ExecutionList folder, give it the name My first ExecutionList.

Tosca - ExecutionLists

Create ExecutionEntries

You can construct ExecutionEntries in Tricentis Tosca by dragging and dropping TestCases into ExecutionLists.

  • Select the ExecutionList folder with the right-click menu. Select Create ExecutionList from the small toolbar for my first ExecutionList. 

          You can select Create Object from the dynamic menu ExecutionLists by left-clicking on the ExecutionList folder.

  • Give the new ExecutionList the name Vehicle Insurance.
  • Drag and drop your Vehicle Insurance ExecutionList onto your Automobile TestCase.

The ExecutionEntry Automobile is automatically created and linked to the associated TestCase.

Tosca - ExecutionEntries

Run ExecutionLists

  • In Microsoft® Internet Explorer, open the Tricentis Sample Application.

           The sample application must display the start screen for the TestCase to run successfully.

  • Return to Tosca Commander, open the ExecutionLists panel, and select Run from the Vehicle Insurance ExecutionList's context menu. 

You can also select Run from the dynamic menu ExecutionLists by left-clicking on the ExecutionList.

Tosca - Run ExecutionLists

Tricentis Tosca begins the TestCase execution. Once we are done with the Test Case creation with the Tosca Commander TestCases section, we will follow the below mentioned approaches for further proceedings:

  • Execute test cases in ScratchBook
  • Execute test cases from the Execution List

Execute test cases in ScratchBook:

Tricentis advises using the ScratchBook for a dry run (to check the test case readiness) only, as the results do not store for future reference. We also could perform the execution of individual TestSteps.

Executing the test cases from the list of Execution :

The Execution segment provides a feature of selecting and preparing multiple TestCases for execution. Execution performed in ExecutionList will be available for further future reference.

Step-by-step procedure to prepare and run test cases from the Execution Section:

Step1# Create Execution List Folder in the Executions section by selecting the “Create Execution List Folder” icon after right-clicking on any folder.

Step2# Similarly, we need to create our execution List component under the newly created execution list folder.

Step3# We can add the test cases to the execution list from the TestCases section by the drag-drop method. 

Step4# Now, we need to configure the execution behaviour, such as the screen capture mechanism. For our learning purpose, we have enabled Take screenshots of TestStepValues and DockuSnapper.

Step5# Now, we can execute the one, multiple, or entire test cases based on the selection. We execute the test case by pressing the F6 key or clicking on the run button after right-clicking on the selected test cases/ execution list. 

Step6# Understand and process your test results. The execution log is shown with a highlighted screenshot path.

Conclusion:

With speedy testing of applications, it becomes easy for organizations for faster release of products. Automated testing tools are popular because of their effective testing efficiency. With the Tosca automation tool, it is easy to free up manual testing work and reduce testing time and also speed up the delivery rates. With the help of this tutorial, you can advance your career with Tosca. The domain of automation and testing has a huge demand for trained testers to get along with the latest technology upgrades. Tricentis Tosca certification offers better career opportunities. 

Join our newsletter
inbox

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
NameDates
Tosca TrainingMar 30 to Apr 14View Details
Tosca TrainingApr 02 to Apr 17View Details
Tosca TrainingApr 06 to Apr 21View Details
Tosca TrainingApr 09 to Apr 24View Details
Last updated: 04 Apr 2023
About Author

 

Madhuri is a Senior Content Creator at MindMajix. She has written about a range of different topics on various technologies, which include, Splunk, Tensorflow, Selenium, and CEH. She spends most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .

read more
Recommended Courses

1 / 15