Advanced knowledge of software testing - summary of automated testing

automated test

Definition of automated testing: Use an automated testing tool to verify the requirements of various software tests, including the management and implementation of test activities, the development and execution of test scripts.

Automated testing is only a part of testing work, and it is a supplement to manual testing; automated testing can never replace manual testing; in most cases, manual testing and automated testing should be combined to complete testing tasks in the most effective way.

The meaning of automated testing

Usually, the workload of software testing is very large (according to statistics, testing will take up 40% of the development time; for some software with very high reliability requirements, the testing time even accounts for 60% of the development time). However, many operations in the test are repetitive, non-intellectual and non-creative, and require accurate and meticulous work. Computers are most suitable to replace humans to complete such tasks.

Software automated testing exists relative to manual testing, and is mainly realized through developed software testing tools, scripts, etc. It has the characteristics of good operability, repeatability and high efficiency. To understand why automated testing is needed, consider two aspects:

  1. Limitations of manual testing
  2. Benefits of automated software testing

Limitations of manual testing

  • It is not possible to cover all code paths through manual testing.
  • Simple functional test cases are indispensable in each round of testing, and they are mechanical and repetitive to a certain extent, and the workload is often large.
  • Many invisible logic errors related to timing, deadlock, resource conflicts, multithreading, etc. are difficult to catch through manual testing.
  • When performing system load and performance testing, it is difficult to perform manual testing when it is necessary to simulate various application scenarios such as a large amount of data or a large number of concurrent users.
  • When conducting system reliability testing, long-term continuous testing requires simulating system operation for 10 or decades to verify whether the system can run stably, which cannot be simulated by manual testing.
  • If there are a large number (thousands) of test cases that need to be completed in a short period of time (1 day), manual testing is almost impossible.

Benefits of automated testing

  • Shortening the software development and testing cycle can bring products to market faster.
  • The test efficiency is high and the hardware resources are fully utilized.
  • Save human resources and reduce testing costs.
  • Enhanced test stability and reliability.
  • Improve the accuracy and precision of software testing and increase software trust.
  • Software testing tools make testing relatively easy and produce higher quality test results.
  • Automated testing can do things that cannot be done manually, such as load and performance testing.

Prerequisites for automated testing

Before implementing automated testing, it is necessary to analyze the software development process to see if it is suitable for using automated testing. Usually the following conditions need to be met at the same time:

  1. The stability of test scripts with infrequent changes in requirements determines the maintenance cost of automated tests. If software requirements change too frequently, testers need to update test cases and related test scripts according to changing requirements, and script maintenance itself is a process of code development, which needs to be modified, debugged, and automated testing when necessary Framework, if the cost is not lower than the test cost saved by using it, then the automated test has failed. Some modules in the project are relatively stable, while the requirements of some modules are highly variable. We can perform automated testing on relatively stable modules, while those with large changes are still tested manually.
  2. The project cycle is long enough. The determination of automated testing requirements, the design of automated testing framework, and the writing and debugging of test scripts all take a long time to complete. Such a process itself is a test software development process and takes a long time to complete. . If the project cycle is relatively short and there is not enough time to support such a process, then automated testing becomes a joke.
  3. Automated test scripts can be reused If a set of near-perfect automated test scripts has been developed with great effort, but the reuse rate of the scripts is very low, causing the cost spent during the process to be greater than the economic value created, and automated testing has become the tester's choice. It is a practice work, not a test method that can really generate benefits.
  4. When manual testing cannot be completed and a lot of time and manpower are required, it is also necessary to consider introducing automated testing. Such as performance testing, configuration testing, large data volume input testing, etc.

Approaches to Automated Testing

The basis of software test automation is to simulate the operation process and operation behavior of the tester on the computer by designing a special program, or to check the computer program like a compiling system.

The principles and methods of software testing automation mainly include:

  1. Static and dynamic analysis directly on code
  2. Capture and playback of testing process
  3. test script technology
  4. Virtual user technology and test management technology.

Shortcomings of automated testing

  • incorrect beliefs or unrealistic expectations
  • Lack of qualified and experienced testing personnel
  • Problems with the test tool itself affect the quality of the test
  • Inadequate and effective training
  • Blindly introduce testing tools without considering the actual situation of the company
  • Did not form a good test tool environment
  • Other technical and organizational issues

Application direction of automated testing

Automated testing and manual testing each have their own characteristics, and their test objects and test scopes are different. When system function logic testing, acceptance testing, applicability testing, and physical interaction testing are involved, the manual testing method of black box testing is often used. .

Unit testing, integration testing, system load testing, performance testing, stability testing, reliability testing, etc. are more suitable for automated testing. The testing of unstable software, software with a short development cycle, and one-off software are not suitable for automated testing.

Typical open source automated testing tools

functional testing tool

tool name Introduction url
Abbot Java GUI Test Framework Java GUI testing tools abbot.sourceforge.net/
SharpRobo A test tool for recording/playback of dotNet's WinForm application gforge.public.thoughtworks.org/projects/sh…
soap Test the Web Service through the HTTP protocol www.soapui.org/
httpUnit Control access to web applications and functional testing through code httpUnit.sourceforge.net
Sammy Web functional testing tool, based on Perl samie.sourceforge.net/
water Web function testing tool, calling IE's Automation interface implementation, based on Ruby wtr.rubyforge.org/
Linux Test Project Kernel testing tool for Linux ltp.sourceforge.net/

performance testing tool

tool name Introduction url
OpenSTA A WEB performance testing tool with many users, supporting HTTP/HTTPS protocol opensta.org/
JMeter Java-based performance testing tool that can support HTTP/HTTPS, FTP, Socket and other protocols jakarta.apache.org/jmeter/
The Grinder A performance testing tool for testing J2EE applications grinder.sourceforge.net/
TestMaker A performance testing tool for testing WEB applications, which can support HTTP, HTTPS, SOAP, XML-RPC, SMTP, POP3, IMAP protocols www.pushtotest.com/ptt/
DBMonster Tools for generating database base data dbmonster.kernelpanic.pl/
Database Opensource Test Suite Suite for testing database performance ltp.sourceforge.net/

defect library

tool name Introduction url
Bugzillar One of the most prestigious defect libraries, powerful, and well integrated with the configuration tool CVS www.mozilla.org/projects/bu…
Mantis An easy-to-use defect library that fully includes the basic functions of a defect management tool mantisbt.sourceforge.net/
Trac A good defect and incident management tool, which can be well integrated with Subversion and keep traces of the resolution of each defect projects.edgewall.com/trac/
BugFree It claims to be a streamlined version of Microsoft's defect management system, an open source tool of the Chinese themselves bugfree.1zsoft.com/

unit testing tools

tool name Introduction url
JUnit Java's regression testing framework has become a huge testing framework through various extensions www.junit.org/index.htm
Cactus A unit test tool for testing ServerSide, which can be tested for Servlets, EJB, etc. jakarta.apache.org/cactus/inde…
CppUnit A unit testing tool for C++ cppunit.sourceforge.net/
Nun Unit testing tools under dotNet www.nunit.org/
DbUnit Used to maintain the database environment between different tests dbunit.sourceforge.net/

If the article is helpful to you, remember to like, bookmark, and add attention. I will share some dry goods from time to time...

END Supporting Learning Resources Sharing

Finally:  In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free 【保证100%免费】

加入我的软件测试交流qq群:110685036免费获取~(同行大佬一起学术交流,每晚都有大佬直播分享技术知识点)

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

insert image description here

How to obtain the full set of information:

Guess you like

Origin blog.csdn.net/m0_58026506/article/details/131187811