In this age of cut-throat competition, the survival of an enterprise application/product clearly depends on the ‘lead time’ it needs to reach out to the end users with a gamut of new features embedded. The more often the product reaches out to the right customer (of course with good quality), the more is the chance of its success.
Without an automation testing schedule in place, there is no way that we can reduce the length of the release cycle. Undoubtedly, test automation is an important process, but identifying the right automation tool or framework is crucial. At times you might have experienced the need to recommend an automation tool. You may also have wondered why a solution architect chose a particular framework for automation. Through this blog, we will understand the comparison between two important test automation frameworks i.e.Selenium and Sencha Test that will answer this question.
Selenium has been the favorite automation framework of web application developers for the past decade. It started off by providing support to server-based web applications moving on to provide support to modern-day single-page applications (SPA). Selenium is the one-stop solution for all web application automations irrespective of the underlying technology that the product was developed with.
Testing Sencha started with a solid background in its UI experience.
If you need to automate a general web application which is developed with a dev framework other than Sencha, then, the ideal choice of a test automation tool among Sencha and Selenium would be the latter with obvious reasons.
But choosing between Sencha and Selenium becomes tricky and icomplex if the application is intricately developed using the Sencha framework. We have analyzed both the tools in the context of a Sencha-based application and derived the following comparison
We have broadly classified the key differentiating factors into the following high-level characteristics:
- Ease of Adoption
- Ease of Test Scripting
- Easy Maintenance/Execution
- Scalability (Unit, Integration, Functional E2E Tests)
- Compatibility Platforms and OS
- Reports and Coverage
- Other Tools Integration
Ease of Adoption
|Ease of Installation and Use||Easy to Setup and run||It requires Installing and Integrating various tools.|
|Ease of Support||Sencha Test has very good documentation features including videos and also has dedicated support for all technical questions||Selenium also has official documentation in addition to a huge user base and google groups where most of our technical questions can be answered.|
|Cost Efficient||Sencha Test is a term-based licensed product that includes maintenance and Support.||Selenium is open-source software that is free.|
Ease of Test Scripting
|Script creation time||We can create the tests with a quick turnaround and execute them on multiple browsers simultaneously.||It takes significant time to create the test scripts on Selenium|
|Record and play||The Event Recorder is one of the components of Sencha test that captures user actions and inserts code in the Sencha test UI.||The Selenium IDE is used to record and playback.Basically, it is an extension of the Firefox and Chrome browsers.|
|Object Recognition||Considering an extjs application in which IDs are generated dynamically for an HTML element, it is always difficult to detect locators.|
The Inspector is a component of sencha test, where we can find the locators easily.
|In selenium, the user should manually find the locators from the browser using tools like Firebug, FirePath and update them in the scripts.|
Also, we can use Selenium IDE to find the elements.
|Script Execution Time||High||Low|
|Framework||In-built capability to build the Page Object framework.||We have to use the Junit/Nunit/RSpec/TestNg based on the selected technology to create scripts.|
|Application under test||It supports the testing of web and mobile applications. Moreover, one test script can be leveraged across multiple mobile applications and browsers.||It supports only web applications.|
|Assertions||Sencha test by default uses Jasmine, in which we can use “expect” to compare the expected and the actual results.||Selenium uses “Assert” and “Verify” to compare the expected and actual results respectively.|
|Browser Farm Integration||Allows users to run tests simultaneously in multiple browsers opened up on remote machines with just one-time configuration.||To run selenium test scripts on sauce labs/Browser stack, the user will need to configure the properties of the script.|
|Visual Testing||Sencha test supports creating the baseline images for multiple web pages and compares them at subsequent runs.||Selenium requires installing third-party libraries to achieve this functionality.|
|Cross Browser Testing||Sencha Test supports running scripts in multiple browsers.||Supports running scripts in multiple browsers.|
|Behaviour-Driven Development||Sencha test supports BDD for webdriver scenarios.||The Selenium integration with cucumber supports BDD|
|Parallel execution||Sencha Test supports parallel execution for the complete Test suite(not at the test case level). If we want to run everything in parallel, then, consider combining all the tests into one scenario.||Selenium supports the parallel execution of scripts using selenium Grid, Test Ng|
|Unit Testing||Sencha Test supports the unit testing of an ext js app with respect to Class, View, Store, Controller, Model||Selenium does not support the Unit testing of an extjs application.|
|Functional Testing||Sencha test leverages the creation of an automated functional (end-to-end) test strategy for multi-page applications.||Supports functional testing|
Compatibility Platforms and OS
|Test development Platform||It supports Windows (Win 7+),Mac OS X,Linux 32-bit / 64-bit||It also supports Microsoft Windows, Mac OS, Linux.|
Reports and Coverage
|Code Coverage||Sencha Test is integrated with the Istanbul (code coverage tool). It provides a detailed HTML report on breaking statements, branches, functions , lines with percentage analysis.||Selenium by default does not have any code coverage tool integrated into it. We need to configure the coverage tools. It also supports Istanbul, and other UI and backend coverage tools such as Cobertura, OpenCover.|
|Reports||The Sencha Test has a component called “result archive server” where the test results can be stored and viewed later in the Sencha test GUI||Selenium with TestNG provides HTML reports for tests that were executed.|
|Customized Reports||Sencha Test does not support any custom reports.||Using third-party tools like extent reports, we can use Selenium to generate the customized HTML reports.|
Other Tools Integration
|ALM||Sencha Test is integrated with JIRA (defect tracking tool), where a user can take advantage of publishing and reviewing bugs||It is not integrated with any defect tracking tool. Requires additional libraries.|
|CI Integration||Sencha test supports Popular CI tools like Jenkins and TeamCity||Selenium supports various CI tools like Jenkins, Bamboo, Cruise Control.|
|Database connectivity||From sencha test 2.1 we can connect to the database using external node modules||Selenium supports database verification by using JDBC (“Java Database Connectivity”).|
JDBC is a SQL level API that allows us to execute SQL statements
If an application is developed with a framework other than Sencha, then, Selenium will be the wisest choice. Sencha test comes with a certain cost involved which may not be justified just for automation scripts. However, if the product is built on top of the Sencha framework, then it is not going to be an easy task to choose between Selenium and Sencha Test if your product goals and operating guidelines are generic.
However, if certain goals and guidelines of the product are clearly defined then, decision-making becomes easier. If your product has goals like automated unit testing(sencha test), code coverage, and test driven development, then the sencha test is the preferred tool. Sencha Test will allow you to prepare the functional automation scripts in parallel to development which will save a substantial amount of testing time that post-development endeavours require. If your product is being developed on Sencha, but only a limited set of Sencha features are used, then Selenium would be the right choice.
Get in touch with our industry experts for guidance on choosing the right automation testing framework for your applications.
This blog covers the different import attributes that we need to focus on while choosing the test automation framework and it also compares Selenium and Sencha Test w.r.t. how they fare in terms of each attribute. The write-up also provides recommendations on the modalities to choose from among the two automation testing frameworks. Do leave us a comment below about the blog.