Skip to main content
Log in

An experience report on applying software testing academic results in industry: we need usable automated test generation

  • Experience Report
  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

Abstract

What is the impact of software engineering research on current practices in industry? In this paper, I report on my direct experience as a PhD/post-doc working in software engineering research projects, and then spending the following five years as an engineer in two different companies (the first one being the same I worked in collaboration with during my post-doc). Given a background in software engineering research, what cutting-edge techniques and tools from academia did I use in my daily work when developing and testing the systems of these companies? Regarding validation and verification (my main area of research), the answer is rather short: as far as I can tell, only FindBugs. In this paper, I report on why this was the case, and discuss all the challenging, complex open problems we face in industry and which somehow are “neglected” in the academic circles. In particular, I will first discuss what actual tools I could use in my daily work, such as JaCoCo and Selenium. Then, I will discuss the main open problems I faced, particularly related to environment simulators, unit and web testing. After that, popular topics in academia are presented, such as UML, regression and mutation testing. Their lack of impact on the type of projects I worked on in industry is then discussed. Finally, from this industrial experience, I provide my opinions about how this situation can be improved, in particular related to how academics are evaluated, and advocate for a greater involvement into open-source projects.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Notes

  1. http://www.oxforddictionaries.com/definition/english/science. All links in this paper have been accessed in January 2017

  2. http://www.oxforddictionaries.com/definition/english/engineering

  3. http://blog.ieeesoftware.org/2016/09/the-value-of-applied-research-in.html

  4. http://2011.icse-conferences.org/content/research-industry-panel

  5. https://catenary.wordpress.com/2011/05/19/how-do-practitioners-perceive-software-engineering-research

  6. https://www.sigsoft.org/impact.html

  7. Private communication with one of the Impact Project organizers.

  8. http://www.coverity.com/press-releases/synopsys-completes-coverity-acquisition/

  9. http://www.agitar.com

  10. https://github.com/crawljax/crawljax/issues/496

  11. http://se.mathworks.com/products/simulink

  12. http://www-03.ibm.com/software/products/en/ratirhapfami

  13. http://pitest.org

  14. Anonymous reviewer.

  15. https://github.com

  16. https://github.com/torvalds/linux

  17. www.jetbrains.com/idea/specials/idea/idea.html

  18. http://junit.org

  19. http://maven.apache.org

  20. http://www.apache.org

  21. https://jenkins.io

  22. http://www.eclemma.org/jacoco

  23. http://www.seleniumhq.org

  24. http://wiremock.org

  25. http://rest-assured.io

  26. http://mockito.org

  27. http://blog.takipi.com/we-analyzed-30000-github-projects-here-are-the-top-100-libraries-in-java-js-and-ruby http://blog.takipi.com/we-analyzed-30000-github-projects-here-are-the-top-100-libraries-in-java-js-and-ruby

  28. https://www.theguardian.com/technology/2016/sep/22/yahoo-hack-data-state-sponsored

  29. https://www.owasp.org/index.php/ZAP

  30. http://jmeter.apache.org

  31. http://findbugs.sourceforge.net

