Posts

Showing posts with the label Test automation

Automation Tool Feasibility Analysis

During this phase focus should be primarily on identification of test automation tool(s) from the technical perspective. The finalization of tool can be worked upon later after due diligence of all factors collected, during this phase. Prerequisites Test environment should be ready and available for feasibility analysis 24*7 This environment must be dedicated for tool feasibility activity to avoid any schedule slip & test data corruption Identification of test scenarios & test data Number of scenarios should be minimal (to avoid high commercial cost) Should cover all screens & all possible unique UI components of the application (e.g.) Editing of Grid control Picking dates from Calendar Filtering and selecting items in ListBox Attachments of Files Popups Trees & Submenus Reading value from Graphs (Bar, Chart etc.) Dragging and dropping of items All scenarios must be accompanied with

Sin of Using Thread.sleep() in Selenium Scripts for Waits

Wait problem is probably the most common errors in Selenium scripts especially for Javascript rich web applications. How long a Selenium script should wait before interacting with web elements? 2s / 5s / 15s / 1min? Until interested page is loaded? Until all images of a page are downloaded? Until all AJAX requests have been completed? Until all manipulation of DOM elements is complete? It has been observed that people frequently wait for a fixed duration in their Selenium script using Thread.sleep() function before interacting with a web element. It is a worst kind of wait that can be used in a script. Then, why people use it? One reason could be ignorance but mostly it could be due to carelessness or unavailability of time to complete a quality (stable) script. What are some ways to discourage team members to not use Thread.sleep() or similar method in t

Best Practices for Unit Test Case Automation

Make each test orthogonal (i.e., independent) to all the others Any given behavior should be specified in one and only one test. Otherwise if you later change that behavior, you’ll have to change multiple tests Don’t make unnecessary assertions Which specific behavior are you testing? It’s counterproductive to Assert() anything that’s also asserted by another test It just increases the frequency of pointless failures without improving unit test coverage at all Have only one logical assertion per test Unit tests are a design specification of how a certain behavior should work, not a list of observations of everything the code does Test only one code unit at a time Architecture must support testing units (i.e., classes or very small groups of classes) independently, not all chained together If you can’t do this, then your architecture is limiting your work’s quality – consider using Inversion of Control Mock out all external services and state Yo

Automation Testing Tasks

In case you are looking for hundred percent test automation for yours project, then you need to consider automating following tasks before considering yours automation to be complete including ‘automating the test scenarios’. As per Mark Fewster and Dorothy Graham – “A mature test automation engine will allow testing at the ‘touch of a button’ with tests run overnight when machines would otherwise be idle”.   Automating the test scenarios Configuring the testing environment Starting/Shutting down Virtual Machines (VM), in case virtualization is being used Add VM and snapshots to the system Grouping of VMs Install product for testing Copying the necessary configuration files to the required machines Connects the network resource Queuing builds for testing according to their priority Execute automated tests on a new product build upon successful build compilation on VMs / VMs snapshots / Physical machines Perform paralle

Automation Framework Features List

Before Automation Framework can be developed, it goes through the requirement phase, where list of features are discussed with stakeholders and prioritized.  Here is list (subset) of features related to automation framework that can be discussed, prioritized and scoped for the automation testing framework. Core Features Platform & OS independence Technology & application independence Data driven capabilities (Input Data, output data, meta data) Test large volume of data quickly Framework should be driven through table / key words Shared software library for automation scripts should be implemented Record & playback functionalities Ability to parameterize (recorded) scripts Should have end-2-end testing capability to cover business scenarios Capability to preparing / cleaning the test environment Resource management of test / lab resources View and edit test cases intuitively Ability to implement dyna