One of the most basic and important parts of software development is Quality Assurance. Even Though the industry has recognized distinguished team and skill set for conducting the Quality Assurance, the study shows that the skillset is compromised. This is also evident from millions of mobile apps in the App Store and Play Store which fail to retain the user experience and reliability even after bringing very good concepts.
Considering our consistent success in releasing the most robust products to the store, we would like to share how to elevate the standards from Manual testing to Automation testing.
Whenever an application is taken up for development, several teams are put together to make the application stable. The tester’s work begins with going through the document stating requirements and making test cases from that.
Manual testing begins when the initial build comes to the team for checking and the testers begin the testing of the build with pre-written test cases. Finding bugs, reporting these to the respective person and testing of a new build with the resolved issue, this cycle continues until the build or software becomes stable.
One often faces difficulty when testers are executing the same scenario with the same functionality multiple times and testing becomes a tedious process due to which the software may be affected in the manner mentioned below:
- Due to constant repetition, testers can skip familiar functionality and this can impact the quality of the product.
- The time duration will be increased due to testing the same process or functionality.
- Consider a situation, where your product is already there in Store with millions of users using it and team want to push most critical feature and fix in few hours.
In most of these cases, it’s not only the hard works which are essential but also the smart work, that’s the reason we began automation in our organization.
QA Automation is a simple engineering with several tools
Several tools are available and we chose selenium java, one of the main reason being that these are open source tools and are easily available on the internet. Initially, we started automating all the basic/smoke cases. This way, every time a new build comes, we can check our smoke cases or positive flows. With this, we save more time and spend this time in testing bug fixes and newly introduced functionality. This way, the two major drawbacks of manual testing (as mentioned above) were resolved with the Automated process.
Engineering part of QA Automation
The initial setup and installation are very important. We use the Page object module to generate the automation script (Automation scripts are nothing but automating the manual test cases) with the help of the selenium webdriver tool. Architecture or Framework is a combination of generic library, POM pages, test scripts, resources folder, wait for statements classes or some specific functions related to these particular projects.
We use java language to develop our automation test scripts because:
- Selenium is supposed to have a better integration with Java as the Selenium RC is coded in Java.
- We used IDE like Eclipse, so creating new projects becomes a breeze.
Once the setup or architecture is done, we use this base architecture in other in-house projects by making small modifications. Our organization majorly deals with mobile applications, and so we began with the Appium tool (A tool for automating Android and iOS applications). The process is almost the same for both selenium and appium. In web app we use ‘firepath, firebug or developer tool’ to locate the elements. In mobile apps we locate elements with the help of “appium desktop” for iOS and ‘uiautomatorviewer tool’ for android, and perform actions on found element with the help of inbuilt selenium webdriver commands.
We employ a different set of tools to take our testing to a higher level -
- Maven is used to developing a folder structure for our project and it provides us with all the dependency jars from a remote repository which is used in our project. This way, there is no need to download and add it explicitly to our projects.
- TestNg is used to run all test scripts at the same time. By using different annotations of testNg, we actually optimize our lines of code. It gives us an advantage of generating test reports for running scripts.
- You can always benefit from the right set of tools. These tools help in information sharing, process automation, reduction in deployment time, continuous deployment, etc. Jenkins is one of the major tools that we use for continuous integration. There are over 400 plugins in jenkins to support building and testing project. We receive email notifications for running ‘Jenkins job’, pop-ups, etc. Through Jenkins and actually automating the process, it takes less manual effort.
Process and Challenges
- Process includes steps like taking data from an external file, running the automation script and generating reports for the running scripts.
- It started with creating maven framework structure and writing page object model for all available pages or screens in our application.
- The Page object model contains respective pages xpaths and reusable functions.
- The Generic library contains all the generic functions which can be used in any other project.
- The Test script contains code for functionality of the application, here we integrate all our codes from different classes into one class.
- Synchronisation is very important to match the webdriver and application speed to perform automation. This is because the webdriver speed is very high compared to the application speed.
- The Initial setup is very challenging in itself, because we need to check the different tools and browsers’ compatibility with each other.
- Once we begin writing xpaths from the html web page, it may so happen that the written things will not work. In that case, we will require to update xpaths with other available methods. This issue most often occurs in the iOS because there is no validator to validate the xpath in ‘Appium Desktop’.
- Sometimes the waiting time creates issues. So, applying a proper waiting time is very important in case of dynamic data.
- Cross Browser testing makes it challenging for us because the element behaves differently in Chrome, Mozilla Firefox and Internet Explorer.
- In the whole process we deal with different types of exceptions like- NoSuchElementException, StaleElementException, TimeoutException, ElementNotVisibleException, ConnectionClosedException, SessionNotFoundException, WebDriverException, etc. Dealing with these exceptions and performing our automation work can get challenging.
- Similarly, Mobile testing requires us to run scripts in ‘simulator or emulator’ for different ios and configuration, making it challenging.
Advantage Of Using Automation
- It reduces our effort while testing the same features again and again. This means there is no tedious process involved and we can focus on other important things.
- No manual interruption means no chance of mistake in defined functionality.
- Quality work is produced since Automation Script cannot go wrong if everything is properly defined in the scripts.
- Time limit reduces, so whenever there are frequent releases in weeks or months, it gets easier to know about the defined functionality without testing manually.
- One defined architecture or Framework can be used in the same type of applications.
Testers will get excited about Selenium’s capabilities and expect that they can automate everything when the reality is that this just isn’t possible. In fact, a lot of automation relies on basic manual testing efforts.Instead learning to prioritise the correct test to be automate will be beneficial to any tester.
Reach out to us at : email@example.com
Contact us: http://www.hashtaag.com
Jyoti Jha |Quality assurance engineer
A Quality assurance engineer who specialises in automation and manual testing. She’s a keen observer and is well-versed with data driven and hybrid framework. She is also experienced in domains like e-commerce, job portals, Retail, HRMS. Jyoti is passionate about her work and is always open to explore.