References

  • Arcuri A, Campos J, Fraser G (2016) Unit test generation during software development: evosuite plugins for maven, intellij and jenkins. In: IEEE international conference on software testing, verification and validation (ICST)

  • Arcuri A, Iqbal MZ, Briand L (2010) Black-box system testing of real-time embedded systems using random and search-based testing. In: IFIP international conference on testing software and systems (ICTSS), pp 95–110

  • Arcuri A, Iqbal MZ, Briand L (2012) Random testing: theoretical results and practical implications. IEEE Trans Softw Eng (TSE) 38(2):258–277

    Article  Google Scholar 

  • Bessey A, Block K, Chelf B, Chou A, Fulton B, Hallem S, Henri-Gros C, Kamsky A, McPeak S, Engler D (2010) A few billion lines of code later: using static analysis to find bugs in the real world. Commun ACM 53(2):66–75

    Article  Google Scholar 

  • Boehm BW et al. (1981) Software engineering economics, vol 197. Prentice-Hall, Englewood Cliffs (NJ)

    MATH  Google Scholar 

  • Boules N, Douglas K, Feldman S, Fix L, Hager G, Hailpern B, Hebert M, Lopresti D, Mynatt B, Rossbach C et al (2016) The future of computing research: industry-academic collaborations. arXiv:1606.09236

  • Briand L (2012) Embracing the engineering side of software engineering. IEEE Softw 29(4):96–96

    Article  Google Scholar 

  • Coles H, Laurent T, Henard C, Papadakis M, Ventresque A (2016) Pit: a practical mutation testing tool for java. In: ACM international symposium on software testing and analysis (ISSTA). ACM, pp 449–452

  • Collberg C, Proebsting TA (2016) Repeatability in computer systems research. Commun ACM 59(3):62–69

    Article  Google Scholar 

  • Evans G, Austin F (2010) Collaborations among academia, government, and industry in the diagnostics space: barriers and some ideas for solutions. Sci Transl Med 2(63):63mr3

    Article  Google Scholar 

  • Feller W (1968) An introduction to probability theory and its applications, vol 1, 3rd edn. Wiley, New York

  • Fraser G, Arcuri A (2011) EvoSuite: automatic test suite generation for object-oriented software. In: ACM symposium on the foundations of software engineering (FSE), pp 416–419

  • Fraser G, Arcuri A (2015) Achieving scalable mutation-based generation of whole test suites. Empir Softw Eng (EMSE) 20(3):783–812

    Article  Google Scholar 

  • Garousi V, Eskandar MM, Herkiloğlu K. (2016) Industry–academia collaborations in software testing: experience and success stories from Canada and Turkey. Softw Qual J pp 1–53. https://doi.org/10.1007/s11219-016-9319-5

  • Garousi V, Felderer M (2017) Worlds apart: a comparison of industry and academic focus areas in software testing. IEEE Softw 34(5):38–45

    Article  Google Scholar 

  • Garousi V, Felderer M, Kuhrmann M, Herkiloğlu K (2017) What industry wants from academia in software testing?: Hearing practitioners’ opinions. In: Proceedings of the 21st international conference on evaluation and assessment in software engineering. ACM, pp 65–69

  • Garousi V, Petersen K, Ozkan B (2016) Challenges and best practices in industry-academia collaborations in software engineering: a systematic literature review. Inf Softw Technol (IST) 79:106–127

    Article  Google Scholar 

  • Gorschek T, Tempero E, Angelis L (2014) On the use of software design models in software development practice: an empirical investigation. J Syst Softw (JSS) 95:176–193

    Article  Google Scholar 

  • Griswold WG, Opdyke WF (2015) The birth of refactoring: a retrospective on the nature of high-impact software engineering research. IEEE Softw 32(6):30–38

    Article  Google Scholar 

  • Hebig R, Quang TH, Chaudron MR, Robles G, Fernandez MA (2016) The quest for open source projects that use uml: mining github. In: Proceedings of the ACM/IEEE 19th international conference on model driven engineering languages and systems. ACM, pp 173–183

  • Hovemeyer D, Pugh W (2004) Finding bugs is easy. SIGPLAN Not 39 (12):92–106

    Article  Google Scholar 

  • Iqbal MZ, Arcuri A, Briand L (2010) Environment modeling with UML/MARTE to support black-box system testing for real-time embedded systems: methodology and industrial case studies. In: ACM/IEEE international conference on model driven engineering languages and systems (MODELS), pp 286–300

  • Iqbal MZ, Arcuri A, Briand L (2015) Environment modeling and simulation for automated testing of soft real-time embedded software. Softw Syst Model 14(1):483–524

    Article  Google Scholar 

  • Iqbal MZZ (2012) Environment model-based system testing of real-time embedded systems. Ph.D. thesis, University of Oslo

  • Jia Y, Harman M (2011) An analysis and survey of the development of mutation testing. IEEE Trans Softw Eng (TSE) 37(5):649–678

    Article  Google Scholar 

  • Katz HP, Goldfinger SE, Fletcher SW (2002) Academia-industry collaboration in continuing medical education: description of two approaches. J Contin Educ Health Prof 22(1):43–54

    Article  Google Scholar 

  • Lo D, Nagappan N, Zimmermann T (2015) How practitioners perceive the relevance of software engineering research. In: ACM symposium on the foundations of software engineering (FSE). ACM, pp 415–425

  • Mesbah A, Bozdag E, Van Deursen A (2008) Crawling ajax by inferring user interface state changes. In: Eighth international conference on web engineering, 2008. ICWE’08. IEEE, pp 122–134

  • Mirzaaghaei M, Mesbah A (2014) Dom-based test adequacy criteria for web applications. In: ACM international symposium on software testing and analysis (ISSTA). ACM, pp 71–81

  • Myers G (1979) The art of software testing. Wiley, New York

    Google Scholar 

  • Norman DA (2010) The research-practice gap: the need for translational developers. Interactions 17(4):9–12

    Article  Google Scholar 

  • Offutt J (2013) Putting the engineering into software engineering education. IEEE Softw 30(1):96–96

    Article  Google Scholar 

  • Osterweil LJ, Ghezzi C, Kramer J, Wolf AL (2008) Determining the impact of software engineering research on practice. Computer 41(3):39–49

    Article  Google Scholar 

  • Pacheco C, Lahiri SK, Ernst MD, Ball T (2007) Feedback-directed random test generation. In: ACM/IEEE international conference on software engineering (ICSE), pp 75–84

  • Pechenizkiy M, Puuronen S, Tsymbal A (2008) Towards more relevance-oriented data mining research. Intelligent Data Analysis 12(2):237–249

    MATH  Google Scholar 

  • Rafique Y, Mišić VB (2013) The effects of test-driven development on external quality and productivity: a meta-analysis. IEEE Trans Softw Eng (TSE) 39(6):835–856

    Article  Google Scholar 

  • Schmidt DC (2006) Model-driven engineering. Computer-IEEE Computer Society 39(2):25

    Article  Google Scholar 

  • Tsubouchi M, Morishita R, Tabata Y, Matsui S, Kawakami K (2008) Critical issues for effective collaboration between academia and industry in the field of regenerative medicine in Japan. REGENERATIVE MEDICINE 3(4). https://doi.org/10.2217/17460751.3.4.497

  • Whittle J, Hutchinson J, Rouncefield M, Burden H, Heldal R (2013) Industrial adoption of model-driven engineering: are the tools really the problem?. In: International conference on model driven engineering languages and systems. Springer, pp 1–17

  • Wilson G, Aranda J (2011) Empirical software engineering. Am Sci 99(6):466

    Article  Google Scholar 

  • Yoo S, Harman M (2012) Regression testing minimization, selection and prioritization: a survey. Software Testing, Verification and Reliability (STVR) 22 (2):67–120

    Article  Google Scholar 

