https://www.qatechies.com

Working With Tosca TBox Process Operations and Resource Handling Modules

Concept

Tricentis Tosca : Working With Tosca TBox Process Operations and Resource Handling  (TBox Start Program, TBox Delete Resource) Modules and Related Interview Questions


Welcome to this Post – “Working with Tosca TBox Process Operations and Resource Handling modules and Related Interview Questions“. This post discusses about the Tosca TBox modules like TBox Start Program, TBox Delete Resource, their available modules attributes and their implementation.

This discussion will also focus on some frequently asked Tosca TBox Process Operations and Resource Handling related interview questions on these modules. The complete post is divided into small sections, discussing the concepts first and then focusing on the implementation and later discuss about some frequently asked Tosca interview questions. So, go ahead and enjoy reading…

Heads Up!

”      Before we start discussing the usage and implementation of Tosca TBox Process Operations and Resource Handling modules present in Tosca, I would recommend if you do not have in depth knowledge on TBox Architecture then please visit the link shared below so that you get an idea on how the TBox framework works when you use the inbuilt TBox modules in your test cases:

To Know more on Tosca TBox Architecture-Click Here

 


Tosca TBox Process Operations and Resource Handling Modules

Just a bit of background!

In today’s, Agile and DevOps environment we frequently come across the requirements of having a sustainable solution to the various project components. This is also because of this reason that led many companies around the world to develop a solution supporting these SDLC methods. In lieu of those big apps, many other vendors have developed small applications to shorten the effort across teams or projects. But these have their own limitations and of course scope. These applications might not necessarily be compatible with the product in focus instead their focus is on shortening the journey to the project goals.

For instance if the product to be developed is web application then team members search for compatible and most recognized tools to support it. These tools can be Putty, WinSCP, etc or any other non commercial tools we can think of. But testing becomes broader in this case which is why to have fewer cycles in development the better is to focus on automating as much as possible. This can only be done if we have concrete requirements to go with and test environments are pretty much supportive. But there are very few automation tools which support third party applications automation unlike Tricentis Tosca, which helps in focusing and achieving the project goal irrespective of the side tools the project is dependent on.

 

Abstract:

In this post “Working With Tosca TBox Process Operations and Resource Handling Modules”, we will focus on two different TBox modules- TBox Process Operations and Resource Handling. These modules especially help in activating, invoking any desktop applications, processes, services that might be required before continuing with the execution and also help in deleting the references that have been opened and followed through the test suite.

In relation to these modules (TBox Process Operations and Resource Handling), many questions arise here depicting some common situations, but main question is: “How Tosca is providing support to the problems related to working with the processes or files in windows?”.

TBox Process Operations

The first module is answering the above question, which is Tosca TBox Process Operations. Also, if you have questions like below:

How can you invoke any process via command line using Tosca?

How to log the details of a process via command line?

How can you pass arguments related to a process via command line?

How can you open IE browser via command in Tosca?

How can you open any browser via command in Tosca?

How to open browser in private mode in Tosca?

How to use waitforexit attribute in Start program module?

Can we close the program after timeout?

My program has special exit code, can I use same while closing via command line?

This module can help in invoking or closing any process with all arguments required to start or stop.

 

The Process Operations has only one Module:

TBox Start Program

Now here comes the interesting part, we can run any program via this module. Suppose I want to start the Firefox in private mode along with some additional properties. These properties can be defined in the arguments attribute.

The official definition says this module can open an application or an executable file. Environment variables can also be used to open any application, which is awesome right!

Point to note here:


You cannot run or execute any program or process out of Windows OS.

***So, if you want to run some external program related to Unix or Linux then you need to create your own module. If you want to learn more on creation of custom modules, please follow below link –

How to create your own custom control in Tosca?

 

The TBox Start Program module has following module attributes:

Attribute Description
Path Specify the Path to the desired application that needs to be opened.
Directory Optional attribute. if you want to use then specify the working directory here for the program.
Arguments This is also optional. You can open any application via arguments also.
Argument Specify individual arguments here.
WaitforExit This is also optional. Specify here whether the system should wait until the process is terminated. You can have Boolean value here True for wait should be considered and vice-versa.
StandardOutputFile This is also optional. Specify the Log file name and path.
TimeoutForExit This is also optional. Specify the maximum time to be waited until the process is terminated.
ExitCode This is also optional. If you have any special exit code for the application, then please specify here.

