Testing Basics | Let’s talk about some things you must know about software testing

What is software testing?

Software testing is the process of checking the quality, functionality and performance of a software product before its release. In order to conduct software testing, testers either manually interact with the software or execute test scripts to find bugs and bugs and ensure that the software works as expected. Software testing is also done to see if the business logic is fulfilled or if there are any missing gaps in the requirements that need to be addressed immediately. 

Software testing is an important part of the software development life cycle. Without it, application errors that could negatively impact the use of the software may not be detected. Over time, as applications have become more complex, software testing activities have evolved, introducing many new technologies and methods. 

Why is software testing important?

The road to software development is bumpy, and products are always prone to bugs and defects. Before releasing software to the market, it is necessary to ensure that the software works as expected. Here are a few reasons why software testing is crucial:

1. Detect defects for the development team to solve

The ultimate goal of software testing is always to find errors and defects. Modern software is built from highly interconnected components that must work together seamlessly to deliver the intended functionality. One broken component can have a ripple effect and destroy the entire application. The sooner broken code is fixed, the smaller the impact. A good testing process ensures a higher quality and more reliable product is always delivered on time.

2. Maintain and improve product quality

Product quality is more than just the absence of bugs. When we think of quality, we think of features that not only meet  but  exceed  customer expectations. People expect an application to perform its intended function, but only when it exceeds those expectations does it achieve "high quality" status. From this perspective, software testing is key to quality for the following reasons:

  • Regression testing to ensure quality remains at a consistent standard as new code is added

  • Conduct regular usability, compatibility and security testing to ensure these aspects of the software are well-checked

  • Provide development teams with insights on product quality to continuously update documentation

  • Identify and resolve errors to make software more reliable

  • Identify areas for optimization and improvement

  • Ensure software functionality works as expected

  • Ensure software is consistent with user feedback

  • Ensure software compatibility across platforms and environments

  • maintain

  • improve

3. Improve customer trust and satisfaction

The result of rigorous software testing is increased customer trust. While it's unrealistic to expect a completely bug-free software, having a stable, reliable product that continually meets customer needs will ultimately lead to a positive long-term user experience.

4. Identify vulnerabilities that can save company costs or even human lives

Any type of software in the financial, medical, legal software or YMYL (Your Money Your Life) fields handles sensitive information. Software applications built for these domains cannot withstand crashes, data corruption, or system failures, even on a small scale, because many people's lives would be affected. Errors in these software can cause irreversible damage and put companies at risk of lawsuits. The purpose of software testing is to protect the company from such risks

Types of software testing

Different types of software testing can be divided into multiple categories based on testing objectives, testing strategies, and deliverables. Currently, there are two main types of software testing commonly used by quality assurance professionals, including:

  • Functional testing : A type of software testing that verifies that an application provides expected output.

  • Non-functional testing: A type of software testing that verifies that non-functional aspects of an application, such as stability, security, and usability, work as expected.

These umbrella terms cover a wide range of test types, each of which serves only a specific purpose. For example, there are 3 main types of functional tests:

  • Unit testing : A test of a single unit in an application

  • Integration testing : A type of testing performed on groups of application units to understand how they work together

  • Acceptance testing : A test that evaluates an application against real-life scenarios

Likewise, under non-functional testing, there are many common test types, each with different goals and strategies:

  • Security testing : Testing that checks whether software is secure and protected from unauthorized access or threats.

  • Performance testing : Tests that evaluate software performance in terms of speed, stability, and resource usage.

  • Load Test : A performance test that evaluates how the software handles expected and peak loads.

  • Usability testing : A test that measures the user-friendliness and ease of use of software.

  • Compatibility testing (or cross-browser testing ) : Testing to ensure that software works properly on different platforms, devices, or environments.

The decision on which type of software testing to use depends on the testing scenario, resource availability, and business needs.

Software testing methods