Download references

Acknowledgments

I wish to thank Lionel Briand for insightful discussions. I also wish to thank Per Lauvås and Zohaib Iqbal for useful feedback on an early draft of this paper. This work is supported by the National Research Fund, Luxembourg (FNR/P10/03).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andrea Arcuri.

Additional information

Communicated by: Saurabh Sinha

This work is supported by the National Research Fund, Luxembourg (FNR/P10/03).

Appendix A

Appendix A

1.1 A.1 IntelliJ IDEA

Like for production code, to write tests you need an editor. One of the most popular IDEs for Java is IntelliJ IDEA.Footnote 17 Simply put, the autocomplete feature in IntelliJ IDEA is the most important advancement in software development I have experienced since I started to write code in 2000 when I was a student. No longer continuous copy&paste of long variable/method names, or even worse typing them directly. Most of the time, just the first one/two letters are enough to correctly autocomplete. Plus there are all the other kinds of smart autocomplete, like for example autoclosing of XML tags, or showing an autofilled selection of valid data based on the current context (especially useful when dealing with Maven pom files). Other IDEs have some basic support for autocomplete, but they look very basic in comparison.

From a scientific point of view, arguably there is not much “innovation” in an autocomplete feature, as it is a relatively simple idea. However, likely there are many engineering challenges to make it right and user-friendly in a general way applicable in different contexts. Would these engineering challenges be of interest for an academic conference? However, IntelliJ IDEA also provides cutting-edge techniques related to code-refactoring, and code-refactoring has deep roots in software engineering research (Griswold and Opdyke 2015).

Academic research can have large influence on practice (e.g., refactoring), but there are often important topics, with direct impact on software development practice, that have received less attention (e.g., autocomplete). What is important for practitioners does not always match what researchers find interesting to work on.

IntelliJ IDEA is developed by a Czech company called JetBrains, founded by three Java developers in 2000. The community edition is open-source, although the pro version (needed for enterprize programming) requires to buy a license.

1.2 A.2 JUnit

To write and run tests, you need a framework. In the Java world, the de-facto standard is JUnit.Footnote 18 There are other popular frameworks as well, like TestNG and Spock, but none of the projects I worked in used them. JUnit was founded by a software engineer and a computer scientist (currently working at Facebook and Microsoft).

1.3 A.3 Maven

To compile a Java project and handle all the third-party libraries automatically, you need a build tool. Currently, the de-factor standard is Maven.Footnote 19 Other options are Gradle and Ant.

Of particular interest is the fact that build tools are used to run test cases as well, e.g. by executing the command “mvn test”. Maven has two main official plugins dealing with the running of tests: Surefire (for unit testing) and Failsafe (for integration testing). These plugins provide a lot of extra functionalities, like for example the ability of running tests in parallel or re-executing flaky tests up to a certain number of times.

Maven is developed by the Apache Software Foundation,Footnote 20 a non-profit corporation with apparently no employee but thousands of volunteers.

1.4 A.4 Jenkins