These attributes correspond to a command from the Windows command line. The command is comprised of these.

Example 1:

In this example, we are opening Putty program using its file path.

tosca-tbox-process-operations-module-example1-opening_putty
tosca-tbox-process-operations-module-example1-opening_putty
tosca-tbox-Start-Program-module
tosca-tbox-Start-Program-module

Example 2:

In this example we are opening the browser using its file path via command line.

tosca-tbox-process-operations-module-example2-opening_IEBrowser
tosca-tbox-process-operations-module-example2-opening_IEBrowser

Example 3:

In this example we are opening the browser in private mode with intended URL, using its file path via command line.

tosca-tbox-process-operations-module-example3-opening_IEBrowser_with_URL
tosca-tbox-process-operations-module-example3-opening_IEBrowser_with_URL

 


Resource Handling

Suppose we are working with xml resource. And post its utilization we don’t want the resource to be referenced anymore. In that case we can use this module. Eventually if our project is quite large and lot of automation testers are working then we can have problems of “already opened resources” and related failure messages like “first close previous instance”.

This TBox Resource handling module answers lot of questions like:

How can you delete the resource in Tosca?

How to remove reference of a xml file?

How to use delete resource for removing reference of an excel file?

How can you remove reference of text file resource in Tosca?

How to solve the concurrency problem in Tosca?

Obviously, this module answers all the above questions and issues which we face while working with resources of xml, excel, etc files.

 

Point to Note here:

There is no background garbage collection happening for these file’s resources which we create while developing test cases. And hence as a good practice we should always delete the reference once usage is over.

The Resource Handling folder has following Module:

TBox Delete Resource

As we have already discussed what it can do and in which situation now let’s focus on the module attributes it has along with the description.

The TBox Delete Resource Module has the following attribute:

Attribute Description
Resource Name of the resource to be deleted.

 

 

Example:

Now let’s see an example of xml file which was opened earlier and now post its usage we want to close and delete the reference.

tosca-tbox-resource-handling-example-xml-delete-resource
tosca-tbox-resource-handling-example-xml-delete-resource

 

 

From the example you can understand that we can only see the opening of xml, creation of resource reference and then deleting the reference. Its quite evident that there will be some steps in between.


Conclusion

Well! all these TBox Process Operations and Resource Handling modules are pretty decent in working and helps in achieving the goals pretty fast. Still if you feel some other functionality would have been provided and could have helped you in solving your problem, then I would recommend that you follow below post to create your own TBox XModule and extend the functionality the way you want, 

Follow Here ==> How to create your own custom control in Tosca?

 

Few questions for you to cogitate on analyzing the problem statement and try arriving at the solution:

 

  1. Can tester use the TBox Process Handling module across the test cases?
  2. Can tester refer the resource value and use it in delete resource module directly in case of the full test suite?
  3. Can tester use partial names instead of complete resource names in the delete resource module?
  4. How frequently should a tester use the delete resource?
  5. Can you build your own custom control on top of the start program functionality?

 

Well, this brings me to the end of the discussion “Working with Tosca TBox Process Operations and Resource Handling Modules ” where we have discussed some concepts as well as some interview questions.

 

I really hope you enjoyed reading the post. If you have any doubt on this please feel free to add your comment below.

And if you like to read more on TOSCA Interview Questions please follow below links:

Tosca Interview Questions – Part 1

Tosca Interview Questions – Part 2

Tosca Interview Questions – Part 3

Tosca Interview Questions – Part 4


If you would like to keep track of further articles on TOSCA, I recommend you to SUBSCRIBE by Email and have new articles sent directly to your inbox.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

advanced-floating-content-close-btn
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5034726663464946 (adsbygoogle = window.adsbygoogle || []).push({});
advanced-floating-content-close-btn 
*************************** Do you want to learn TOSCA? Do you want to excel in Career? Try my New Courses: 1. Tricentis Tosca and Working with Excel   2. Tricentis Tosca and UI Automation Great News!!   Price has been slashed down for limited period of time.So Hurry!!! Click The Shown Links and Enjoy Learning. ***************************
 
error: Content is protected !!