QA professionals have two different approaches to software testing: manual testing and automated testing. Each method has its own advantages and disadvantages that testers must consider carefully to maximize the use of testing resources.

  • Manual testing software is tested manually by humans without any automated tools or scripts

  • Automated testing : Testing software using tools or scripts that automatically interact with the software. The tester just needs to execute the script and let it do the rest of the testing.

Software testing life cycle

Many software testing plans follow a process commonly known as the Software Testing Life Cycle (STLC). STLC consists of 6 key activities to ensure that all software quality objectives are met, as follows:

picture

1. Requirements analysis

During this phase, software testers work with stakeholders involved in the development process to identify and understand testing requirements. Insights from this discussion will be incorporated into the Requirements Traceability Matrix (RTM) document and become the basis for building a testing strategy

What developers and testers understand during the requirements analysis phase is different. Developers focus on translating requirements into code, including architecture, design methods, and techniques, while testers check code for testability. They determine how to break down code into smaller parts, scenarios, and test cases. Ensuring testability during the design phase is critical to avoid ambiguous requirements that can lead to ineffective software testing.

Afterwards, testers and developers must collaborate to understand the feasibility of implementing the business requirements. If these requirements cannot be met within the given constraints, limitations or resources, they will need to discuss with the business parties (business analysts, project managers and/or customers) to make adjustments or seek alternative solutions.

2. Test plan

After thorough analysis, create a test plan. Test planning involves coordinating the testing strategy with relevant stakeholders:

  • Testing objectives : Define attributes such as functionality, usability, security, performance and compatibility.

  • Outputs and Deliverables : Document test scenarios, test cases, and test data to be generated and monitored.

  • Test scope : Determine which areas and features of the application will be tested (in-scope) and which areas and features will not be tested (out-of-scope).

  • Resources : Estimate costs for test engineers, manual/automated testing tools, environment, and test data.

  • Timeline : Establish expected milestones for testing-specific activities as well as development and deployment.

  • Testing approach : Evaluate the testing techniques (white box/black box testing), testing levels (unit, integration and end-to-end testing) and testing types (regression, sanity testing) to be used.

To gain more control over a project, software testers can add contingency plans to adjust variables in case the project goes in an unexpected direction.

3. Test case development

After defining the scenarios and features to be tested, we will write test cases. For manual test cases, test management tools such as Xray can be used to note down the details of the actions performed, the results, findings, and suggestions for developers to reproduce the errors. For automated testing, you can use the intuitive UI provided by tools such as Katalon, Ranorex or TestComplete. Open source options like Selenium, Cypress, and Playwright are also popular for building custom frameworks.

4. Test environment settings

This step can be done in parallel with test case development. The test environment is the software and hardware configuration of the test application, including database server, front-end operating environment, browser, network, hardware, etc. The QA team will plan resource usage for test environment development. This approach ensures efficient allocation of resources. Here is a quick checklist of items to consider when setting up your testing environment:

  • Verify hardware specifications (CPU, RAM, storage).

  • Check software dependencies (operating system, libraries, frameworks).

  • Verify network requirements (firewall rules, ports, connections).

  • Make sure the test environment is separate from the production environment.

  • Use network isolation, virtualization, or dedicated hardware.

  • Determine relevant test scenarios and data requirements.

  • Create a representative test data set.

  • Consider data privacy and security regulations.

  • Install the necessary operating system and software.

  • Set up the database, web server, and other required components.

  • Configure network settings, firewalls, and security measures.

  • Establish recovery mechanisms to restore the environment to a known state.

  • Implement regular backups to prevent data loss or configuration issues.

  • Establish recovery mechanisms to restore the environment to a known state.

  • Implement regular backups to prevent data loss or configuration issues.

5. Test execution

With a clear goal in mind, the QA team writes test cases, test scripts, and prepares the test data required for execution.

Testing can be performed manually or automatically. Manual testing is appropriate when human insight and judgment is required, while automated testing is better suited for repetitive processes with fine adjustments. After testing is performed, any defects discovered are tracked and reported to the development team, which immediately resolves them.

