Test Workbench Community
  • Home
  • Blogs
  • FORUM
  • About
  • Contact
  • Resources

How the hcl onetest studio perspective of Functional Tester extends Selenium capabilities

4/10/2018

2 Comments

 
Picture
When you hit a URL in a web browser, the request is submitted to the server and the server returns a response. The browser engine parses the received response and renders elements such as text fields, buttons, etc. on the web page as appropriate. Any action performed on a control that’s present on the web page can have any of the following effects:
​
  • A series of requests is sent to the server and responses from the server are collectively rendered as a new page within the browser.
  • A series of requests is sent to the server and responses from the server are collectively rendered as a portion of the page within the browser.
  • Action gets processed on the client side with the help of javascript functions.

OK, so how is that related to test automation?
If you dig a little deeper, you will realize that any operation that you do on a web page must be aligned with how a remote server or a web application would respond. For example, you hit a website and it takes about five seconds to respond, your test script must wait for at least five seconds before going ahead with further operations; that means every operation is controlled by a timeout after which a failure is reported in the test script and a defect in turn as well. Hence, in principle, while creating your test scripts, you must also devise mechanisms for handling “wait durations” and define “timeouts” – not only at a page level, but also at an element level.
 
How would synchronization help?
Synchronization is a mechanism in which two or more components work in parallel with each other. Typically, two components are involved in test automation – the application under test (AUT) and the test automation tool. Either works in a specific speed, and so you should write test scripts in such a way that both components work at the same speed. This will help you keep the dreaded “Element Not Found” errors at bay. Test maintenance after all is a key concern with large test packs; hence, anything you can do to mitigate non-functional failures is a win for your team.
 
In what ways does the Web UI perspective extend Selenium?
You can handle synchronization challenges in multiple ways by using the Web UI Testing capability available within the Functional Tester offering. Unlike in the case of Selenium, you need not write even a single line of code in your tests, which means you don’t have to spend time learning new APIs.

There are two broad categories of synchronization in test automation: unconditional synchronization and conditional synchronization.
 
Unconditional Synchronization
In this case, you only specify a timeout value. The automation tool will wait for the timeout duration before proceeding with further operations.
To pause the execution for a duration specified:
Selenium offers ..
Web UI offers ...
.. the Thread.sleep() API
​.. the Delay or Think time feature
Delay
With the Delay feature, you can pause the test execution for a certain amount of time. To specify a delay, open a test and select any node (in case of a compound test, select a test). Click Insert, select Delay from the context menu, and set a value.

Picture
Think Time
The Think time feature causes the test execution to pause for a specific duration. The value gets captured automatically during recording – it is the difference between when a response is received (that is, when the page is completely loaded on the client side) and when you click a key or a hyperlink, to perform an action. You can also manually update the value by selecting any Web UI test step.
Picture
The Web UI Testing capability also supports a “global” think time, which truncates all think times that exceed the specified value – that means you don’t have to search for and edit each think time (associated with test steps) that’s longer than expected. The possibility of combining global and local think times helps you achieve unconditional synchronization more efficiently.
 
To enable a global think time and set a value, go to Windows > Preferences > Test > Test Execution.

​
Picture
Conditional Synchronization
 In this case, you specify a condition along with the timeout value. The automation tool waits to check the condition and exits when the condition is met. The timeout value is for enabling the tool to proceed with further execution when the condition is not met.
Selenium offers …
Web UI offers ...
​Implicit wait and Explicit wait to achieve conditional synchronization.
Time Out to achieve conditional synchronization.
​Time Out
A time out value causes Web UI test execution to wait until when a control becomes visible for you to perform a UI action (or) the timeout, whichever occurs first. You can set a timeout at a test level (the scope of which is all the steps in the test) and/or at a step level (the scope of which is that test step only). In case of a conflict between a test level timeout value and a step level timeout value, the latter takes preference.
 
To set a time out at a test level, select the top node of a test and open the Mobile and Web UI tab in the Test Details panel on the right and update the value.
Picture
To set a timeout value at a test step level, select a test step within a test and select the Time out check box in the User Action Details panel on the right and enter a value.
​
Picture
You can also set a timeout value for an application launch. This will ensure that the step next to the application launch gets executed after the application launch (or) the timeout, whichever occurs first.
​
Picture
With Selenium, you must learn complex APIs to handle synchronization issues, whereas in Web UI, it is completely GUI-driven and saves you, the tester, the hassle of writing many lines of code.
​
Picture
    NAVANIT K SINGH
     Software Test Architect

Navanit K Singh is a Software Test Architect who is currently working on Rational Functional Tester and Rational Test Web UI Tester. He has more than 11 years of experience in the software industry.

Picture
   ​SHIVI SIVASUBRAMANIAN
   Principal Technical Writer 
​   Integration Tester

Shivi is a senior technical writer who has more than 13 years of experience in the software industry. She's currently a member of the Integration Tester project team and works out of the HCL office in Bengaluru. ​
2 Comments
Harish
5/9/2020 08:55:40 pm

This material is not having sufficient content to start working with tool..... I believe it needs to be more matured... Also considering the fact these are the features of RFT, those are no more useful in Ajax/Angular world.. How much Angular JS or React JS technologies we support... How do handle asynch calls arising out of one single request... Use of latest terminologies also a must...

Reply
Navanit Singh
5/14/2020 04:02:53 am

Hi Harish,
Thanks a lot for going through blog.
It focuses on how to handle synchronization challenges encountered during automation using HCL One Test UI Functional tester tool. For info on how to start using tool, please refer following online help materials:
https://hclonetestui.hcldoc.com/v1002/help/index.jsp
Functional Tester has generic support for mentioned technologies, and it looks at the html controls from GUI actions side with visible properties to be located during playback. Therefore, as long as GUI automation can be taken care, application underlying functionalities should not matter much. In any special case of specific application behavior, you can write your own JavaScript snippet and run along with Functional Tester test.

Reply



Leave a Reply.

    Archives

    March 2020
    September 2019
    August 2019
    June 2019
    April 2019
    October 2018
    September 2018
    August 2018
    July 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017

    Categories

    All
    API Testing
    Embedded Testing
    Functional Testing
    Performance Testing

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blogs
  • FORUM
  • About
  • Contact
  • Resources