When several developers work on the same piece of software, it is important to have a remote Continuous Integration server, where the system is built at each new pushed code change. Each time the system is built, all the regression tests are automatically run as well. This is also important for long to execute test suites, which might be cumbersome otherwise to run directly on the developers’ machines.

Arguably, JenkinsFootnote 21 is the most popular Continuous Integration server for Java. Another one is for example Bamboo. Jenkins has several utilities and plugins to help monitor the execution and collect the results of the test cases.

Jenkins is an open-source fork of Hudson, which was originally developed at Sun Microsystems (the company behind Java before being acquired by Oracle). The lead developer of Jenkins/Hudson is an engineer now working as CTO at CloudBees, a company that provides continuous delivery solutions powered by Jenkins.

1.5 A.5 JaCoCo

How many tests one should write? Is the current test suite “good enough” or should it be extended? Of course, one can (and should) have a test for each requirement, but that does not tell you what in the code has been tested. A complementary approach is to look at what is executed by the tests, and then check if any part of the source code has not been exercised. If some parts of the code is not executed, it would be good to add tests to cover them, as those parts might have bugs.

One of the most used tools for Java code coverage is the open-source JaCoCo.Footnote 22 Others are Cobertura and the commercial Clover. JaCoCo was started by an engineer now working as CTO in a consulting company.

1.6 A.6 Selenium

Writing system level tests for a web application is a challenge, as users interact with it by using a browser (e.g., Chrome or Firefox). The SeleniumFootnote 23 tool simplifies this task by making possible to programmatically control browsers directly from the test cases. Selenium was originally started at ThoughtWorks as an internal tool to simplify their testing activities.

1.7 A.7 WireMock

Many enterprizes today rely on web services (e.g., SOAP and REST), especially when using microservice architectures. Writing deterministic tests against applications using web services is challenging, as usually the developers of such applications do not have control over those external web services.

WireMockFootnote 24 is a tool that starts a proxy server, where HTTP responses can be easily configured based on the incoming messages. This can be used to practically mock away those external web services without the need to modify the tested application. WireMock is developed and maintained by an engineer currently working as a consultant.

1.8 A.8 REST-Assured

When testing a RESTful web service, one has to craft an HTTP message, open a TCP connection, send the message, read back the answer, and finally evaluate assertions on such response. To greatly simplify this sequence of operations, one can use a library like REST-Assured.Footnote 25 REST-Assured was started by an engineer working as a consultant.

1.9 A.9 Mockito

When unit testing code, there is often the problem of dependencies that need complex initialization. At times, some classes cannot be even instantiated, as only interfaces are available. A solution for this kind of problems is to create mock objects for those dependencies.

In Java, there are several libraries that can create mocks, like EasyMock and JMock. The most used one is Mockito.Footnote 26 Mockito was started by an engineer working at ThoughtWorks. As of 2013, Mockito is among the top 10 libraries used in Java among open-source projects.Footnote 27

1.10 A.10 ZAP

Security is an extremely important topic when dealing with web applications. It is not rare that security breaches end up in the newspapers, e.g. when hackers steal large number of personal details, like the 500 million user accounts stolen at YahooFootnote 28 in 2014. Often, you just need a silly mistake, like forgetting to secure a single cookie, to compromise a user account or a whole web application.

To help mitigating this type of issues, one can use the ZAPFootnote 29 tool, which can automatically do different kinds of security attacks against web applications. ZAP is one of the main tools of the OWASP Foundation, a non-profit organization dedicated to web application security. ZAP was started by an engineer now working as a security expert at Mozilla.

1.11 A.11 JMeter

Besides validating the requirements of a web application, there are also non-functional properties that need to be taken into account, like for example response time. Would the application behave properly when under heavy load, like for example hundreds of thousands of users accessing it at the same time?

To help writing performance tests, one can use JMeter.Footnote 30 JMeter is developed by the members of the Apache Foundation.

1.12 A.12 FindBugs

It is not uncommon that developers make the same typical mistakes, like opening a resource and then forgetting to close it. Or calling methods on immutable objects like strings and then forgetting to save the result in a variable. It is possible to define patterns of common mistakes, and then statically scan source code for those patterns without the need to execute the analyzed code. One great benefit of statical analysis is that it can be easily applied on large code bases and find real errors relatively quickly.

The most famous static analysis tool for Java is FindBugs.Footnote 31 Another popular tool is SonarQube, which also provides a commercial version. FindBugs was originally developed by academics at the University of Maryland (Hovemeyer and Pugh 2004).

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Arcuri, A. An experience report on applying software testing academic results in industry: we need usable automated test generation. Empir Software Eng 23, 1959–1981 (2018). https://doi.org/10.1007/s10664-017-9570-9

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10664-017-9570-9

Keywords

Navigation