Abstract
Recently, a new approach to perform regression testing has been defined: the point of interest (POI) testing. A POI, in this context, is any expression of a program. The approach receives as input a set of relations between POIs from a version of a program and POIs from another version, and also a sequence of entry points, i.e. test cases. Then, a program instrumentation, an input test case generation and different comparison functions are used to obtain the final report which indicates whether the alternative version of the program behaves as expected, e.g. it produces the same outputs or it uses less CPU/memory. In this paper, we present a method to improve POI testing by including additional context information for a certain type of POIs. Concretely, we use this method to obtain an enhanced tracing of calls. Additionally, it enables new comparison modes and a categorization of unexpected behaviours.
This work has been partially supported by MINECO/AEI/FEDER (EU) under grant TIN2016-76843-C4-1-R, and by the Generalitat Valenciana under grant PROMETEO-II/2015/013 (SmartLogic). Salvador Tamarit was partially supported by the Conselleria de Educación, Investigación, Cultura y Deporte de la Generalitat Valenciana under grant APOSTD/2016/036.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Although current implementation of POI testing does not still support auto-generation of observation points, it is a key feature that will be part of next release.
- 2.
The occurrence argument (2 in the example) can be omitted, selecting in that case the first occurrence of the variable in the indicated line.
- 3.
More information about Erlang and how we implemented a POI tester for this language are further discussed in Sect. 4.
- 4.
Steps (ii) and (iii) could also be executed in parallel. Here, for the sake of simplicity, we only consider the sequential execution of these steps.
- 5.
Note that a trace consists of a sequence of values since a variable can be evaluated several times. Each evaluation is represented by an element of the sequence.
- 6.
The observed UnBs are represented and identified using literals, e.g. the atom greater could be used to represent an UnB that occurs when an expression is evaluated to a greater value in the new version than in the old one. The UnB representations are defined during the comparison process as it is then when the UnBs are found.
- 7.
All functions presented in Sect. 3 are written in pseudocode. In a particular implementation, all functions should be implemented in the target language.
- 8.
We use the notation ai(key) to refer to access some specific information previously stored in the ai mapping. In this case ai(args) represent the arguments of a POI placed in a function call.
- 9.
- 10.
Function get_ai is defined as
.
- 11.
All free variables used in the rule are represented as \(\mathtt {fv_{*}}\). Each one of these free variables is unique and different to all the original variables of the module.
- 12.
In our implementation, the Erlang module secer_api provides a list of implemented functions to easily select any execution mode.
References
Erlang (1986). http://www.erlang.org/
Anand, S., et al.: An orchestrated survey of methodologies for automated software test case generation. J. Syst. Softw. 86(8), 1978–2001 (2013)
Caballero, R., Martin-Martin, E., Riesco, A., Tamarit, S.: EDD: a declarative debugger for sequential erlang programs. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 581–586. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54862-8_49
M. Cronqvist. redbug (2017). https://github.com/massemanet/redbug
Danglot, B., Vera-Perez, O., Yu, Z., Monperrus, M., Baudry, B.: The emerging field of test amplification: a survey. CoRR, abs/1705.10692 (2017)
Engström, E., Runeson, P.: A qualitative survey of regression testing practices. In: Ali Babar, M., Vierimaa, M., Oivo, M. (eds.) PROFES 2010. LNCS, vol. 6156, pp. 3–16. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13792-1_3
Ericsson AB. dbg (2017). http://erlang.org/doc/man/dbg.html
Ericsson AB. Trace tool builder (2017). http://erlang.org/doc/apps/observer/ttb_ug.html
Insa, D., Pérez, S., Silva, J., Tamarit, S.: Behaviour preservation across code versions in Erlang. Sci. Program. 2018, 1–42 (2018)
Jumpertz, E.: Using QuickCheck and semantic analysis to verify correctness of Erlang refactoring transformations. Master’s thesis, Radboud University Nijmegen (2010)
Reps, T., Ball, T., Das, M., Larus, J.: The use of program profiling for software maintenance with applications to the year 2000 problem. In: Jazayeri, M., Schauer, H. (eds.) ESEC/SIGSOFT FSE -1997. LNCS, vol. 1301, pp. 432–449. Springer, Heidelberg (1997). https://doi.org/10.1007/3-540-63531-9_29
Shapiro, E.Y.: Algorithmic Program Debugging. MIT Press, Cambridge (1982)
Taylor, R., Hall, M., Bogdanov, K., Derrick, J.: Using behaviour inference to optimise regression test sets. In: Nielsen, B., Weise, C. (eds.) ICTSS 2012. LNCS, vol. 7641, pp. 184–199. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-34691-0_14
Till, A.: erlyberly (2017). https://github.com/andytill/erlyberly
Tóth, I.B.M., Horváth, Z.: Reduction of regression tests for Erlang based on impact analysis (2013)
Xie, T., Notkin, D.: Checking inside the black box: regression testing by comparing value spectra. IEEE Trans. Softw. Eng. 31(10), 869–883 (2005)
Yoo, S., Harman, M.: Regression testing minimization, selection and prioritization: a survey. Softw. Test. Verif. Reliab. 22(2), 67–120 (2012)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Pérez, S., Tamarit, S. (2019). Enhancing POI Testing Through the Use of Additional Information. In: Silva, J. (eds) Functional and Constraint Logic Programming. WFLP 2018. Lecture Notes in Computer Science(), vol 11285. Springer, Cham. https://doi.org/10.1007/978-3-030-16202-3_5
Download citation
DOI: https://doi.org/10.1007/978-3-030-16202-3_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-16201-6
Online ISBN: 978-3-030-16202-3
eBook Packages: Computer ScienceComputer Science (R0)