Sencha Test is a sophisticated tool that offers you full flexibility in writing tests for your web applications. Before starting with Sencha Test we suggest answering the following questions:
Table of Contents
What type of tests would suit your requirements?
You need to decide what kind of tests should be written and run as WebDriver and In-Browser tests. The In-Browser option works great when your tests need access to the application and Ext JS classes, for example for unit tests. However, In-Browser tests are suitable only for single-page applications. You could use WebDriver tests for all kinds of applications, including multi-page apps. If you choose WebDriver tests, you will not get access to your application or Ext JS classes and will need to test the app as a black box. WebDriver tests are an ideal option for End-to-End tests.
What browsers / browsers farm will you use to run your tests?
You need to decide where you are going to run your tests: are you going to use local browsers, local or external Selenium server, or an external browser farm like Sauce Labs or Browser Farm? Setup and maintenance of the Selenium server will require more time and effort but it could be necessary if you have a strict data protection policy and if you are not allowed to use external cloud-based resources to execute tests.
What component locator strategy should be used for your application?
Application developers and QA engineers need to define a consistent and stable locator strategy that should be used to identify Ext JS components in your application. It could be a combination of xtypes, itemIds, references, iconCls, cls. Properties like fieldLabels, titles, texts should be used with care if you have localization in your application. The html selector could also be used if your applications are based on the stable html attributes defined by developers and not by the framework.
What folder and scenario structure would suit your application structure?
Next, you will need to decide what folder and scenario structure suits your application structure best. You will need to decide if it makes sense to split your tests by the functional part of the application or application module, or by the UI component. Another option to consider would be to split them by the test type: unit, UI unit, End-to-End tests.
How and when will you execute your tests?
And the last thing you need to define is how and when you will execute your tests. You could run tests manually from Sencha Test Studio or using Sencha Test CLI – stc. It could work for small teams that are not using a dedicated CI server. Or you could execute tests directly from your CI system (Jenkins, TeamCity or any other) according to the fixed schedule or every time developers send a push request.
If you’re a new or existing Sencha Test customer, you’ll be ready to get started once the questions above have been answered. If you’re not using Sencha Test, we encourage you to try Sencha Test free for 30-days – sign up today!
Leave a Reply