White Paper: Automated Testing Step up your Potential of Contents

 Executive Summary  Understanding the Significance of  Importance of an Automation Strategy for Database Testing  Life Cycle of Automation Database Testing  Why Database Automation is Necessary to Solve Common Challenges  What Can Be Automated in Database Testing?  Conclusion

Executive Summary

With varying complexities and heterogeneous environments, companies utilize different forms of strategies and tests in place. It could be , it could be automated testing and it could be the combination of both. In this age, wherein we talk about data size in terabytes, it is really difficult to the testing strategy based on manual testing. We need to have some form of automation for sure in database testing.

This white paper takes through the journey of Automated Database Testing to step up your data potential.

1 2 Understanding the Significance of Database Testing Data is undoubtedly critical from a techno-commercial point of . All companies, ranging from e-commerce to pharmaceutical and banking to insurance companies have data as their asset. Testing this segment is really critical and it involves testing strategies such as quality control and quality assurance of the product . All the companies which deals with or which are associated with data warehousing or , need to have an indestructible and a coherent database . If database processes such as Select, Update, Insert & Delete are performed without testing the database for consistency first, the organization risks a and chaos of the entire system.

The formal approach of testing may not be adequate in which formally test the databases or QA engineers wait for managers to call upon consultants. Finally, database testing mainly deals with finding errors in the databases so as to eliminate them, be it at data level or structure level. The final outcome after testing will improve the quality of the database to serve mission critical .

How many times it would happen that the code changes have been deployed to the production , but schema changes are not rolled out and it has resulted in chaos?

How many times you could not reproduce the scenarios on test servers that is producible on production servers?

It is data which can be the culprit. It is important for companies to have answers to common questions like – How do we make sure that the rights given to some temporarily has been rolled back or not? Are we running over allocated quotas on some database objects or not? Are all the developers following the database coding standards that we have set? All these are covered as part of continuous activity and falls under database testing or data validation testing or database health testing.

Thus, a sound database testing strategy helps companies to avoid the chaos and repercussions.

Importance of an Automation Strategy for Database Testing It is vital to understand the importance of an Automation Strategy for Database Testing and considerations while forming these strategies. The parameters to consider could be among nature of application under test, environment to be used, stakeholders’ expectations and of course overall ROI by doing this automation.

Executing tests partially or repeating tests unnecessarily can cost you huge. It’s vital to identify regular database tests to cover data validation, schema verification, security checks, data certification and cross checking with UI test results. Every strategy in IT revolves around cost, time and quality and hence while building any strategy, a lot of aspects needs to be considered. The stakeholders may not want to invest into a strategy which might cover everything but takes a lot of time and hence cost. At the same time, they cannot afford loose

2 ends for the most critical business functions which drives their branding and revenue. With this thumb rule in consideration, it would be wise to build a strategy which is based on Risk- based testing (RBT).

The definition for RBT goes like this “RBT is a type of testing that functions as an organizational principle used to prioritize the tests of features and functions in software, based on the risk of failure, the function of their importance and likelihood or impact of failure”. This means that, we identify the scope of an entire application, put ranking on the scale of 1-5 (5 most critical) against each module and do the automation only for those modules which are most critical as per business.

However, database testing should be differentiated from strategies to deal with other problems such as database crashes, failovers, broken insertions, deletions or updates.

Life Cycle of Automation Database Testing

Test Script Identify Scope Data Certification Execution Preparation

Cross-check with Integration with Post Execution Reporting UI Testing Report Scheduled Jobs Monitoring

1. Identify Scope The first thing is to identify what all to be covered, what can be excluded and which all modules are impacting the business most. Aspects like data verification, schema verification, health checks, database guideline checks, security checks and a lot more can be clubbed together here.

2. Preparation This step is really tricky, it deals with preparation for test scripts and hence, lot of judgments to be taken here. Firstly, identify automation tool to be used based on criteria like licensing cost, time to do the automation, support provided out of the box by the tool for various integrations, support offered by the vendor, for test scripts and a lot more.

Once finalized with tool, grab needful SQL queries to be executed, identify conditional flows and prepare automation scripts. Always keep in consideration that versioning helps. Make sure you prepare test environment to execute tests here.

3 3. Data Certification This step is to identify the potential test cases to carry out data checks among query to query or query to previously stored data. Prepare needful batches in case there is a huge data. Make it flexible enough so that a few test cases are testing abstract details while others can dig it till level comparison. 4. Execution Execute scripts you have prepared here and tweak them to perform as expected. Add needful conditional flows, loop around to use the same case for multiple sets of data and make them more robust. Identify repeated scripts and make code maintenance-friendly right at initial stage.

5. Reporting The outcome of the test execution is monitored here. There is no point in digging through logs for all kinds of reporting. Add needful automation steps to generate charts for managers and detailed logs for developers.

6. Post Execution Monitoring Monitoring the trends of execution and doing fixes if any, to test scripts. This is a continuous activity and needs to be performed multiple times to conclude on some particular pattern of defect.

7. Integration with Scheduled Jobs Regression aspects are covered here. Post , regression aspects need to be covered and the simplest form is to put them under scheduled execution. This will give a flexibility to run it all the time, be it Sunday or Christmas.

8. Cross-check with UI Testing Report This step is a part of cross-checking database automation testing results to UI testing and can affirm the findings made by two separate channels.

Schedule a live demo today!

Why Database Automation is Necessary to Solve Common Challenges

Frequent Application Releases Tests

Checks for Best Practices and Repetitive Database Testing Standards Enforcement Cycles

Frequent Changes in Database Uncertainty on Issues Behavior Schema

4 Frequent Application Releases With IT project and product development going agile, testing cycles need to cope up with frequent releases. Since manual testing cannot serve the objective of fast turn-around time signing off the build, automation is must and testing data segment is inevitable. Automating database testing solves challenges of frequent releases and updates.

Checks for Best Practices and Standards Enforcement A lot of projects start with really a disciplined development and gets into a spaghetti pattern over a period of time if automated checks are not being kept. The reasons and excuses could be larger teams, scarce time to release, missing code reviews, changing team members and some such. Unless automated watchers are kept, maintenance aspects of the project will suffer.

Frequent Changes in With ever changing requirements and fast release cycles, it gets really tough to check if an addition of a feature has broken an existing feature or not. Frequent changes in database schema need to be properly tested via automated scripts to avoid any unpleasant surprises.

Data Integrity Tests Any inadvertent shifts to data or as a result of data warehousing, retrieval or action on mission critical data operation, including despiteful attacks, surprising hardware failures and human error is failure of data integrity. Recurring and rigorous continuous tests are required to monitor this aspect.

Repetitive Database Testing Cycles For an enterprise application under test, there are multiple vendors contributing to meet the storage requirement of an application. Also, there are multiple layers through which a test needs to pass like Dev, QA, pre-production and production. Performing the same activity repeatedly leads to boredom and inaccuracy. This objective can be achieved with properly drafted automation scripts.

Uncertainty on Issues Behavior An issue not getting produced in a staging environment, but is there on production environment and is badly affecting the brand and the revenue of the system. In this case, if automated checks are in place, will definitely allow identifying whether it is the issue with code for latest deployment or whether it is related to data.

What Can Be Automated in Database Testing?

Data Database Database Database Integrity Health Schema Security Check Check Check Check

5 Data Integrity Check E.g. Keep production instance and QA instance in sync

Database Health Check E.g. Find out heavy objects from the database and apply strategy X

Database Schema Check E.g. Check # of tables, SPs, functions, charset to be particular

Database Security Check E.g. Keep an eye on total granted users on your schema

Periodic Reporting Admin Cleanup Insert Test to Module Action Data Managers

Periodic reporting to Managers E.g. For an e-commerce store, is there anything where in the discounted price is more than the actual price?

Admin module is yet to be built, but daily reporting is needed E.g. How many new users signed up for our Beta product?

Perform cleanup action on a regular basis E.g. Delete temporary records from table x, which are older for 30 or more days

Insert test data to development or QA database when required E.g. Test data is there in the and needs to be there in database instance.

Conclusion Database testing is not about checking data of the applications that developers have prepared. It is something which can ensure that your applications perform functions faster and better. With people, processes and , there are several direct and indirect benefits of database testing.

Understanding organization’s strategic and business objectives as well as an investment in the right automation tool is crucial before you jumpstart with database testing automation to reap the benefits.

Database testing with tools like TestingWhiz opens avenues for software companies and QA firms to realize the goals and avail benefits of fully to deliver quality software applications while ensuring business profitability.

6 About TestingWhiz

TestingWhiz is a codeless test automation tool developed specifically for testing web and cloud applications. It is an easy, intuitive and affordable automation solution based on robust FAST® Automation Engine that requires no technical and programming skills for testing applications.

TestingWhiz comes with two editions – Enterprise & Community. While Enterprise edition is purely designed to address the needs of large testing teams, the Community edition serves the needs of independent small testers.

Email: [email protected]

Web: www.testing-whiz.com

Toll-free: +1-855-699-6600

Disclaimer

The information contained in this paper is confidential, privileged and only for the information of the intended recipient and may not be used, published or redistributed without the prior written consent of Cygnet Group Of Companies. Any unauthorized usage of this information shall make Cygnet Group Of Companies entitled to injunctive relief and/or a decree for specific performance, and such other relief as may be proper (including monetary damages if appropriate)

The opinions expressed are in good faith and while every care has been taken in preparing this presentation, Cygnet Group Of Companies makes no representations and gives no warranties of whatever nature in respect of this presentation, including but not limited to the accuracy or completeness of any information, facts and/or opinions contained therein.

Cygnet Group Of Companies, its directors, employees and agents cannot be held liable for the use of and reliance of the opinions, estimates, forecasts and findings in this presentation.

ADDRESS CONNECT WITH US

USA INDIA TestingWhiz TestingWhiz Mack-Cali Centre III, 2A, Manikyam, Opp. Samudra 140 E, Ridgewood Avenue, Annexe, Off. C. G. Road, Suite 415 ST, Paramus, Navrangpura, Ahmedabad, New Jersey 07652 Gujarat, India

7 Copyright © 2015 TestingWhiz, All rights reserved.