Software testing in SDLC
Peruzzi Solutions Limited
We are a Microsoft Solutions Partner company developing Microsoft Azure cloud based applications for businesses.
Does the SDLC model we choose affect the effectiveness of testing??The choice of the SDLC model does indeed have a significant impact on the effectiveness of testing. While good testing practices are important regardless of the chosen SDLC model, understanding how different models affect testing is crucial.?To grasp this impact, it is essential to explore the fundamental elements of the SDLC concept. This includes presenting different SDLC models and distinguishing between traditional models and the Agile approach. Additionally, the article discusses the elements of the Software Testing Life Cycle, highlighting common test activities that can be utilized in different models.
What is SDLC??
?A software development lifecycle (SDLC) model is an abstract, high-level representation of the software development process. An SDLC model defines how different development phases and types of activities performed within this process relate to each other, both logically and chronologically.” (ISTQB: Certified Tester Foundation Level (CTFL) Syllabus v4.0)
In the Software Development Life Cycle, various phases are followed for the developed product to meet the defined expectations or requirements.?While the specific names and number of phases can vary depending on the chosen SDLC model, the following are commonly used phases:
There are several traditional SDLC models to interpret these phases. Three types are used in terminology:?
1.?????Sequential model?
Sequential development models, such as the waterfall model and V-model, follow a linear and sequential process. Each phase is completed before moving on to the next, and there is minimal overlap or iteration between the phases.
Sequential development models provide a structured and disciplined approach to software development. They work well when requirements are well-defined and stable, and there is a clear understanding of the project scope.
2.?????Iterative model?
Iterative models like the spiral model and prototyping involve frequent iterations of planning, designing, developing, and testing.
Spiral models are a software development model combination of sequential and iterative models. The Spiral Model is based on the idea of continuously refining and iterating on a product. This refining happens through a series of cycles or spirals. Each spiral cycle involves four key phases: Planning, Risk Analysis, Engineering, and Evaluation.?
The Prototyping Model is a software development model that involves creating an initial version of the software system with limited functionality to gather feedback and refine requirements. It focuses on quickly building a prototype or mock-up of the system to demonstrate and gather user feedback.
3.?????Incremental model
It prioritizes delivering working software in small, incremental releases.
The type of SDLC model we use determines the time, goals, and quality of the testing. The various impacts of the models on the testing can be summarized in the following points:?
1.?????????Scope and Timing of Test Activities: When do we test? Later or earlier? In a traditional waterfall SDLC, testing typically occurs towards the end of the development process, after the software is fully developed. In contrast, in Agile methodologies like Scrum, testing is performed throughout the development cycle in each iteration or sprint, allowing for early feedback and continuous improvement.
2.?????????Level of Detail of Test Documentation: What emphasis is placed on documentation during the development process? In traditional?SDLCs, comprehensive test documentation, such as test plans, test cases, and test scripts, is often created to ensure thorough test coverage. Agile methodologies tend to focus on lightweight documentation, with a greater emphasis on collaboration and communication within the development team.
3.?????????Test Techniques and Approach: What approach do we use during testing? Planned or exploratory? How flexible? In traditional SDLCs, testing often relies on scripted and planned test scenarios, with a strong emphasis on test cases derived from requirements and specifications. Agile methodologies encourage exploratory testing, where testers have the flexibility to explore and experiment with the software, uncovering defects and providing rapid feedback.
4.?????????Extent of Test Automation: More or less? Traditional SDLCs may place more emphasis on manual testing, with limited test automation. In Agile methodologies, there is a greater focus on test automation to automate repetitive and time-consuming test activities.
5.?????????Role and Responsibilities of Testers: In traditional SDLCs, testers typically have a dedicated testing role and are responsible for test planning, design, execution, and reporting. In Agile methodologies, the lines between roles blur, and testers often work closely with developers and business stakeholders.
How does Agile come into the picture? Agile is an approach to software development that can be considered a type of Software Development Life Cycle (SDLC).
In Agile SDLC, software testing is an integral part of the development process and is carried out in parallel with development activities. In Agile, the focus is on delivering working software in short iterations, typically lasting two to four weeks.
During each iteration, the development team creates a working increment of the software, which is then tested by the testing team using a variety of testing techniques and approaches. The testing team works closely with the development team to ensure that testing is carried out efficiently.
The process and the use of different test activities may be different in SDLCs. The following general test activities can be performed during testing:?
Test Planning: This activity involves defining the objectives, scope, and approach for testing. It includes identifying testable features, defining test conditions, and determining the level of testing required.?
Test Monitoring and Control: This activity involves ongoing monitoring of the test activities and progress against the test plan. It includes comparing the actual progress with the planned schedule, tracking defects, and taking corrective actions to meet the testing objectives. Test monitoring and control help ensure that testing stays on track.
Test Design: Test design involves translating the test conditions identified in the planning phase into detailed test cases. Test cases specify the inputs, expected outputs, and steps to be followed during test execution. Test design also includes selecting appropriate test techniques and designing test data and test environments.
Test Execution: In this phase, the actual execution of test cases takes place. Testers follow the specified steps, input the test data, and observe the actual outputs to compare them with expected results. Test execution may be manual or automated, depending on the availability of tools and the nature of the tests.
Test Closure: Test closure activities mark the end of the testing process. It includes activities such as analyzing lessons learned from the testing effort, identifying areas of improvement for future projects, and preparing test closure reports.?
Different test activities can be defined differently in various Software Development Life Cycle (SDLC) models. The choice of the SDLC model influences how testing activities are planned, executed, and integrated into the development process. Here are some of the differences in the activities between traditional SDLC and Agile:
1.?????????Planning: In traditional SDLC, test planning occurs after the completion of the development phase, and test cases are designed and executed accordingly. In agile, test planning is done during each iteration, and test cases are designed and executed based on the user stories and acceptance criteria.
2.?????????Test Execution: In traditional SDLC, test execution is a separate phase that happens after development is complete. In agile, testing is integrated into each iteration, and testing activities occur in parallel with development.
3.?????????Documentation: In traditional SDLC, documentation is a critical aspect of the STLC, and detailed test plans, test cases, and test reports are created. In agile, documentation is kept to a minimum, and the focus is more on the actual testing activities.
4.?????????Test Automation: In traditional SDLC, there is a focus on test automation, and automated test scripts are developed and executed. In agile, the focus is more on exploratory testing and continuous testing, with automation being used to support these activities.
5.?????????Feedback and Continuous Improvement: In agile, the focus is on continuous feedback and continuous improvement, with testing providing valuable feedback to the development team. In traditional SDLC, there is less emphasis on feedback and improvement, with testing focused on finding defects.
Overall, the STLC in agile is more iterative, with testing integrated into each iteration, and a focus on continuous feedback and improvement.?
Different approaches aim to make testing more active and efficient during the development process. One such approach is the "shift-left" approach, which involves the early inclusion of testing in the development lifecycle.
How to achieve a “shift-left” in testing?
????????Reviewing the specification from the perspective of testing.
????????Writing test cases before the code is written.
????????Using Continuous Integration (CI) and Continuous Delivery (CD) can provide fast feedback and automated testing for code as it is submitted to the code repository.
????????Completing static analysis of source code before dynamic testing.
????????Performing non-functional testing starting at the component test level, where possible.
There is more additional approach, where the shift-left approach followed, and the principle of early testing is implemented:
Test-Driven Development?(TDD) is a software development practice where developers write tests before writing the actual code. The development process in TDD follows a repetitive cycle of writing a failing test, writing the minimum amount of code to pass the test, and then refactoring the code to improve its design and maintainability.
Acceptance Test-Driven Development?(ATDD) is a software development practice that extends the principles of Test-Driven Development (TDD) to focus on defining and automating acceptance tests before implementing the corresponding code. ATDD involves collaboration among stakeholders, including developers, testers, and business representatives, to ensure that the developed software meets the desired business requirements.
Behavior-Driven Development?(BDD) is a software development methodology that extends the principles of Test-Driven Development (TDD) and focuses on the behavior and desired outcomes of the software from a user's perspective. BDD aims to improve communication and collaboration between different stakeholders, including developers, testers, business analysts, and customers, by using a common language that is easily understood by all.
Written by Renáta Szebényi .