Abstract
Model based testing offers a powerful mechanism to test applications that change dynamically and continuously, for which only some limited black-box knowledge is available (this is typically the case of future internet applications). Models can be inferred from observations of real executions and test cases can be derived from models, according to various strategies (e.g., graph or random visits). The problem is that a relatively large proportion of the test cases obtained in this way might result to be non executable, because they involve infeasible paths.
In this paper, we propose a novel test case derivation strategy, based on the computation of the \(N\)-gram statistics. Event sequences are generated for which the subsequences of size \(N\) respect the distribution of the \(N\)-tuples observed in the execution traces. In this way, generated and observed sequences share the same context (up to length \(N\)), hence increasing the likelihood for the generated ones of being actually executable. A consequence of the increased proportion of feasible test cases is that model coverage is also expected to increase.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
EU FP7 project n. 257574.
References
Dias Neto, A.C., Subramanyan, R., Vieira, M., Travassos, G.H.: A survey on model-based testing approaches: a systematic review. In: Proceedings of the International Workshop on Empirical Assessment of Software Engineering Languages and Technologies (Co-located with ASE ’07), WEASELTech ’07, New York, USA, pp. 31–36. ACM (2007)
Mariani, L., Marchetto, A., Nguyen, C.D., Tonella, P., Baars, A.I.: Revolution: automatic evolution of mined specifications. In: Proceedings of the 23rd IEEE International Symposium on Software, Reliability Engineering (ISSRE), pp. 241–250 (2012)
Dallmeier, V., Lindig, C., Wasylkowski, A., Zeller, A.: Mining object behavior with ADABU. In: Proceedings of the 2006 International Workshop on Dynamic Systems Analysis WODA ’06, New York, USA, pp. 17–24. ACM (2006)
Biermann, A., Feldman, J.: On the synthesis of finite-state machines from samples of their behavior. IEEE Trans. Comput. 21(6), 592–597 (1972)
Krka, I., Brun, Y., Popescu, D., Garcia, J., Medvidovic, N.: Using dynamic execution traces and program invariants to enhance behavioral model inference. In: ICSE (2), pp. 179–182 (2010)
Lorenzoli, D., Mariani, L., Pezzè, M.: Automatic generation of software behavioral models. In: 30th International Conference on Software Engineering (ICSE). IEEE Computer Society (2008)
Tonella, P., Marchetto, A., Nguyen, C.D., Jia, Y., Lakhotia, K., Harman, M.: Finding the optimal balance between over and under approximation of models inferred from execution logs. In: Proceedings of the Fifth IEEE International Conference on Software Testing, Verification and Validation (ICST), pp. 21–30 (2012)
Hedley, D., Hennell, M.A.: The causes and effects of infeasible paths in computer programs. In: Proceedings of the 8th International Conference on Software Engineering ICSE ’85, Los Alamitos, CA, USA, pp. 259–266. IEEE Computer Society Press (1985)
Jurafsky, D., Martin, J.H.: Speech and Language Processing: An Introduction to Speech Recognition, Computational Linguistics and Natural Language Processing. Pearson Prentice Hall, Englewood Cliffs (2007)
Pezzè, M., Young, M.: Software Testing and Analysis: Process Principles and Techniques. Wiley, Hoboken (2007)
Shafique, M., Labiche, Y.: A systematic review of model based testing tool support. Technical Report SCE-10-04, Carleton University, Canada (2010)
Briand, L.C., Labiche, Y.: A UML-based approach to system testing. In: Gogolla, M., Kobryn, C. (eds.) UML 2001. LNCS, vol. 2185, pp. 194–208. Springer, Heidelberg (2001)
Kim, Y., Hong, H., Bae, D., Cha, S.: Test cases generation from UML state diagrams. IEE Proc. Softw. 146(4), 187–192 (1999)
Turner, C.D., Robson, D.J.: The state-based testing of object-oriented programs. In: Proceedings of the Conference on Software Maintenance (ICSM), Montreal, Canada, pp. 302–310. IEEE Computer Society (1993)
Yuan, X., Memon, A.M.: Using GUI run-time state as feedback to generate test cases. In: Proceedings the International Conference on Software Engineering (ICSE), Washington, DC, USA, pp. 396–405. IEEE Computer Society (2007)
Marchetto, A., Tonella, P., Ricca, F.: State-based testing of ajax web applications. In: Proceedings of IEEE International Conference on Software Testing (ICST), Lillehammer, Norway, pp. 121–131 (2008)
Andrews, A., Offutt, J., Alexander, R.: Testing web applications by modeling with FSMs. Softw. Syst. Model. 4(3), 326–345 (2005)
Dallmeier, V., Lindig, C., Wasylkowski, A., Zeller, A.: Mining object behavior with ADABU. In: Proceedings of the International Workshop on Dynamic Analysis (WODA), Shangai, China, pp. 17–24 (2006)
Dallmeier, V., Knopp, N., Mallon, C., Hack, S., Zeller, A.: Generating test cases for specification mining. In: Proceedings of the 19th International Symposium on Software Testing and Analysis ISSTA ’10, New York, USA, pp. 85–96. ACM (2010)
Offutt, J., Abdurazik, A.: Generating tests from UML specifications. In: France, R., Rumpe, B. (eds.) UML 1999. LNCS, vol. 1723, pp. 416–429. Springer, Heidelberg (1999)
Stocks, P., Carrington, D.: A framework for specification-based testing. IEEE Trans. Softw. Eng. 22, 777–793 (1996)
Corbett, J.C., Dwyer, M.B., Hatcliff, J., Laubach, S., Pasareanu, C.S., Robby, Zheng, H.: Bandera: extracting finite-state models from java source code. In: Proceedings of the International Conference on Software Engineering, pp. 439–448 (2000)
Walkinshaw, N., Bogdanov, K., Damas, C., Lambeau, B., Dupont, P.: A framework for the competitive evaluation of model inference techniques. In: Proceedings of the International Workshop on Model Inference in Testing (MIIT) (2010)
Acknowledgments
This work has been funded by the European Union FP7 project FITTEST (grant agreement n. 257574).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Tonella, P., Tiella, R., Nguyen, C.D. (2014). N-Gram Based Test Sequence Generation from Finite State Models. In: Vos, T., Lakhotia, K., Bauersfeld, S. (eds) Future Internet Testing. FITTEST 2013. Lecture Notes in Computer Science(), vol 8432. Springer, Cham. https://doi.org/10.1007/978-3-319-07785-7_4
Download citation
DOI: https://doi.org/10.1007/978-3-319-07785-7_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-07784-0
Online ISBN: 978-3-319-07785-7
eBook Packages: Computer ScienceComputer Science (R0)