Skip to main content

Advertisement

Log in

Sharif-TaaWS: a tool to automate unit testing of web services

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

Abstract

Service-Oriented Architecture is a technology for designing software systems. Upon using this architecture, new challenges appeared for software testing in which unit testing can be viewed as the most essential and basic testing procedure. Many industrial tools and academic studies have presented a level of automation for unit testing of web services. Herein, we introduce a new tool called Sharif-TaaWS to automate the unit testing of web services through a method-based attribute grammar (MBAG) of the source code. This tool generates a test web service named TaaWS (Test as a web service), a combination of both online testing and testing as a service. Sharif-TaaWS has three modules including Initializer, MBAG generator, and TaaWS creator. These modules scan and parse the web service source code through the scan-grammar, generate MBAG, and create test cases in TaaWS. In this paper, we evaluate our proposed tool using different types of web services. Sharif-TaaWS is compared with other unit testing tools through the response time, test case generation, and report preparation time using different environments. The results show that Sharif-TaaWS has more ability to find web service faults and can reduce the testing process time through the attribute grammar and the test web service.

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

Access this article

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

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

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

Explore related subjects

Discover the latest articles and news from researchers in related subjects, suggested using machine learning.

References

  • Atlidakis, V., Godefroid, P., Restler, P.M.: Stateful rest API fuzzing. In:2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE), pp. 748–758. IEEE, 2019

  • Anjum, M.S., Ryan, C.: Ariadne: evolving test data using grammatical evolution. In: European Conference on Genetic Programming, pp. 3–18. Springer, Cham (2019)

    Google Scholar 

  • Ammann, P., Offutt, J.: Introduction to Software Testing. Cambridge University Pres, Cambridge (2016)

    Book  Google Scholar 

  • API Testing Tools, Available from: https://www.testim.io/blog/the-9-api-testing-tools-you-cant-live-without-in-2019-2/ [last accessed 1 November 2021]

  • API Tools, Available from: https://www.guru99.com/top-6-api-testing-tool.html [last accessed 1 November 2021].

  • Arcuri, A.: RESTful API automated test case generation with EvoMaster. ACM Trans. Softw. Eng. Methodol. (TOSEM) 28(1), 1–37 (2019)

    Article  MathSciNet  Google Scholar 

  • Bozkurt, M., Harman, M., Hassoun, Y.: Testing and verification in service-oriented architecture: a survey. Softw. Test. Verif. Reliab. 23(4), 261–313 (2013)

    Article  Google Scholar 

  • Calculator web service, Available from: https://github.com/OnlineCalculators/calculator [last accessed 26 July 2020].

  • Candea, G., Godefroid, P.: Automated software test generation: some challenges, solutions, and recent advances. In: Computing and Software Science, pp. 505–531. Springer, Cham (2019)

    Chapter  Google Scholar 

  • Candea, G., Bucur, S., Zamfir, C.: Automated software testing as a service. In: Proceedings of the 1st ACM Symposium on Cloud Computing, pp. 155–16, 2010

  • Corradini, D., Zampieri, A., Pasqua, M., Viglianisi, E., Dallago, M., Ceccato, M.: Automated black‐box testing of nominal and error scenarios in RESTful APIs. Software Testing, Verification and Reliability, p e1808, 2022

  • Dong, X., Halevy, A., Madhavan, J., Nemes, E., Zhang, J.: Similarity search for web services. In: Proceedings of the Thirtieth International Conference on Very Large Data Bases, vol 30, pp 372–383. VLDB Endowment, 2004

  • Endo, A.T.: Model-based testing of service-oriented applications (Doctoral dissertation, Universidad de São Paulo), 2013

  • Features-Service (Apache), from https://github.com/JavierMF/features-service, 2016

  • Gordon, F., Arcuri, A.: Evosuite: automatic test suite generation for object-oriented software. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering, pp. 416–419, 2011

  • Habibi, E., Mirian-Hosseinabadi. H.: On-demand Test as a Web Service Process (OTaaWS Process). In: 2021a 7th International Conference on Web Research (ICWR), pp. 16–23, doi: https://doi.org/10.1109/ICWR51868.2021.9443109, 2021a

  • Habibi, E., Mirian-Hosseinabadi, H.: Sharif-TaaWS: A tool to generate Test as a Web Service (TaaWS) Through a Method-Based Attribute Grammar (Technical Report), Software Quality Research Laboratory, Computer Engineering Department, Sharif University of Technology, Tehran, Iran, 2021b. Available at: http://sqrlab.ce.sharif.edu/?page_id=125

  • Habibi, E., Mirian-Hosseinabadi, S.H.: Generating test as a web service (TaaWS) through a method-based attribute grammar. Int. J. Softw. Tools Technol. Transfer 3, 1–7 (2022)

    Google Scholar 

  • Hielscher, J., Kazhamiakin, R., Metzger, A., Pistore, M.: A framework for proactive self-adaptation of service-based applications based on online testing. In: Towards a Service-Based Internet, pp. 122–33. Springer, Berlin (2008)

    Chapter  Google Scholar 

  • HP Service Test. Available from: http://h71028.www7.hp.com/enterprise/cache/19054-0-0-225-121.html [last accessed 26 July 2020]

  • JMeter Apache, http://jmeter.apache.org/ [last accessed 26 July 2020]

  • Jonathan, L.A., Thenuardi, D., Soewito, B., Antonyova, A:. Survey on quality assurance testing on service oriented architecture. In: 2020 International Conference on Information Management and Technology (ICIMTech), pp. 443–447. IEEE, 2020

  • katalon, Available from: https://www.katalon.com/web-testing/?utm_source=sth&utm_medium=web_service_listing&utm_campaign=ks [last accessed 1 November 2021]

  • Keramati, H., Mirian-Hosseinabadi, S.H.: Generating semantically valid test inputs using constrained input grammars. Inf. Softw. Technol. 1(57), 204–216 (2015)

    Article  Google Scholar 

  • Knuth, D.E.: Semantics of context-free languages. Math. Syst. Theory 2(2), 127–145 (1968)

    Article  MathSciNet  MATH  Google Scholar 

  • Lenz, C., Chimiak-Opoka, J., Breu, R.: Driven-model testing of SOA-based software. In Proceedings of the SEMSOA Workshop on Software Engineering Methods for SOA, pp. 10–11 (2007)

  • Martin-Lopez, A., Segura, S., Ruiz-Cortés, A.: RESTest: Black-box constraint-based testing of RESTful web APIs. In: International Conference on Service-Oriented Computing, pp. 459–475. Springer, Cham (2020)

    Chapter  Google Scholar 

  • Oracle Application Testing Suite. Available from: www.oracle.com/technetwork/oem/app-quality-mgmt/application-quality-management-092933.html. [last accessed 26 July 2020]

  • PersonalINFO web service, Available from: https://gist.github.com/ebraminio/5292017 [last accessed 26 July 2020]

  • Sajeev, A., Ramakrishnan, S.: Use of attribute grammars in test sequence specifications. In: Proceedings of the International Conference on Software Engineering and Applications, pp. 110–119 (1997)

  • Sommerville, I.: Software engineering 9th Edition. ISBN-10137035152. 2011.

  • Sheskin, D.: Handbook of Parametric and Nonparametric Statistical Procedures, 4th edn. Chapman and All/CRC, New York (2007)

    MATH  Google Scholar 

  • Slonneger, K., Kurtz, B.L.: Formal Syntax and Semantics of Programming Languages. Addison-Wesley, Reading (1995)

    MATH  Google Scholar 

  • Sneed, H.M., Huang, S.: WSDLTest-a tool for testing web services. In 2006 Eighth IEEE International Symposium on Web Site Evolution (WSE'06), pp. 14–21. IEEE, 2006

  • SOAP Sonar. Available from: http://www.crosschecknet.com/products/soapsonar.php [last accessed 26 July 2020]

  • soapUI – The Home of Functional Testing, http://www.soapui.org/ [last accessed 26 July 2020]

  • SOATest. Available from: http://www.parasoft.com/jsp/products/soatest.jsp?itemId=101 [last accessed 26 July 2020]

  • Testmaker, Available from: http://www.pushtotest.com/testmaker-open-source-testing [last accessed 1 November 2021]

  • Tsai, WT., Wei, X., Chen, Y., Paul, R.: A robust testing framework for verifying web services by completeness and consistency analysis. InService-Oriented System Engineering, 2005. SOSE 2005. IEEE International Workshop 2005 Oct 20 (pp. 151–158). IEEE

  • Viglianisi, E., Dallago, M., Ceccato, M.: RestTestGen: automated black-box testing of RESTful APIs. In 2020 IEEE 13th International Conference on Software Testing, Validation and Verification (ICST), pp. 142–152. IEEE, 2020

  • Wang, Y., Stroulia, E.: Semantic structure matching for assessing web-service similarity. In: International Conference on Service-Oriented Computing, pp. 194–207. Springer, Berlin, Heidelberg (2003)

    Google Scholar 

  • W3C Working Group Note, Web Services Architecture, 2004, Available from: http://www.w3.org/TR/2004/NOTE-ws-arch-20040211/

  • Web Service Testing Tools, Available from: https://www.softwaretestinghelp.com/web-services-testing-tools/ [last accessed 1 November 2021]

  • Zhang, M., Arcuri, A.: Adaptive hypermutation for search-based system test generation: a study on REST APIs with EvoMaster. ACM Trans. Softw. Eng. Methodol. (TOSEM) 31(1), 1–52 (2021)

    Article  Google Scholar 

  • Zhang, Y., Fu, W., Qian, J.: Automatic testing of web services in haskell platform. J. Comput.Inf.Syst. 6(9), 2859–2867 (2010)

    Google Scholar 

Download references

Acknowledgements

This research has been supported by a Grant from the Sharif University of Technology – Iran.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Elahe Habibi or Seyed-Hassan Mirian-Hosseinabadi.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix 1: Rules and notations of MBAG

For each of the I, O, and C sections, the rules for generating MBAG are formalized as bellows:

  • Each variable has two main attributes, namely, type and value.

  • If a variable, such as a string, can be divided into smaller components, two new attributes, namely length and position are also considered for each component of the variable.

  • A condition can be defined for the attributes of a variable.

  • Pre-conditions are the conditions defined for input variables of a web method.

  • Final_condition is the last condition and obtain form logical AND of all conditions.

  • An operation can be defined for each variable.

  • Each variable can have one or more conditions.

  • Each variable can have only one operation.

  • For each variable, at least one condition or one operation should be defined.

Notations of our rules in MBAG are as below:

  • The nonterminal is surrounded by <  > .

  • The terminal is not surrounded by <  > .

  • The attribute is presented by A() for the Nonterminal.

  • Condition #n can be defined for each attribute using logical operators and “#” means the number of conditions (1,2,…,n).

  • Operation #n can be defined for each variable and “#” means the number of operations (1,2,…,n).

  • Assigning value X to attribute A() is presented by A() <—X and X can be digits or characters.

Appendix 2: The scan grammar definition

See Tables 7 and 8.

Table 7 Non-Terminal used in the scan-grammar
Table 8 The notation of the scan-grammar

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Habibi, E., Mirian-Hosseinabadi, SH. Sharif-TaaWS: a tool to automate unit testing of web services. Autom Softw Eng 30, 1 (2023). https://doi.org/10.1007/s10515-022-00368-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10515-022-00368-4

Keywords