Skip to main content
Top

2016 | OriginalPaper | Chapter

Clustering-Aided Page Object Generation for Web Testing

Authors : Andrea Stocco, Maurizio Leotta, Filippo Ricca, Paolo Tonella

Published in: Web Engineering

Publisher: Springer International Publishing

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

To decouple test code from web page details, web testers adopt the Page Object design pattern. Page objects are facade classes abstracting the internals of web pages (e.g., form fields) into high-level business functions that can be invoked by test cases (e.g., user authentication). However, writing such page objects requires substantial effort, which is paid off only later, during software evolution. In this paper we propose a clustering-based approach for the identification of meaningful abstractions that are automatically turned into Java page objects. Our clustering approach to page object identification has been integrated into our tool for automated page object generation, Apogen. Experimental results indicate that the clustering approach provides clusters of web pages close to those manually produced by a human (with, on average, only three differences per web application). 75 % of the code generated by Apogen can be used as-is by web testers, breaking down the manual effort for page object creation. Moreover, a large portion (84 %) of the page object methods created automatically to support assertion definition corresponds to useful behavioural abstractions.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literature
1.
go back to reference Arthur, D., Vassilvitskii, S.: K-means++: the advantages of careful seeding. In: Proceedings of SODA, pp. 1027–1035. Society for Industrial and Applied Mathematics (2007) Arthur, D., Vassilvitskii, S.: K-means++: the advantages of careful seeding. In: Proceedings of SODA, pp. 1027–1035. Society for Industrial and Applied Mathematics (2007)
2.
go back to reference Blanco, L., Dalvi, N., Machanavajjhala, A.: Highly efficient algorithms for structural clustering of large websites. In: Proceedings of WWW, pp. 437–446 (2011) Blanco, L., Dalvi, N., Machanavajjhala, A.: Highly efficient algorithms for structural clustering of large websites. In: Proceedings of WWW, pp. 437–446 (2011)
3.
go back to reference Choudhary, S.R., Prasad, M.R., Orso, A.: Crosscheck: combining crawling and differencing to better detect cross-browser incompatibilities in web applications. In: Proceedings of ICST, pp. 171–180 (2012) Choudhary, S.R., Prasad, M.R., Orso, A.: Crosscheck: combining crawling and differencing to better detect cross-browser incompatibilities in web applications. In: Proceedings of ICST, pp. 171–180 (2012)
4.
go back to reference Choudhary, S.R., Versee, H., Orso, A.: Webdiff: automated identification of cross-browser issues in web applications. In: Proceedings of ICSM, pp. 1–10 (2010) Choudhary, S.R., Versee, H., Orso, A.: Webdiff: automated identification of cross-browser issues in web applications. In: Proceedings of ICSM, pp. 1–10 (2010)
5.
go back to reference Crescenzi, V., Merialdo, P., Missier, P.: Clustering web pages based on their structure. Data Knowl. Eng. 54(3), 279–299 (2005)CrossRef Crescenzi, V., Merialdo, P., Missier, P.: Clustering web pages based on their structure. Data Knowl. Eng. 54(3), 279–299 (2005)CrossRef
6.
go back to reference Kaufman, L., Rousseeuw, P.: Clustering by means of medoids. In: Statistical Data Analysis Based on the L1-Norm and Related Methods, pp. 405–416. North-Holland (1987) Kaufman, L., Rousseeuw, P.: Clustering by means of medoids. In: Statistical Data Analysis Based on the L1-Norm and Related Methods, pp. 405–416. North-Holland (1987)
7.
go back to reference Kaufman, L., Rousseeuw, P.J.: Finding Groups in Data: An Introduction to Cluster Analysis. Wiley Series in Probability and Mathematical Statistics. Wiley, Hoboken (1990)CrossRef Kaufman, L., Rousseeuw, P.J.: Finding Groups in Data: An Introduction to Cluster Analysis. Wiley Series in Probability and Mathematical Statistics. Wiley, Hoboken (1990)CrossRef
9.
go back to reference Leotta, M., Clerissi, D., Ricca, F., Tonella, P.: Capture-replay vs. programmable web testing: an empirical assessment during test case evolution. In: Proceedings of 20th Working Conference on Reverse Engineering, WCRE 2013, pp. 272–281. IEEE (2013) Leotta, M., Clerissi, D., Ricca, F., Tonella, P.: Capture-replay vs. programmable web testing: an empirical assessment during test case evolution. In: Proceedings of 20th Working Conference on Reverse Engineering, WCRE 2013, pp. 272–281. IEEE (2013)
10.
go back to reference Leotta, D., Clerissi, D., Ricca, F., Tonella, P.: Approaches and tools for automated end-to-end web testing. Adv. Comput. 101, 193–237 (2016)CrossRef Leotta, D., Clerissi, D., Ricca, F., Tonella, P.: Approaches and tools for automated end-to-end web testing. Adv. Comput. 101, 193–237 (2016)CrossRef
11.
go back to reference Leotta, M., Stocco, A., Ricca, F., Tonella, P.: Automated generation of visual web tests from DOM-based web tests. In: Proceedings of 30th ACM/SIGAPP Symposium on Applied Computing, SAC 2015, pp. 775–782. ACM (2015) Leotta, M., Stocco, A., Ricca, F., Tonella, P.: Automated generation of visual web tests from DOM-based web tests. In: Proceedings of 30th ACM/SIGAPP Symposium on Applied Computing, SAC 2015, pp. 775–782. ACM (2015)
12.
go back to reference Leotta, M., Stocco, A., Ricca, F., Tonella, P.: Meta-heuristic generation of robust XPath locators for web testing. In: Proceedings of 8th IEEE/ACM International Workshop on Search-Based Software Testing, SBST 2015, pp. 36–39. IEEE (2015) Leotta, M., Stocco, A., Ricca, F., Tonella, P.: Meta-heuristic generation of robust XPath locators for web testing. In: Proceedings of 8th IEEE/ACM International Workshop on Search-Based Software Testing, SBST 2015, pp. 36–39. IEEE (2015)
13.
go back to reference Leotta, M., Stocco, A., Ricca, F., Tonella, P.: Using multi-locators to increase the robustness of web test cases. In: Proceedings of 8th IEEE International Conference on Software Testing, Verification and Validation, ICST 2015, pp. 1–10. IEEE (2015) Leotta, M., Stocco, A., Ricca, F., Tonella, P.: Using multi-locators to increase the robustness of web test cases. In: Proceedings of 8th IEEE International Conference on Software Testing, Verification and Validation, ICST 2015, pp. 1–10. IEEE (2015)
14.
go back to reference Leotta, M., Stocco, A., Ricca, F., Tonella, P.: ROBULA+: an algorithm for generating robust XPath locators for web testing. J. Softw. Evol. Process 28(3), 177–204 (2016)CrossRef Leotta, M., Stocco, A., Ricca, F., Tonella, P.: ROBULA+: an algorithm for generating robust XPath locators for web testing. J. Softw. Evol. Process 28(3), 177–204 (2016)CrossRef
15.
go back to reference Levenshtein, V.: Binary codes capable of correcting deletions, insertions and reversals. Sov. Phys. Dokl. 10, 707 (1966)MathSciNetMATH Levenshtein, V.: Binary codes capable of correcting deletions, insertions and reversals. Sov. Phys. Dokl. 10, 707 (1966)MathSciNetMATH
16.
go back to reference Mesbah, A., Prasad, M.R.: Automated cross-browser compatibility testing. In: Proceedings of ICSE, pp. 561–570. ACM (2011) Mesbah, A., Prasad, M.R.: Automated cross-browser compatibility testing. In: Proceedings of ICSE, pp. 561–570. ACM (2011)
17.
go back to reference Mesbah, A., van Deursen, A., Lenselink, S.: Crawling ajax-based web applications through dynamic analysis of user interface state changes. TWEB 6(1), 3:1–3:30 (2012)CrossRef Mesbah, A., van Deursen, A., Lenselink, S.: Crawling ajax-based web applications through dynamic analysis of user interface state changes. TWEB 6(1), 3:1–3:30 (2012)CrossRef
18.
go back to reference Ocariza, F., Bajaj, K., Pattabiraman, K., Mesbah, A.: An empirical study of client-side JavaScript bugs. In: Proceedings of ESEM, pp. 55–64. IEEE Computer Society (2013) Ocariza, F., Bajaj, K., Pattabiraman, K., Mesbah, A.: An empirical study of client-side JavaScript bugs. In: Proceedings of ESEM, pp. 55–64. IEEE Computer Society (2013)
19.
go back to reference Pawlik, M., Augsten, N.: Efficient computation of the tree edit distance. ACM Trans. Database Syst. 40(1), 3:1–3:40 (2015)MathSciNetCrossRef Pawlik, M., Augsten, N.: Efficient computation of the tree edit distance. ACM Trans. Database Syst. 40(1), 3:1–3:40 (2015)MathSciNetCrossRef
20.
go back to reference Ricca, F., Pianta, E., Tonella, P., Girardi, C.: Improving web site understanding with keyword-based clustering. J. Softw. Maintenance 20(1), 1–29 (2008)CrossRef Ricca, F., Pianta, E., Tonella, P., Girardi, C.: Improving web site understanding with keyword-based clustering. J. Softw. Maintenance 20(1), 1–29 (2008)CrossRef
21.
go back to reference Ricca, F., Tonella, P.: Detecting anomaly and failure in web applications. IEEE Multimedia 13(2), 44–51 (2006)CrossRef Ricca, F., Tonella, P.: Detecting anomaly and failure in web applications. IEEE Multimedia 13(2), 44–51 (2006)CrossRef
22.
go back to reference Rousseeuw, P.: Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 20(1), 53–65 (1987)CrossRefMATH Rousseeuw, P.: Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 20(1), 53–65 (1987)CrossRefMATH
23.
go back to reference Sampath, S.: Advances in user-session-based testing of web applications. Adv. Comput. 86, 87–108 (2012)CrossRef Sampath, S.: Advances in user-session-based testing of web applications. Adv. Comput. 86, 87–108 (2012)CrossRef
24.
go back to reference Stocco, A., Leotta, M., Ricca, F., Tonella, P.: APOGEN: automatic page object generator for web testing. Softw. Qual. J. (under review) Stocco, A., Leotta, M., Ricca, F., Tonella, P.: APOGEN: automatic page object generator for web testing. Softw. Qual. J. (under review)
25.
go back to reference Stocco, A., Leotta, M., Ricca, F., Tonella, P.: Why creating web page objects manually if it can be done automatically? In: Proceedings of 10th IEEE/ACM International Workshop on Automation of Software Test, AST 2015, pp. 70–74. IEEE (2015) Stocco, A., Leotta, M., Ricca, F., Tonella, P.: Why creating web page objects manually if it can be done automatically? In: Proceedings of 10th IEEE/ACM International Workshop on Automation of Software Test, AST 2015, pp. 70–74. IEEE (2015)
26.
go back to reference Tombros, A., Ali, Z.: Factors affecting web page similarity. In: Losada, D.E., Fernández-Luna, J.M. (eds.) ECIR 2005. LNCS, vol. 3408, pp. 487–501. Springer, Heidelberg (2005)CrossRef Tombros, A., Ali, Z.: Factors affecting web page similarity. In: Losada, D.E., Fernández-Luna, J.M. (eds.) ECIR 2005. LNCS, vol. 3408, pp. 487–501. Springer, Heidelberg (2005)CrossRef
27.
go back to reference Tonella, P., Ricca, F., Marchetto, A.: Recent advances in web testing. Adv. Comput. 93, 1–51 (2014)CrossRef Tonella, P., Ricca, F., Marchetto, A.: Recent advances in web testing. Adv. Comput. 93, 1–51 (2014)CrossRef
28.
go back to reference Tonella, P., Ricca, F., Pianta, E., Girardi, C.: Evaluation methods for web application clustering. In: Proceedings of WSE, pp. 33–40. IEEE (2003) Tonella, P., Ricca, F., Pianta, E., Girardi, C.: Evaluation methods for web application clustering. In: Proceedings of WSE, pp. 33–40. IEEE (2003)
29.
go back to reference van Deursen, A.: Testing web applications with state objects. Commun. ACM 58(8), 36–43 (2015)CrossRef van Deursen, A.: Testing web applications with state objects. Commun. ACM 58(8), 36–43 (2015)CrossRef
30.
go back to reference Witten, I.H., Frank, E., Hall, M.A.: Data Mining: Practical Machine Learning Tools and Techniques, 3rd edn. Morgan Kaufmann Publishers Inc., San Francisco (2011) Witten, I.H., Frank, E., Hall, M.A.: Data Mining: Practical Machine Learning Tools and Techniques, 3rd edn. Morgan Kaufmann Publishers Inc., San Francisco (2011)
31.
go back to reference Wohlin, C., Runeson, P., Höst, M., Ohlsson, M.C., Regnell, B.: Experimentation in Software Engineering. Springer, Heidelberg (2012)CrossRefMATH Wohlin, C., Runeson, P., Höst, M., Ohlsson, M.C., Regnell, B.: Experimentation in Software Engineering. Springer, Heidelberg (2012)CrossRefMATH
Metadata
Title
Clustering-Aided Page Object Generation for Web Testing
Authors
Andrea Stocco
Maurizio Leotta
Filippo Ricca
Paolo Tonella
Copyright Year
2016
DOI
https://doi.org/10.1007/978-3-319-38791-8_8

Premium Partner