November 16, 2026
Comparative analysis of TDD usage in Angular applications with CI/CD pipelines based on GitHub Actions
Jessica Valeska da Silva; Luiz Fernando Pereira Nunes
DOI: 10.22167/2675-6528-202604195
Article derived from a Course Conclusion Work (TCC), with content based on the student’s original work and adapted to the editorial format of the E&S Magazine with the support of the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege for textual synthesis and organization.
Summary
A comparative analysis of front-end application development with and without Test-Driven Development (TDD) was performed, integrating them into Continuous Integration and Continuous Delivery (CI/CD) pipelines based on GitHub Actions. The study aimed to evaluate the impacts of TDD on code quality, error detection, and maintenance effort throughout the development cycle. To this end, two prototypes with equivalent functional scope were developed, using Angular 17 and TypeScript. The first prototype rigorously applied the Red-Green-Refactor cycle, with automated tests via Jasmine and Karma, while the second was implemented without TDD, with subsequent manual validation. Both prototypes were integrated into CI/CD pipelines for build automation and validation. The results indicated that the TDD prototype achieved higher test coverage (approximately 85%) and a lower incidence of failures in the CI/CD pipeline (2 failures versus 6). A reduction in the average error correction time was also observed, from about 25 minutes in the scenario without TDD to approximately 10 minutes with TDD. It was concluded that the adoption of TDD, especially when integrated with CI/CD practices, enhances software reliability, maintainability, and quality, despite requiring a greater initial development effort.
Keywords: Angular; CI/CD; Software Quality; Test-Driven Development; Automated Testing.
1. Introduction
The current software development landscape is marked by the continuous pursuit of agility, quality, and sustainability. In this context, approaches that allow for the construction of robust, maintainable code with short development cycles become essential. The Test-Driven Development (TDD) methodology and Continuous Integration and Continuous Delivery (CI/CD) pipelines are examples of practices that stand out for ensuring the reliability and efficiency of the software development process (Humble; Farley, 2010; Duvall et al., 2007).
The application of TDD in front-end development environments, especially when combined with modern frameworks like Angular, can be a significant differentiator. Angular, maintained by Google and based on TypeScript, offers a robust structure for single-page web applications. It organizes the application into reusable modules and components, facilitating the separation of responsibilities and promoting scalability. Furthermore, Angular provides native support for dependency injection, routing, and integration with automated testing libraries, which favors the application of TDD in environments with continuous automation (Google Developers, 2023; Aniche, 2015).
TDD, as elucidated by Beck (2010), Aniche (2014), and Freeman and Pryce (2009), guides code development through automated tests, following the Red-Green-Refactor cycle. This development approach aims to ensure the construction of more robust solutions with greater testability from the initial project phases. It promotes behavior-driven design, favors system evolution, and contributes to increased reliability and reduced bugs (Martin, 2009; Fowler, 2019). The consistent use of automated tests also facilitates the safe refactoring of legacy code (Feathers, 2013; Meszaros, 2007).
The integration of CI/CD pipelines, in turn, enhances the efficiency of TDD. This practice automates the constant integration of code changes and the continuous delivery of tested and validated application versions. Tools like GitHub Actions have stood out in this scenario, allowing the configuration of automated workflows directly in code repositories (Decan, 2022; Campbell; Papapetrou, 2013). The automation of test execution and continuous software delivery provide immediate feedback, reducing the time between development and deployment (Duvall et al., 2007; Humble; Farley, 2010). Continuous integration is a pillar for the effectiveness of agile processes, contributing to system reliability (Fowler, 2006).
Although TDD and CI/CD approaches are consolidated and their benefits recognized, there is a practical gap in understanding how TDD affects the development of projects that already use CI/CD pipelines. Recent studies, such as those by Pacheco (2024) and Silvestre and Scombatti Pinto (2023), suggest that the combination of automated tests and continuous integration can generate significant gains, but also presents challenges related to development time and test complexity.
In this scenario, this work proposes the construction of two front-end prototypes using Angular, one with the application of the TDD methodology and another without it, both integrated into automated pipelines through GitHub Actions. The research is justified by the need to deepen the understanding of TDD’s effectiveness in projects that already adopt modern automation practices, aiming to identify its impacts on metrics such as test coverage, failure occurrence, delivery time, and maintenance effort. The objective is to conduct a comparative analysis of TDD’s effectiveness in projects that already adopt modern automation practices, considering metrics such as test coverage, failure occurrence, delivery time, and maintenance effort.
2. Material and Methods
This work was characterized as a comparative experimental study, with the purpose of analyzing the impacts of the Test-Driven Development (TDD) methodology on front-end software development. To this end, two prototypes of a web application for task organization were developed, allowing a direct evaluation of the methodological approaches in question. The central objective was to conduct a comparative analysis of the effectiveness of TDD in projects that already adopt modern automation practices.
The prototypes were implemented using the Angular 17 framework and the TypeScript language, with the aid of the Angular CLI for project structuring. Test automation was carried out using the Jasmine and Karma tools, which are widely used in the Angular ecosystem for unit and integration testing. This technological choice ensured a standardized and robust development and testing environment for both scenarios.
The first prototype was developed strictly following the TDD methodology. The Red-Green-Refactor cycle was applied, which advocates for writing automated tests before implementing functionalities. This approach aimed to ensure that each functionality was guided by clear and verifiable test requirements from the initial stages of development, promoting test-driven design (Beck, 2010; Aniche, 2014).
In contrast, the second prototype was developed without applying the TDD methodology. A traditional approach was adopted, in which the implementation of functionalities occurred directly, followed by subsequent validation. In this scenario, the verification of the correctness of the functionalities was based on manual tests, without the prior writing of automated tests to guide the development.
Both prototypes had equivalent functional scope, contemplating essential operations such as task creation, editing, deletion, and management. Furthermore, they included local data persistence and time control functionalities. Functional equivalence was ensured by previously defined business rules, which served as the basis for the implementation and validation of functionalities in both scenarios, guaranteeing comparability between the approaches.
Continuous integration was configured through GitHub Actions, a platform that allowed the automation of workflows directly in the code repositories. This configuration enabled the automatic execution of builds and tests for every change made to the repository, ensuring a continuous validation process and immediate feedback on code quality (Decan, 2022; Campbell; Papapetrou, 2013).
The comparative analysis was conducted based on qualitative and observational criteria. The aspects evaluated included test coverage, failure incidence, maintenance effort, system behavior in the CI/CD pipeline, and the distribution of development effort over time. These criteria were selected to provide a comprehensive view of the impacts of TDD.
For the experiment’s conduction, an independent variable was defined corresponding to the use of the Test-Driven Development methodology. Two distinct scenarios were analyzed: development with TDD and development without TDD. This distinction allowed isolating the methodology’s effect on the metrics of interest, according to the study’s objective.
The dependent variables included: (i) test coverage, (ii) the number of identified defects, (iii) the average bug fix time, (iv) the defect incidence per functionality, and (v) system behavior in the CI/CD pipeline. Measuring these variables allowed for the quantification and qualification of the impacts of TDD adoption on the developed prototypes.
The data were collected by executing automated pipelines in GitHub Actions. Execution logs, test execution time, and the occurrence of failures during the build and validation process were recorded. This approach ensured the collection of objective and traceable data, fundamental for the proposed comparative analysis.
3. Results and Discussion
The comparative analysis between the two developed prototypes, one with the application of the Test-Driven Development (TDD) methodology and another without it, revealed notable differences in both the development process and the quality of the resulting software. These distinctions were particularly evident in the context of front-end applications built with Angular and integrated into Continuous Integration and Continuous Delivery (CI/CD) pipelines, highlighting the influence of TDD on the system’s robustness and maintainability.
In the prototype that used TDD, development strictly adhered to the Red-Green-Refactor cycle, as advocated by Beck (2010). This approach, which prioritizes writing automated tests before implementing functional code, facilitated a more precise definition of business rules and promoted a more modular, cohesive, and loosely coupled software design. The continuous validation of the application’s behavior, inherent to TDD, allowed for early detection of failures, resulting in a significant reduction of errors throughout the development cycle. Test coverage for this prototype was estimated at approximately 85%.
The findings of the prototype with TDD corroborate existing literature, which emphasizes the benefits of test-driven development. Freeman and Pryce (2009) highlight that this methodology improves software design, making it more flexible and sustainable. Additionally, Martin (2009) points out that the presence of automated tests is crucial for the ease of maintenance and evolution of the code, as it minimizes the risks associated with future modifications, ensuring that changes do not introduce new defects or break existing functionalities.
The integration of TDD with CI/CD pipelines, implemented via GitHub Actions, amplified the observed benefits. Each code change automatically triggered test execution, ensuring continuous validation and immediate feedback to developers. This automation is fundamental to the effectiveness of TDD, as it guarantees that all modifications are quickly verified, preventing the propagation of errors and maintaining project integrity. During pipeline executions, the scenario with TDD registered approximately two build failures, indicating considerable stability in the integration process.
In contrast, the prototype developed without TDD followed a traditional approach, focused on direct implementation of functionalities and subsequent validation. Although this strategy provided a perception of greater speed in the initial phases, it resulted in a higher incidence of errors, which were identified only after implementation. This generated the need for rework and incremental adjustments. The test coverage for this prototype was significantly lower, estimated at around 20%, reflecting the absence of a culture of prior and comprehensive testing.
The lower test coverage in the prototype without TDD can be attributed to the lack of incentive for the developer to anticipate use scenarios and business rules, an intrinsic aspect of TDD. According to Fowler (2019), the absence of prior tests can lead to the construction of less structured and more failure-prone code, making it difficult to identify and correct problems. During the CI/CD pipeline executions, the scenario without TDD presented approximately six build failures, evidencing greater instability in the continuous integration and delivery process.
The comparison between the development approaches revealed that TDD excels in early error detection and high test coverage. In the scenario with TDD, tests are written before the code, following the Red-Green-Refactor cycle, while in the scenario without TDD, the implementation is direct and validation is subsequent and manual. The initial development time is longer with TDD due to the prior writing of tests, but error detection is anticipated. In contrast, in development without TDD, the initial time is shorter, but error detection is late, generally after manual execution.
Test coverage in the prototype with TDD was high, estimated at 85%, with systematic validation of business rules, while in the prototype without TDD it was low or nonexistent initially, around 20%. Maintainability was high with TDD, due to the security of automated tests, whereas in the scenario without TDD it was medium to low, with higher risk when modifying the code. Code refactoring with TDD was safe and continuous, supported by tests, while without TDD it was risky and without automated guarantees, as pointed out by Feathers (2013) and Meszaros (2007).
The integration with CI/CD was complete in the scenario with TDD, with automatic test execution for each change, ensuring continuous validation and immediate feedback. In the scenario without TDD, the integration was partial, with validation limited to the build, which resulted in lower system reliability. System reliability was high with TDD, due to continuous validation, while without TDD it was medium, dependent on manual tests and more susceptible to failures. The initial complexity was higher with TDD due to the learning curve, but long-term productivity was superior, due to reduced rework.
The data presented show that the prototype with TDD demonstrated greater stability and lower incidence of regressions, a direct result of the continuous validation provided by automated tests. This characteristic is fundamental for maintaining software quality in long-term projects, where modifications are frequent. In contrast, the prototype without TDD revealed greater susceptibility to failures and a marked dependence on manual validation, which can compromise the integrity of the system as it evolves.
The analysis of the development effort between the approaches demonstrated that TDD redistributes the effort throughout the process stages. In the initial planning, TDD requires greater effort for the prior definition of tests and scenarios, while development without TDD has less effort, focused directly on implementation. Implementation with TDD is moderate and guided by automated tests, whereas without TDD it is fast, but without initial validation. Error detection is early with TDD, occurring during test execution, and late without TDD, after manual execution.
Error correction in the TDD scenario demanded less effort, due to early identification of failures, while in the scenario without TDD it required more effort and rework. Code refactoring was safe and frequent with TDD, supported by tests, but limited and riskier without TDD. System validation was automated and continuous with TDD, and manual or partially automated without TDD. The total development time was more balanced throughout the cycle with TDD, and longer without TDD, due to the need for later corrections.
In quantitative terms, the prototype with TDD presented a test coverage of approximately 85%, compared to about 20% in the prototype without TDD. The number of identified failures was two occurrences with TDD, versus six in the scenario without TDD. Failures per functionality were low with TDD and medium to high without TDD. The average error correction time was approximately ten minutes with TDD, in contrast to about 25 minutes in the scenario without TDD, evidencing the efficiency of the test-driven approach.
The test pipeline runtime was approximately 30 seconds with TDD, while in the scenario without TDD it was about ten seconds, reflecting the absence of automated tests. CI/CD build failures were one occurrence with TDD and four without TDD, reinforcing the greater stability of the integration process when TDD is applied. These numerical data corroborate the superiority of TDD in terms of software quality and reliability, despite an initial time investment in writing tests.
A relevant aspect observed was the distribution of failures by functionality. In the scenario with TDD, the incidence of failures remained low and more homogeneously distributed, indicating overall system robustness. In contrast, in the scenario without TDD, there was a higher concentration of errors in critical functionalities, which points to a fragility in the initial validation and a high risk of problems in essential parts of the application. This difference in failure distribution underscores TDD’s ability to promote a more resilient design.
A trade-off was observed between the approaches: development without TDD favored initial coding speed, but TDD stood out in reducing rework and improving quality over time. This behavior reinforces the idea that short-term metrics, such as initial implementation speed, are not sufficient to evaluate the effectiveness of software engineering practices. The quality and sustainability of the code, promoted by TDD, are benefits that manifest in later stages of the software lifecycle.
The adoption of TDD impacts not only technical aspects but also the cognitive process of development. The need to define tests beforehand requires a deeper understanding of business rules, leading to more structured design decisions and more robust code. In development without TDD, this stage of understanding and design tends to be less explored, resulting in solutions that may be less robust and more prone to future failures, according to the software design literature (Martin, 2009).
In general, the results demonstrated that TDD, although it may present a higher initial cost in terms of time and effort, provides measurable and lasting benefits throughout the software lifecycle, especially when integrated with CI/CD practices. These findings are in line with the literature, which points to TDD as an effective approach to improving the quality, testability, and maintenance of modern software systems, contributing to the construction of more reliable and scalable applications.
4. Conclusion
The present work aimed to analyze the impacts of using the Test-Driven Development (TDD) methodology in the development of front-end applications with Angular, considering its integration with Continuous Integration and Continuous Delivery (CI/CD) pipelines. It was found that the application of TDD, following the Red-Green-Refactor cycle, resulted in higher test coverage, estimated at approximately 85%, and a lower incidence of failures in the CI/CD pipeline, with 2 occurrences. A significant reduction in the average error correction time was also observed, which was about 10 minutes in the scenario with TDD, in contrast to approximately 25 minutes in development without TDD. On the other hand, the prototype without TDD presented a test coverage of approximately 20% and 6 pipeline failures, evidencing greater instability and dependence on manual validation. These findings indicated that TDD promotes a more modular, cohesive, and loosely coupled software design, facilitating early fault detection and safe code refactoring.
The integration of TDD with CI/CD pipelines has amplified the benefits, ensuring continuous validation and immediate feedback, which contributes to the prevention of regressions and the maintenance of application stability. Although TDD requires a greater initial development effort for prior test writing, the results demonstrated that this investment is offset by the gains obtained in later stages, such as reduced rework and improved software quality and sustainability throughout the lifecycle. A limitation highlighted is that the analysis was conducted based on a specific functional scope and a single technological context, which may restrict the generalization of the results. For future work, it is suggested to expand the analysis to other frameworks and languages, as well as to include more detailed quantitative metrics, such as measured development time and number of defects per functionality. It is concluded that the adoption of TDD, especially when combined with CI/CD practices, represents an effective strategy for modern software development, contributing to the delivery of more reliable, scalable, and high-quality systems.
Bibliographic References
Aniche, M. 2014. Test-Driven Development: Teste e design no mundo real. Casa do Código, São Paulo, SP, Brasil.
Aniche, M. 2015. Testes automatizados de software: Um guia prático. Casa do Código, São Paulo, SP, Brasil.
Beck, K. 2010. TDD: Desenvolvimento guiado por testes. Bookman, Porto Alegre, RS, Brasil.
Campbell, P.; Papapetrou, P. 2013. SonarQube in Action. Manning Publications, Shelter Island, NY, EUA.
Decan, A. 2022. Empirical study on the use of GitHub Actions in software development. Empirical Software Engineering 27(5): 1–33.
Duvall, P. M.; Matyas, S.; Glover, A. 2007. Continuous integration: Improving software quality and reducing risk. Addison-Wesley, Boston, MA, EUA.
Feathers, M. C. 2013. Trabalho eficaz com código legado. Bookman, Porto Alegre, RS, Brasil.
Fowler, M. 2006. Continuous integration. Disponível em: https://martinfowler.com/articles/continuousIntegration.html. Acesso em: 2 abr. 2025.
Fowler, M. 2019. Refatoração: Aperfeiçoando o design de códigos existentes. 2. ed. Novatec, São Paulo, SP, Brasil.
Freeman, S.; Pryce, N. 2009. Growing object-oriented software, guided by tests. Addison-Wesley, Boston, MA, EUA.
Google Developers. 2023. Angular Testing Guide. Disponível em: https://angular.io/guide/testing. Acesso em: 2 abr. 2025.
Humble, J.; Farley, D. 2010. Continuous delivery: Reliable software releases through build, test, and deployment automation. Addison-Wesley, Boston, MA, EUA.
Martin, R. C. 2009. Código limpo: Habilidades práticas do Agile Software. Alta Books, São Paulo, SP, Brasil.
Meszaros, G. 2007. xUnit test patterns: Refactoring test code. Addison-Wesley, Boston, MA, EUA.
Pacheco, R. F. V. 2024. Testing system to demonstrate requirements compliance in a migration context. Dissertação (Mestrado em Engenharia de Software) – Faculdade de Engenharia, Universidade do Porto, Porto, Portugal.
Silvestre, B. H.; Scombatti Pinto, G. A. 2023. A importância dos testes de software. Revista Interface Tecnológica 20(2): 122–133. Disponível em: https://revista.fatectq.edu.br/interfacetecnologica/article/view/1775. Acesso em: 17 set. 2024.
Article originating from the Final Course Work of the Specialization in Software Engineering of the USP/Esalq MBA
To learn more about the course, click here and access the MBX Academy platform