- Research Article
- 10.1002/stvr.443
Editorial: Agility must be good for testing
- Sep 01, 2010
- Software Testing, Verification and Reliability
- Jeff Offutt
Editorial: Agility must be good for testing
Today, software availability as well as adaptability has a strong impact on application development. Together with the success of the Internet technology, it is often necessary to offer a web-based software solution. For Java development, J2EE builds a bridge from traditional towards web application development. Java Server Pages and Servlets allow the implementation of web sites with dynamic content. Anyway, it is still possible to apply well-tried programming paradigms, e.g. the Model-View-Controller (MVC) paradigm. With regard to software quality as well as adaptability, application development is affected more and more by advanced testing techniques. Especially unit testing provides a powerful technique to develop new functionality as well as to extend and reuse existing parts. This is also strengthened by the success of agile processes that force test-driven development. From there, application code grows up with unit tests from scratch on. For Java, JUnit has become the defacto standard unit test environment. Nevertheless, test-driven web application development requires broadening the unit test approach. Considering the special requirements of web application development, both the scope of the unit tests as well as the JUnit framework itself have to be extended to enable a test-driven development. In this paper, we present an approach to customize the unit test cycle as well as the JUnit framework towards a test-driven web application development.
Editorial: Agility must be good for testing
Editorial: Agility must be good for testing
Unit Tests and TDD
While both acceptance-test-driven development (ATDD) and test-driven development (TDD) are methodologies that advocate writing the tests before the code, ATDD (or BDD) is usually considered to lend itself better to bigger test scopes and to scenarios that describe how the users use the system, while TDD is considered to lend itself more specifically to unit tests, which uses the smallest test scope (of a single class or even a method), and therefore tests more technical details. For that reason, unit tests and TDD are considered practices that are done directly by the same developer that implements the code under test (CUT). While toward the end of this chapter we’ll question the distinction between TDD and ATDD, we first need to understand more about unit tests and TDD in general.
Read moreAdding Criteria-Based Tests to Test Driven Development
Test driven development (TDD) is the practice of writing unit tests before writing the source. TDD practitioners typically start with example-based unit tests to verify an understanding of the software's intended functionality and to drive software design decisions. Hence, the typical role of test cases in TDD leans more towards specifying and documenting expected behavior, and less towards detecting faults. Conversely, traditional criteria-based test coverage ignores functionality in favor of tests that thoroughly exercise the software. This paper examines whether it is possible to combine both approaches. Specifically, can additional criteria based tests improve the quality of TDD test suites without disrupting the TDD development process? This paper presents the results of an observational study that generated additional criteria-based tests as part of a TDD exercise. The criterion was mutation analysis and the additional tests were designed to kill mutants not killed by the TDD tests. The additional unit tests found several software faults and other deficiencies in the software. Subsequent interviews with the programmers indicated that they welcomed the additional tests, and that the additional tests did not inhibit their productivity.
Read moreAffective reactions and test-driven development: Results from three experiments and a survey
Affective reactions and test-driven development: Results from three experiments and a survey
On the effectiveness of unit tests in test-driven development
Background: Writing unit tests is one of the primary activities in test-driven development. Yet, the existing reviews report few evidence supporting or refuting the effect of this development approach on test case quality. Lack of ability and skills of developers to produce sufficiently good test cases are also reported as limitations of applying test-driven development in industrial practice. Objective: We investigate the impact of test-driven development on the effectiveness of unit test cases compared to an incremental test last development in an industrial context. Method: We conducted an experiment in an industrial setting with 24 professionals. Professionals followed the two development approaches to implement the tasks. We measure unit test effectiveness in terms of mutation score. We also measure branch and method coverage of test suites to compare our results with the literature. Results: In terms of mutation score, we have found that the test cases written for a test-driven development task have a higher defect detection ability than test cases written for an incremental test-last development task. Subjects wrote test cases that cover more branches on a test-driven development task compared to the other task. However, test cases written for an incremental test-last development task cover more methods than those written for the second task. Conclusion: Our findings are different from previous studies conducted at academic settings. Professionals were able to perform more effective unit testing with test-driven development. Furthermore, we observe that the coverage measure preferred in academic studies reveal different aspects of a development approach. Our results need to be validated in larger industrial contexts.
Read moreUsing spring Roo for the test-driven development of Web applications
Software should be developed in a way that achieves high external and internal quality. Most programs have to be maintained or are extended. They should not only adhere to their requirements but allow to be efficiently changed. Model-driven software development (MDSD) and test-driven development (TDD) are techniques that help to satisfy this demand. We present a novel approach combining MDSD and TDD while using the Spring Roo Web development framework. Besides discussing existing work and the background, we sketch a test-driven Web development process. We then evaluate its feasibility in an exemplary scenario. Thereby, we contribute to the body of scientific knowledge on Web development frameworks in the field of MDSD and TDD.
Read moreTDD: WHEN NEEDED, ADN MOST IMPORTANTLY, WHEN NOT
Software testing is a procedure that allows to confirm or deny the performance of the code and the correctness of its work. Thus, testing plays an important role in software development, because the quality of the code and productivity depend on the choice of the testing method. Unit testing is the most common testing method that aims to test each piece of code. Among the various approaches to unit testing, Test-Driven Development (TDD) and Test Last Development (TLD) are the most common. Therefore, this paper discusses 2 main methods of software development: TDD and TLD. This work is aimed to analyze the effectiveness of TDD as opposed to TLD. As a result, the effectiveness of TDD slightly exceeds TLD. Granularity, uniformity, and refactoring showed positive key results in terms of code quality and performance, while sequencing did not significantly affect any of these factors.Thus, during software development, it is worth applying separate TDD processes, such as granularity, uniformity, and refactoring.
Read moreAnalysis on Customer Information Management System for Enterprise
With the development of market economy, competition is increasingly fierce, enterprises are facing greater challenges and opportunities, so how to maintain and develop customers is an important factor for enterprises to survive long term, therefore, the use of customer information management system is the developing trend in the future. This article conducts analysis from the execution process, application route, system composition, use case modeling and other aspects, it constructed the system constituted by customer information management, marketing management, sales information management, service and customer care, customer information analysis and other core functions, as well as data backup and recovery, code data maintenance, configuration information management, operating manuals, system help and other non-core functions. This research laid the foundation for the system development, which plays an important role to enhance the competitiveness of enterprises. Introduction With the rapid development and wide spread of computer technology, the application range of computer is no longer limited to simple scientific computing, but penetrated into all areas, such as education, industry and enterprise. Enterprise is the distribution center of production and management, and there is so much production data and enterprise customers' data, so it has to manage a lot of information data. The famous 80:20 theorem states that of a company's income comes from 20% of the customers, so, complete customer information management and service is the key for enterprises to get 80% of income from 20% of the customers. According to the attention center, development stage of enterprise from the product-centric and sales-centric to the profit-centric, now it has entered into a customer-centric stage. Therefore, it is necessary to apply computer technology and information technology to the enterprise customer information management to form a new management model [1, 2]. In the traditional enterprise customer information management model, leaders or sellers record the customer information in their notebooks or computers by manually, these information can not be updated and shared, therefore, it often result in the loss of customer information, or delay of the product submission resulting in unnecessary loss, it may misses opportunities because of information loss. Using computer technology to develop customer information management system to manage enterprise customers' information, which is a new management model. Even though the market is constantly changing, rely on the information management system, enterprises can fully grasp the customer information to win in the competitive economic tide. The paper designs enterprise customer information management system based on JSP technology to provide technical support for software development. Analysis on Execution Process JSP (Java Server Pages) is designed to simplify the Servlet, which is a dynamic web technology standard advocated by Sun Microsystems and established by many companies. Java program section and JSP tag should be inserted into traditional HTML Web page file to form a JSP file that suffix is *.jsp. Web applications developed by JSP can be used cross-platform, it can run both on Linux and other operating systems, which achieved java extension in Html syntax. The same as International Conference on Management Science, Education Technology, Arts, Social Science and Economics (MSETASSE 2015) © 2015. The authors Published by Atlantis Press 988 Servlet, JSP performs on the server side. Usually returned to the client is HTML text, so client side will be able to browse if it has browser [3]. JSP technology codes tags and scriptlets of class XML used Java programming language to encapsulate the processing logic to generate dynamic pages. Web page can also access the application logic of resources in the service side through tags and scriptlets. JSP separates the display of web page logic and design and supports reusable component-based design to make the development of Web-based applications quick and easy. JSP is a dynamic page technology, the purpose of it is to separate the presentation logic from the Servlet. Java Servlet is the technology base of JSP, and large-scale Web application development requires both Java Servlet and JSP to complete. JSP has all the characteristics for the Internet of Java technology, such as easy-to-use, fully object-oriented, platform-independent, security and reliability. Execution process of JSP is shown in Fig. 1. Sending JSP file request in client side The Web server receives the request The result is the html code Generating a 404 error Converting into Java file
Read moreFrom Code to Quality: Exploring Test-Driven Development in Modern Software Engineering
Test-Driven Development (TDD) is a powerful methodology that bridges the gap between testing and development in software engineering. This approach prioritizes writing tests before writing the actual code, ensuring that each component meets its intended purpose from the outset. The process of TDD typically follows a simple cycle of writing a test, implementing the code, and refactoring, known as the "Red-Green-Refactor" loop. TDD offers several advantages, including enhanced code quality, reduced debugging time, and a smoother integration process, making it an essential practice for both developers and testers. By focusing on small, incremental code changes, TDD also encourages developers to write cleaner, more maintainable code. In addition, TDD fosters collaboration between developers and testers, as it requires early test creation and feedback integration. Despite some initial challenges, such as the learning curve and time investment, TDD has proven to increase overall productivity and product reliability. This article provides a comprehensive guide to understanding and implementing TDD, including its benefits, challenges, and real-world applications, to help teams adopt this best practice effectively. Keywords: Test-Driven Development, TDD methodology, Agile testing, Automated testing, Code quality, Red- Green-Refactor cycle, Unit testing, Continuous testing, Test-first approach, Refactoring code
Read moreTeaching Programming to Large Student Groups through Test Driven Development - Comparing Established Methods with Teaching based on Test Driven Development
This paper presents an approach for teaching programming in large university classes based on test driven development (TDD) methods. The approach aims at giving the students an industry-like environment already in their education and introduces full automation and feedback programming classes through unit testing. The focus for this paper is to compare the novel approach with existing teaching methods. It does so by comparing introduction to programming classes in two institutions. One university ran a TDD teaching process with fully automated assessments and feedback, while the other ran a more traditional on-line environment with manual assessments and feedback. The TDD approach has clear advantages when it comes to learning programming as it is done in the industry, including being familiar with tools and approaches used. However, it lacks ways of dealing with cheating and stimulating creativity in student submissions.
Read moreEvolutionary software development using Test Driven approach
Test-Driven Development (TDD) is an evolutionary approach in which unit tests are incrementally written prior to code implementation. This paper will discuss about TDD and will compare its development procedure with that of traditional (i.e. test-last) methodology. The TDD approach is radically different from traditional approach; in traditional approach, tests are written once the production code has been completely written down, unlike TDD where tests are written prior to writing the code. Although Test driven development has attracted the attention of professionals, the empirical evidence of its superiority over traditional approach is very limited. In this report we will discuss both approaches and also try to put some light over how does TDD stand along with other SDLC models. In addition, we will look whether TDD has any influence on real world projects; if yes then how?
Read moreDoes the Performance of TDD Hold Across Software Companies and Premises? A Group of Industrial Experiments on TDD
Test-Driven Development (TDD) has been claimed to increase external software quality. However, the extent to which TDD increases external quality has been seldom studied in industrial experiments. We conduct four industrial experiments in two different companies to evaluate the performance of TDD on external quality. We study whether the performance of TDD holds across the premises of the same company and across companies. We identify participant-level characteristics impacting results. Iterative-Test Last (ITL), the reverse approach of TDD, outperforms TDD in three out of four premises. ITL outperforms TDD in both companies. The larger the experience with unit testing and testing tools, the larger the difference in performance between ITL and TDD (in favour of ITL). Technological environment (i.e., programming language and testing tool) seems not to impact results. Evaluating participant-level characteristics impacting results in industrial experiments may ease the understanding of TDD’s performance in realistic settings.
Read moreInvestigating the Impact of Development Task on External Quality in Test-Driven Development: An Industry Experiment
Reviews on test-driven development (TDD) studies suggest that the conflicting results reported in the literature are due to unobserved factors, such as the tasks used in the experiments, and highlight that there are very few industry experiments conducted with professionals. The goal of this study is to investigate the impact of a new factor, the chosen <i>task</i> , and the <i>development approach</i> on external quality in an industrial experimental setting with 17 professionals. The participants are junior to senior developers in programming with Java, beginner to novice in unit testing, JUnit, and they have no prior experience in TDD. The experimental design is a <inline-formula><tex-math notation="LaTeX">$2\times 2$</tex-math></inline-formula> cross-over, i.e., we use two tasks for each of the two approaches, namely TDD and incremental test-last development (ITLD). Our results reveal that both <i>development approach</i> and <i>task</i> are significant factors with regards to the external quality achieved by the participants. More specifically, the participants produce higher quality code during ITLD in which splitting user stories into subtasks, coding, and testing activities are followed, compared to TDD. The results also indicate that the participants produce higher quality code during the implementation of Bowling Score Keeper, compared to that of Mars Rover API, although they perceived both tasks as of similar complexity. An interaction between the <i>development approach</i> and <i>task</i> could not be observed in this experiment. We conclude that variables that have not been explored so often, such as the extent to which the task is specified in terms of smaller subtasks, and developers’ unit testing experience might be critical factors in TDD experiments. The real-world appliance of TDD and its implications on external quality still remain to be challenging unless these uncontrolled and unconsidered factors are further investigated by researchers in both academic and industrial settings.
Read moreAre There Any Unit Tests? An Empirical Study on Unit Testing in Open Source Python Projects
Unit testing is an essential practice in Extreme Programming (XP) and Test-driven Development (TDD) and used in many software lifecycle models. Additionally, a lot of literature deals with this topic. Therefore, it can be expected that it is widely used among developers. Despite its importance, there is no empirical study which investigates, whether unit tests are used by developers in real life projects at all. This paper presents such a study, where we collected and analyzed data from over 70K revisions of 10 different Python projects. Based on two different definitions of unit testing, we calculated the actual number of unit tests and compared it with the expected number (as inferred from the intentions of the developers), had a look at the mocking behavior of developers, and at the evolution of the number of unit tests. Our main findings show, (i) that developers believe that they are developing more unit tests than they actually do, (ii) most projects have a very small amount of unit tests, (iii) developers make use of mocks, but these do not have a significant influence on the number of unit tests, (iv) four different patterns for the evolution of the number of unit tests could be detected, and (v) the used unit test definition has an influence on the results.
Read moreTest Driven Development with Continuous Integration: A Literature Review
When a software product is composed of hundreds of components with complicated dependency relationship among them, change in one component can affect lots of other components' behaviour. Test Driven Development (TDD) is an approach for developing programs incrementally by first writing tests and then writing enough code to satisfy them. Continuous integration is a process that provides rapid and automatic feedback on the security of the applications that are undergoing development. Test-driven development (TDD) and continuous integration (CI) has changed the way software is tested. Software testing was often a separate process at the end of a project. It is now being worked on during the entire development period. TDD and CI rely on unit tests. This paper provides a literature study on two closely related software development approaches viz. Test Driven Development and Continuous Integration.
Read more