Nothing Special   »   [go: up one dir, main page]

Skip to main content

Sound Test Case Generation for Concurrent Mobile Features

  • Conference paper
  • First Online:
Formal Methods: Foundations and Applications (SBMF 2023)

Abstract

It is well-recognised that testing concurrent systems poses challenges due to their complex interactions and behaviours, as well as the difficulty to reproduce failures. We propose a sound strategy for testing concurrent mobile applications by first extracting use cases that capture interleavings of behaviours of existing test cases for individual features. From these use cases, we generate test cases that are still sequential but exercise the execution of concurrent features. Our approach incorporates a dependency analysis to ensure a consistent execution order of test steps, avoiding incoherent sequences, like sending a message without establishing an internet connection. We introduce a conformance relation, \(\mathbf {cspio_{q}}\), based on \(\textbf{cspio}\), but extended to consider quiescent behaviour (output absence) as in \(\textbf{ioco}\), a widely recognised conformance relation for formal software testing. We then optimise the strategy, which involves permuting test steps without the need to generate use cases but preserving soundness. We discuss tool support and conduct an empirical evaluation to assess the effectiveness of the overall strategy in terms of test coverage and bug detection. The results indicate that our approach yields higher coverage and potential bug detection compared to the set of tests generated by Motorola engineers.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Broy, M., Jonsson, B., Katoen, J.-P., Leucker, M., Pretschner, A. (eds.): Model-Based Testing of Reactive Systems. LNCS, vol. 3472. Springer, Heidelberg (2005). https://doi.org/10.1007/b137241

    Book  MATH  Google Scholar 

  2. Carvalho, G.: NAT2TEST: Generating Test Cases from Natural Language Requirements Based on CSP. Federal University of Pernambuco, 2011 (2016)

    Google Scholar 

  3. Ferreira, F., Neves, L., Silva, M., Borba, P.: TaRGeT: a model based product line testing tool. In: Proceedings of CBSoft 2010 - Tools Panel (2010)

    Google Scholar 

  4. Nogueira, S., Sampaio, A., Mota, A.: Test generation from state based use case models. Formal Aspects Comput. 26, 441–490 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  5. Almeida, R.: Automatic Test Case Generation for Concurrent Features from Natural Language Specifications. Federal Rural University of Pernambuco (2019)

    Google Scholar 

  6. Gibson-Robinson, T., Armstrong, P., Boulgakov, A., Roscoe, A.W.: FDR3 17 a modern refinement checker for CSP. In: Tools and Algorithms for the Construction and Analysis of Systems, pp. 187–201 (2014)

    Google Scholar 

  7. Roscoe, A.: The Theory and Practice of Concurrency. Prentice Hall PTR, Upper Saddle River (1998)

    Google Scholar 

  8. Tretmans, J.: Testing concurrent systems: a formal approach. In: Baeten, J.C.M., Mauw, S. (eds.) CONCUR 1999. LNCS, vol. 1664, pp. 46–65. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48320-9_6

    Chapter  Google Scholar 

  9. Jard, C., Jéron, T.: TGV: theory, principles and algorithms: a tool for the automatic synthesis of conformance test cases for non-deterministic reactive systems. Int. J. Softw. Tools Technol. Transfer 7, 297–315 (2005)

    Article  Google Scholar 

  10. Carvalho, G., Sampaio, A., Mota, A.: A CSP timed input-output relation and a strategy for mechanised conformance verification. In: Groves, L., Sun, J. (eds.) ICFEM 2013. LNCS, vol. 8144, pp. 148–164. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-41202-8_11

    Chapter  Google Scholar 

  11. Almeida, R., Nogueira, S., Sampaio, A.: Automatic test case generation for concurrent features from natural language descriptions. In: Massoni, T., Mousavi, M.R. (eds.) SBMF 2018. LNCS, vol. 11254, pp. 163–179. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-03044-5_11

    Chapter  Google Scholar 

  12. Arruda, F.: A Formal Approach to Test Automation Based on Requirements, Domain Model, and Test Cases Written in Natural Language. Federal University of Pernambuco (2022)

    Google Scholar 

  13. Cavalcanti, A., Hierons, R., Nogueira, S., Sampaio, A.: A suspension-trace semantics for CSP. In: 2016 10th International Symposium on Theoretical Aspects of Software Engineering (TASE), pp. 3–13 (2016)

    Google Scholar 

  14. Perrusi, L.: AutoTestCoverage: Uma Ferramenta para Cobertura de Testes de Integração no Contexto Android sem Uso de Codigo-Fonte, December 2018

    Google Scholar 

  15. Signer uber-apk-signer. https://github.com/patrickfav/uber-apk-signer

  16. Www.android.com, L. LogCat—www.android.com. https://www.android.com

  17. https://apktool.org/, APKTool—https://apktool.org/. https://apktool.org/

  18. Escobar Velasquez, C., Osorio Riano, M., Linares Vasquez, M.: MutAPK source codeless mutant generation for Android apps. In: 2019 34th IEEE ACM International Conference on Automated Software Engineering (ASE), pp. 1090–1093 (2019)

    Google Scholar 

  19. Wei, Y.: MuDroid: mutation testing for Android apps. University of College London, London, UK, Technical report (2015)

    Google Scholar 

  20. Luna, E., El Ariss, O.: Edroid: a mutation tool for android apps. In: 2018 6th International Conference in Software Engineering Research and Innovation (CONISOFT), pp. 99–108 (2018)

    Google Scholar 

  21. Https://pitest.org/Pitest. https://pitest.org/

  22. Android11. https://www.android.com/android-11/

  23. Cao, Y., Wang, Y.: Concurrent software testing method based on CSP and PAT. In: 2018 IEEE/ACIS 17th International Conference on Computer and Information Science (ICIS), pp. 641–644 (2018)

    Google Scholar 

  24. Murthy, P., Ulrich, A.: Distributed GUI test automation. In: 2017 14th IEEE India Council International Conference (INDICON), pp. 1–6 (2017)

    Google Scholar 

Download references

Acknowledgements

We would like to thank the CIn-Motorola Teams for helping with the experiments. This work was partially founded by CNPq (grant 432198/2018-0). Rafaela Almeida was partially founded by Motorola Mobility Comércio de Produtos Eletrônicos Ltda and Fundação de Amparo a Ciência e Tecnologia do Estado de Pernambuco (FACEPE) (grant IBPG-0063-1.03/19).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rafaela Almeida .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Almeida, R., Nogueira, S., Sampaio, A. (2024). Sound Test Case Generation for Concurrent Mobile Features. In: Barbosa, H., Zohar, Y. (eds) Formal Methods: Foundations and Applications. SBMF 2023. Lecture Notes in Computer Science, vol 14414. Springer, Cham. https://doi.org/10.1007/978-3-031-49342-3_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-49342-3_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-49341-6

  • Online ISBN: 978-3-031-49342-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics