Software Test Automation

Software Testing Part 14

ยท

6 min read

Software Test Automation

What is Software Test Automation?

Developing software to test the software is called test automation. Addresses several problems like:

  1. Automation saves time as software can execute test cases faster than human do.
  2. Test automation can free the test engineers from mundane tasks and make them focus on more creative tasks.
  3. Automated tests can be more reliable.
  4. Automation helps in immediate testing.
  5. Automation can protect an organization against attrition of test engineers.
  6. Test automation opens up opportunities for better utilization of global resources.
  7. Certain types of testing cannot be executed without automation.
  8. Automation means end-to-end, not test execution alone.

Terms used in Automation

Test data generators
Automation should have scripts that produce test data to maximize coverage of permutations and combinations of inputs and expected output for result comparison. They are called test data generators.

Test Suite
When a set of test cases is combined and associated with a set of scenarios, they are called test suite. A Test suite is nothing but a set of test cases that are automated and scenarios that are associated with the test cases.

Skills Needed For Automation

First generation - Record & Playback

Skills for test case automation:

  • Scripting languages.
  • Record-playback tools usage.

Second generation - Data Driven

Skills for test case automation:

  • Scripting languages.
  • Programming languages.
  • Knowledge of data generation techniques.
  • Usage of product under test.

Third generation - Action Driven

Skills for test case automation:

  • Scripting languages.
  • Programming languages.
  • Design and architecture of the product under test.
  • Usage of the framework.

Skills for framework:

  • Programming languages.
  • Design & architecture skills for framework creation.
  • Generic test requirements for multiple products.

Scope of Automation : What to Automate?

  1. Certain types of testing are more suited for automation, which are:
    • Stress, reliability, scalability & performance testing.
    • Regression tests.
    • Functional tests.
  2. Automate the areas which are less prone to change in future.
  3. Automate the tests which pertain to standards like compliance, legal requirements etc.
  4. Management commitment in Automation
    • ROI is to be considered.
    • Test cases that are easy to automate should be automated first.

Design & Architecture For Automation

Components in test automation:

  1. External modules.
  2. Scenario & Configuration file modules.
  3. Test cases & Test framework modules.
  4. Tools & Results modules.
  5. Report generator & Report/Metrics modules.

Generic Requirements For Test Tool/Framework

  1. No hard coding in the test suite.
  2. Test case/suite expandability.
  3. Reuse of code for different types of testing, test cases.
  4. Automatic setup and cleanup.
  5. Independent test cases.
  6. Test case dependency.
  7. Insulating test cases during execution.
  8. Coding standards and directory structure.
  9. Selective execution of test cases.
  10. Random execution of test cases.
  11. Parallel execution of test cases.
  12. Looping the test cases.
  13. Grouping of test scenarios.
  14. Test case execution based on previous results.
  15. Remote execution of test cases.
  16. Automatic archival of test data.
  17. Reporting scheme.
  18. Independent of languages.
  19. Portability to different platforms.

Process Model For Automation

The W Model for phases involved in automation.

Selecting a Test Tool

Selecting a test tool is an important aspect of test automation for many reasons:

  1. Free tools are not well supported and get phased out soon.
  2. Developing in-house tools takes time.
  3. Test tools sold by vendors are expensive.
  4. Test tools require strong training.
  5. Test tools generally do not meet all the requirements for automation.
  6. Not all test tools run on all platforms.
  7. Testing tools have very high entry, maintenance, and exit costs and hence careful selection is required.

Criteria For Selecting Test Tools

  1. Meeting Requirements.
  2. Technology Expectations.
  3. Training skills.
  4. Management aspects.

Issues in Selecting a Testing Tool

  1. Meeting Requirements

    • Checking wether the tools meet requirements, involves effort and money.
    • Test tools are not fully compatible with products.
    • Test tools are not tested with the same seriousness as products for new requirements.
    • Difficult to isolate problems of product and test suite. Change in product causes test suite to be changed.
  2. Technology Expectations

    • Extending the test tool is difficult.
    • Requires instrumented code to be removed for certain tests.
    • Test tools are not cross platform.
  3. Training skills

    • Lack of trainers for test tools.
    • Test tools requires people to learn new langauge/scripts.
  4. Management aspects.

    • Test tools require system upgrades.
    • Migration to other test tools difficult.
    • Deploying tool requires huge planning and effort.

Steps for Tool Selection & Deployment

  1. Identify your test suite requirements among the generic requirements discussed. Add other requirements, if any.
  2. Collect the experiences of other organizations which used similar test tools.
  3. Keep a checklist of questions to be asked to the vendors on cost/effort/support/anything else.
  4. Identify list of tools that meet the above requirements.
  5. Give priority for the tool which is available with source code.
  6. Evaluate and shortlist one tool or set of tools and train all test developers on the tool.
  7. Deploy the tool across test teams after training all potential users of the tool.

Summary

  • A good automation test suite can help in 24x7 test execution, saving effort and time.
  • The quality requirements for the test suite are equal to or more stringent than that of the product.
  • At times automation is more complex than product development. Plan to have your best development and test engineers in the automation team.
  • Selecting test tools without proper analysis will result in expensive test tools gathering dust on the shelf. This is termed as shelf ware.
  • Automation makes life easier for testers for better reproduction of test results, coverage and, of course, reduction in effort as a side product.

Further Exploration In Different Types of Software Testing
More types of software testing to explore:

  1. Accessibility & Usability Testing
  2. Internationalization Testing
  3. Testing Object Oriented systems.
  4. Acceptance Testing

Conclusion

You can read other articles written by me through these links.

Software Testing Series
1. Fundamental Principles of Software Testing
2. Software Development Life Cycle Models
3. Quality Assurance vs Quality Control
4. Testing Verification vs Testing Validation
5. Process & Life Cycle Models For Testing Phases
6. White Box Testing
7. Black Box Testing
8. Integration Testing
9. System Testing
10. Regression Testing
11. Performance Testing
12. Ad Hoc Testing
13. Checklist & Template For Test Plan & Management
14. Software Test Automation

Operating System Series
1. Introduction & Types of OS
2. Process States & Lifecycle
3. System Calls
4. User Mode vs Kernel Mode
5. CPU Process Scheduling
6. Process Synchronization
7. Deadlocks
8. Memory Management
9. Disk Management & Scheduling
10. File System in OS
11. Protection & Security

System Design Series
Introduction To Parallel Computing
Deep Dive Into Virtualization
Insights Into Distributed Computing

Cloud Computing Series
1. Cloud Service Models
2. Cloud Deployment Models
3. Cloud Security
4. Cloud Architecture
5. Cloud Storage
6. Networking In The Cloud
7. Cloud Cost Management
8. DevOps In Cloud & CI/CD
9. Serverless Computing
10. Container Orchestration
11. Cloud Migration
12. Cloud Monitoring & Management
13. Edge Computing In Cloud
14. Machine Learning In Cloud

Computer Networking Series
1. Computer Networking Fundamentals
2. OSI Model
3. TCP/IP Model : Application Layer
4. TCP/IP Model : Transport Layer
5. TCP/IP Model : Network Layer
6. TCP/IP Model : Data Link Layer

Version Control Series
1. Complete Guide to Git Commands
2. Create & Merge Pull Requests
3. Making Open Source Contributions

Linux
Complete Guide to Linux Commands

Thanks For Reading! ๐Ÿ’™
Garvit Singh

ย