Skip to main content

Automation testing for ExtJS application

Automation testing for ExtJS application

Overview

As developers we can create great software. Unfortunately, we usually introduce a few bugs along the way. Using a testing tool can ensure we catch the bugs and resolve them quickly.
There are many different approaches to testing. Some advocate writing the tests within the application, others suggest a separate testing environment entirely. There are merits to both these approaches. For this blog post, I've focused our attention on Selenium as both Ext JS and Ext GWT and benifit from this "black box" testing methodology.
Selenium provides a powerful mechanism to test your Ext applications. Selenium works by executing tests against your running application within the browser of your choice. Selenium tests emulate the way a user would interact with your application by executing JavaScript to simulate user actions. Selenium tests run as a form of "integration" tests as they execute against your running application.
Both Ext JS and Ext GWT applications can benefit from Selenium tests. In fact, with few exceptions, the tests created for one product should be interchangeable as both products produce the same DOM structure.

Selenium IDE

Selenium IDE is a Firefox extension that allows you to create, edit, and execute your tests. Tests can either be created manually, or by "recording" your actions. Recording can help you get a feel on how the Selenium commands are generated, but in most cases you will want to tweak the generated commands.
A Selenium test is a list of commands. Commands can be seen as actions, such as "click this element", "type into this field", and "assert an element exists".

Selenium Grid

Although it is not used in the tutorial, Selenium Grid is worth mentioning. From the website: "Based on the excellent Selenium web testing tool, Selenium Grid allows you to run multiple instances of Selenium Remote Control in parallel. Even better, it makes all these Selenium Remote Controls appear as a single one, so your tests do not have to worry about the actual infrastructure. Selenium Grid cuts down on the time required to run a Selenium test suite to a fraction of the time that a single instance of Selenium instance would take to run."

Summary

The tutorial demonstrated how load and run tests within Selenium IDE. The test code was ported to Java where it was run using Selenium Remote Control in a JUnit. This tutorial demonstrated the major moving parts involved in Selenium tests. It is recommended to take a look at the Selenium documentation and tutorials for more information.
Many thanks go out to the Selenium Team. There is a slight learning curve getting familiar with the product but I found it straightforward. The time was well spent as it opens up a new approach to testing web applications.
Best Practice for Automation Question Feedback Request:
As we develop better tools for producing “end-user friendly” applications, what can I do as QTP automation specialist to provide the best automation tools for my team? We have found that both Selenium and QTP have trouble consistently locating dynamic html id tagged items. There is power in being able to automate testing, but many techniques use to speed up development negatively impacts our ability to automate effectively

Sencha Team says,
You might look into a tool named “Siesta” made by Bryntum. It automates integration tests in a similar manner to Selenium, but it works much better with the Sencha frameworks for specifically the reasons you mention.
In terms of “best practices” for automated testing, the first thing you need to do is decide what your goals are. Testing can accomplish many things - but I always warn that automated tests should never completely replace physical QA testing

References:


Sencha support team suggest Siesta (3rd party tool) for Automation testing.

Jasmine (javascript framework):











Comments

  1. I have read your blog and i got a very useful and knowledgeable information from your blog.You have done a great job .

    My personal guideline is just to respond in a genuine way to what interests me. thanks for sharing...

    Selenium automation testing blog

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Great efforts put to publish these kinds of articles that are very useful to know. I’m thoroughly enjoying your blog. And Good comments create great relations. You’re doing an excellent job. Keep it up.

    Magento Development Training Course in Chennai Zuan Education

    Selenium Training Course in Chennai Zuan Education

    ReplyDelete
  4. I am doing automated testing training so I am very fond of this kind of blogs and I was looking for the same. Thank you so much for this informative blog.

    ReplyDelete
  5. I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well. Workflow management software

    ReplyDelete
  6. Thanks for sharing this valuable post its very helpful if anyone looking for best advanced excel training institute in delhi contact us +91-9311002620 Or Visit Website- Contact Here-+91-9311002620 Or Visit Website- https://htsindia.com/Courses/business-analytics/adv-excel-training-course

    ReplyDelete
  7. Wow admin! An amazing way to help people. You have shared a very useful post I really love it keep going on, thanks for sharing such a wonderful post with us. I wanted to thank you for this websites! Thanks for sharing. Great websites!
    Visit here for Product engineering Services.

    ReplyDelete

Post a Comment

Popular posts from this blog

ExtJS - Grid panel features

What can we do with ExtJS GridPanel? I have to develop a lot of applications in my web app and I see that grid component of ExtJS may fit in. However, I am not aware of what all things I can do with the - off the shelf available framework pieces - available plug-ins in the marketplace and - custom development through my own developers This is a typical question that we hear from the business users who wants to design an application by keeping the framework’s capability in perspective. In this article I have tried to put the list of stuff you can do with grid and hopefully that shall enable you to take advantage of the beauty of ExtJS. Pre-requisites This article assumes that you are familiar with basics of ExtJS What are the available options? In this section I will be taking you through some of the commonly seen usage of ExtJS grid panel. While covering all the capabilities of grid may not be possible, I am sure it will be helpful for the business users who want to...

ExtJS 4 with Spring MVC Example

Introduction When developing a brand new application for the company I work for, one of the first thing I implement is "authentication". Not only is this process generally a prerequisite to access many other functions but it is also very simple and covers every layer of an application, from GUI to the database. So instead of another minimalistic "Hello World" tutorial, here is a "Login/Password" example, using 2 famous technologies : Spring MVC and ExtJS 4.   Prerequisites Because this tutorial is quite long, I won't go into the details of each technology I used but I will mainly focus on how ExtJS and Spring can be nicely used together. So here are the things you should know before continuing : Spring framework (good knowledge) Spring MVC (basic knowledge. See  Spring MVC Official Documentation  for details) ExtJS "application architecture" (see  Sencha Docs  for details) Eclipse IDE + Tomcat 6 (or any other web container) You a...

Ext4 Apply Store Filtering

In extjs4.1: There are many way for store filtering . Some of code i give here Filtering by single field: store . filter ( 'eyeColor' , 'Brown' );   Alternatively, if filters are configured with an  id , then existing filters store may be  replaced by new filters having the same  id . Filtering by single field: store . filter ( "email" , /\.com$/ );   Using multiple filters: store . filter ([ { property : "email" , value : /\.com$/ }, { filterFn : function ( item ) { return item . get ( "age" ) > 10 ; }} ]);   Using  Ext.util.Filter  instances instead of config objects (note that we need to specify the root config option in this case): store . filter ([ Ext . create ( ' Ext.util.Filter ' , {   property : "email" , value : /\.com$/ , root : 'data' }),   Ext . create ( ' Ext.util.Filter ' , {   filterFn : function ( item ) {   return item . get ( ...