6. End of test cycle

This is the final stage of software testing. Software testers will come together to analyze what they found from their tests, assess effectiveness and record key takeaways for future reference. It is essential to regularly evaluate the QA team's software testing process in order to maintain control of all testing activities at all stages of the STLC.

Popular software testing models

The evolution of testing patterns parallels the evolution of software development methodologies.

1.V type 

In the past, QA teams had to wait until the final stages of development to start testing. The quality of testing is often poor and developers are unable to troubleshoot problems in time for product release. 

The V model solves this problem by involving testers in every stage of development. Each development phase is assigned a corresponding testing phase. This model works well with the almost obsolete waterfall testing method.

picture

2. Test the pyramid model

As technology advanced, the waterfall model gradually gave way to the widely used agile testing methodologies. Therefore, the V model has also evolved into the testing pyramid model, which intuitively represents a testing strategy consisting of 3 parts.

picture

Most tests are unit tests designed to verify only a single component. Next, testers group these components and test them as a unified entity to understand how they interact. Automated testing can be leveraged during these phases to achieve optimal efficiency. 

Finally, during the UI testing phase, testers focus on the UX and UI of the application.

3. Cellular model

The honeycomb model is a modern approach to software testing where integration testing is the main focus while unit testing (implementation details) and UI testing (integration) receive less attention. As organizations move to cloud infrastructure, this software testing model reflects API-centric system architecture.

picture


What can be automated in software testing?

When manual testing becomes counterproductive, automated software testing can be leveraged to test a large number of software components. Automation delivers high ROI and allows QA teams to perform more critical testing activities. A test case is eligible for automation if the following conditions are met:

  • It is repetitive and the test steps are unlikely to change

  • Very time consuming/impossible to do manually

  • It runs on multiple software/hardware platforms

  • prone to human error

In practice, regression testing is often the top priority for automation because its essence is to perform the same tests repeatedly. Automation can speed up the execution of regression tests, allowing the QA team to focus on other critical tasks.

Even if testers don’t really need automated testing, automated testing tools can still support them in many other areas, such as test reporting and analysis for data-driven decisions. They also offer centralized test management where teams can collaborate on many development and testing phases.


Manual testing vs. automated testing: Which one to choose?

When starting any software testing project, the testing team and development team must sit together and create a test plan that outlines which areas require manual testing and which areas need to leverage automated testing. A hybrid approach should provide testers with two types of benefits, as shown in the comparison table below:

picture

Will automated testing make manual testing obsolete?

Automated testing takes software testing to the next level, enabling QA teams to test faster and more efficiently. So will it make manual testing a thing of the past?

The short-term answer is "no."

The long-term answer is "maybe."

Manual testing still has its place in the world of software testing. Need to deal with:

  • Exploratory testing : Testers simultaneously design and execute tests based on their expertise and knowledge.

  • Ad-hoc testing : Testing performed without predefined test cases or scripts, relying on the tester's intuition and creativity.

  • Usability testing : Evaluate user-friendliness and overall user experience to identify usability issues and improve software usability.

We also need humans to evaluate the user experience of the application, oversee automated tests, and intervene when necessary. However, artificial intelligence technology is gradually changing this landscape. Smart testing features have been added to many automated software testing tools to significantly reduce the need for manual intervention. 

picture

In the future, we can expect to achieve autonomous testing, where machines fully control and perform all testing activities. There is absolutely no human effort required except to develop the testing algorithm. Software testing tools now integrate ChatGPT, a groundbreaking artificial intelligence chatbot, bringing us one step closer to this autonomous capability.

What are the commonly used testing tools currently? How to choose a testing tool? We will share it in the following articles.

Finally: The complete software testing video tutorial below has been compiled and uploaded. Friends who need it can get it by themselves [guaranteed 100% free]

Software Testing Interview Document

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 Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.

Guess you like

Origin blog.csdn.net/weixin_50829653/article/details/133347878