Automating and Optimizing Software Testing Using A
Automating and Optimizing Software Testing Using A
Abstract—The final product of software development process technologies, various business domains are accepting and
is a software system and testing is one of the important stages in using AI based software. AI systems are developed based on
this process. The success of this process can be determined by machine learning models and techniques. AI is used to
how well it accomplishes its goal. Due to the advancement of promote automation and reduce the amount of routine
technology, various software testing tools have been introduced activities to create testing phases by applying logic, problem
in the software engineering discipline. The use of software is solving, and ML. The purpose of this paper is to present the
increasing day-by-day and complexity of software functions are application of AI techniques in automation of software testing
challenging and there is need to release the software within the
and the impacts. The paper is closed with a conclusion and a
short quality evaluation period, there is a high demand in
viewpoint of future work to enhance the practical aspects of
adopting automation in software testing. Emergence of automatic
software testing tools and techniques helps in quality
the AI automation tool.
enhancement and reducing time and cost in the software II. LITERATURE REVIEW
development activity. Artificial Intelligence (AI) techniques are
widely applied in different areas of Software engineering (SE). Testing is an activity takes place throughout the software
Application of AI techniques can help in achieving good development life cycle. The major aim of the software testing
performance in software Testing and increase the productivity of is find errors and to ensure that the developed system satisfies
the software development firms. This paper briefly presents the the requirements of customers. Software testing a way of
state of the art in the field of software testing by applying AI evaluating a system by discovering the differences between
techniques in software testing. the identified requirements at the requirement engineering
activity and the archived results. There are various techniques
Keywords—Software testing; artificial intelligence; testing used for testing a software to ensure quality. Testing can be
automation; software engineering; software quality done as manual or automated using specific tools [20] [7]. In
I. INTRODUCTION manual testing, the software tester follows a test plan and
complete a set of test cases manually. Manual testing is time
Software engineering is the creation and application of consuming and cost effective. The alternative of the manual
sound engineering principles to produce cost-effective testing is the automated execution in which a software
software which is both reliable and functional on real program runs a pre-defined test cases and shows and saves the
machines. A well-managed development process is needed to results. Automatic testing executes the test-case automation,
produce a high-quality software product. Software test-case generation and result verification. [2]. Automation
development is a human endeavor which involves various testing tools are used in automatic software testing and the
activities. The activities are; analysis, design, implementation reliability as well as performance are more than manual
and testing and each of them contributes to the creation of the testing [10] [19]. Software testing using AI techniques has
final product. These activities continue in the development been adopted by software development companies all over the
process, and thus producing a working version of the system world. The application of AI is wide-ranging branch of
can be time-consuming. Software testing is one of the computer science that deals with building smart machines
principal activities in software development for verifying and which are capable of performing smart tasks with assistance of
validating a software system. Testing assists software human intelligence [9].
developers in ensuring that the developed software fulfills its
intended function, as well as determining whether or not the AI has become an emerging technology which can be
identified problems have been solved. Since the software applied in ensuring quality assurance (QA) in organizations
development life-cycle is a complex process with a crucial [26] [15]. AI developments require an approach to validation
need to deliver a new product within the allocated time, the and verification of software. AI has becoming an important
software testing process should be efficient and effective. factor in quality assurance and testing in future. [14]. AI is a
branch of science and engineering concerned with the
In the software industry, automation plays a critical role in computational analysis of intelligent behavior and the creation
increasing testing performance. There are various automation of intelligent machines. The term AI refers to a collection of
tools available to support the testing activity. Newer tools, techniques, and algorithms [3] [11] [21]. Application of
technologies like Artificial Intelligence (AI) and Machine AI techniques are creating impacts in various domains like
Learning (ML) are constantly being used to speed up the health, manufacturing etc. Emergence of big data and its
software development process. With the advancement of AI management requires strong computing tools and AI helps in
594 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 5, 2021
595 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 5, 2021
596 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 5, 2021
597 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 5, 2021
598 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 5, 2021
Functional tests are part of integration tests and designed any web application can be automated irrespective of the
to evaluate specific tasks. For example, user registration in an browser it is running. There are in-built libraries in Watir to
online system, the registration function should validate the support various activities such as page performance. Fig. 8
data entry from the user. Other examples are catalogue search depicts the test script for opening Chrome browser.
and online payment in an e-commerce application etc. A wide
range of test values are required to perform these tests. Fig. 9 demonstrates another sample of creation and
Performance testing is used for measuring the ability of execution of test case using Watir. A simple test has been used
servers to respond to user demand in a networking to test the accuracy of the code. The test script runs
environment. A load test is a method of evaluating a server's successfully.
performance by applying a given load to the application in Fig. 10 shows an example of a test script for the user
order to evaluate the response time for individual functions. interface testing. The sample HTML and JavaScript code is
The aim of security testing is to ensure that the application has shown in Fig. 11 for the page.
authentication and authorization controls in place and is not
vulnerable to attacks. User interfaces are usually tested for The presentation of the web page is done using HTML and
Navigation errors, presentation errors and control usage a JavaScript function is used for the static feature of the page
problems. Regression testing can reveal defects that recur as a code using HTML and Fig. 11 shows the code.
result of software changes that were not planned. Fig. 12 shows the debugging screen of another sample test
B. Pactical Application: Using Watir script with another browser, Firefox using Watir automation
tool.
Watir (Web Application Testing in Ruby) has been
selected as a software experimenting too to support the
technical aspects of the research. l. The Watir supports almost
all of the web browsers. The websites and user interfaces can
be tested using Watir. The test framework by using Watir
follows the following order as shown in Fig. 7.
After installing the required drivers, test scripts for
opening browsers have been written in the RubyMine IDE.
The test scripts are written in Ruby language. Watir is selected
for the practical application because first of all, it is very easy
to use open source tool. This tool is developed using Ruby and Fig. 7. The Order of Test Framework in Watir.
599 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 5, 2021
Fig. 11. HTML and JavaScript Code for the Sample UI.
600 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 5, 2021
After running the test cases using it can be concluded that activity to produce a defect free software application. This
Watir allows easy to test file download for the user interface paper presented the role of artificial Intelligence tools in
of a web application. Popup test alerts are provided at times as software testing.
well. Another feature in Watir is, Page Performance can be
measured using the performance object. Navigation, timing The paper also looked into various types of testing
and memory performance can be measured by getting these techniques for validation and verification of the software
details when the application is connected to the browser. Page system. Selection of an appropriate AI based test automation
object feature available in Watir helps reusability of the code tools is important based on the type of testing and this paper
basically in the form of classes. This feature of Watir helps the discusses the features of popular AI enables testing tools.
automation of the application without code redundancy. Finally, the paper is presented the advantages of AI testing
Without opening the browser, the details are obtained in the tools applications in software testing. An extension of this
command line and thus supports the execution of the user research paper will be presented by evaluating AI based test
interface test cases at the command line prompt. automation tools by taking into consideration of more
technical details. Enhanced practical aspect will be covered by
VIII. ADVANTAGES OF USING AI IN SOFTWARE TESTING real implementation of the test automation of white-box
testing using a mobile application.
Fig. 13 lists the advantages of using AI tools in automating
software testing. When the testing of a software system is REFERENCES
done manually by even by highly skilled and experienced [1] Agrafiotis, I., Creese, S., Goldsmith, M.: Developing a Strategy for
software testers there is a possibility of making mistakes and Automated Privacy Testing Suites. In: Camenisch J., Crispo B., Fischer-
Hübner S., Leenes R., Russello G. (eds.) Privacy and Identity
experience tiredness. Artificial Intelligent tools are constantly Management for Life. Privacy and Identity 2011. IFIP Advances in
performing tasks effectively even repetitive tasks. Automated Information and Communication Technology, vol. 375, pp. 32–44.
testing tools cab ne used by both software developers and Springer, Berlin, Heidelberg (2012). doi:10.1007/978-3-642-31668-5_3
testers. If the modifications ad editing of the program source 2.
code are cheeked thoroughly software tests will run [2] Andreas Leitner, Ilinca Ciupa, Bertrand Meyer, Mark Howard
automatically. For any unsuccessful tests, the developers will “Reconciling Manual and Automated Testing: the AutoTest
Experience”. ETH Zurich CH-8092 Zürich, AXA Rosenberg Investment
be notified and thus saving the time of the developers. AI Management LLC Orinda, California 94563.
enables automatic testing can help in improving the overall [3] A. M. Turing. “Computing machinery and intelligence”. In: Parsing the
test coverage and ensure quality of the developed software. Turing Test. Springer, 2009, pp. 23–65. [2] J. McCarthy. “Artificial
The performance of the system can be tested against the intelligence, logic and formalizing common sense”. In: Philosophical
expected requirements in an efficient manner. AI enables logic and artificial intelligence. Springer, 1989, pp. 161–190.
testing can perform image and pattern recognition. This [4] Berndt, D.J., Fisher, J., Johnson, L., Pinglikar, J., and Watkins, A.,
feature will help in detecting visual errors and make sure all “Breeding Software Test Cases with Genetic Algorithms,” In
Proceedings of the Thirty-Sixth Hawaii International Conference on
visual elements are working properly. Software testing is a System Sciences (HICSS-36), Hawaii, January 2003.
repeating process and source code may change time to time, [5] B. Littlewood and J. L. Verrall, “A Bayesian reliability growth model
manual testing will be a time consuming task. AI tools can for computer software,” Applied Statistics, vol. 22, no. 3, pp. 332–346,
perform the testing and detect errors with lesser time and AI 1973.
tools are not expected to make errors and will help to generate [6] E. Horvitz, J. Breese, D. Heckerman, D. Hovel, and K. Rommelse, “The
more accurate results. Test automation can be done efficiently Lumiere project: Bayesian user modeling for inferring the goals and
AI enables testing tools. needs of software users,” in Proceedings of the Fourteenth Conference
on Uncertainty in Artificial Intelligence. San Mateo: Morgan Kaufmann,
Jul. 1998, pp. 256–265.
[7] Er. Rajender Bathla, Er. Shallu Bathla. “Innovative Approaches of
Automated tools in Software testing & current technology as compared
to Manual testing ”. Global Journal of Enterprise Information System,
Vol-1(1) , 2009.
[8] Glenford J. Myers, Corey Sandler, Tom Badgett , The Art of Software
Testing, 3rd Edition, 2015.
[9] Harman, M. (2012, June). The role of artificial intelligence in software
engineering. In 2012 First International Workshop on Realizing AI
Synergies in Software Engineering (RAISE) (pp. 1- 6). IEEE.
Fig. 13. AI Enabled Testing: Advantages. [10] Jagdish Singh, Monika Sharma.” A Comprehensive Review of Web-
based Automation Testing Tools”. International Journal of Innovative
IX. CONCLUSION AND FUTURE WORK Research in Computer and Communication Engineering, Vol. 3(10),
October 2015.
Producing a quality software to the clients within the [11] J. McCarthy. Artificial intelligence: a paper symposium: Professor Sir
specified time by incorporating all the requirements is a James Lighthill, FRS. Artificial Intelligence: A General Survey. In:
crucial task. By using annual testing approach this will not be Science Research Council, 1973. 1974.
easy. There are various automation tools available to perform [12] Khan, M. E., & Khan, F. (2012). A comparative study of white box,
software testing. Artificial Intelligence techniques have black box and grey box testing techniques. Int. J. Adv. Comput. Sci.
Appl, 3(6).
significant impact in various stages of software development
[13] Lee Copeland, A Practitioner’s Guide to Software Test Design, 2003.
activity including software testing. Application of AI in test
automation is an appropriate solution for software testing [14] M. Buenen and A. Walgude, “World quality report 2018–19,” Paris,
France, Tech. Rep., 2018.
601 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 5, 2021
[15] Mariani, L., Hao, D., Subramanyan, R., Zhu, H.: The central role of test [21] S. Russell et al. Artificial Intelligence: A Modern Approach. 3rd ed.
automation in software quality assurance. Software Quality Journal Prentice Hall, 2010.
25(3), 797–802 (2017). doi:10.1007/s11219-017-9383-5. [22] S. H. Trivedi, "Software Testing Techniques," International Journal of
[16] Meziane, F. and Vadera, S., (2010). Artificial Intelligence in Software Advanced Research in Computer Science and Software Engineering,
Engineering Current Developments and Future Prospects, In "Artificial vol. 2, no. 10, pp. 433439, 2012.
Intelligence Applications for Improved Software Engineering [23] Stuart Feldman, Quality Assurance: Much More than Testing, ACM
Development: New Prospects", IGI Global. Digital Library, Queue – Quality Assurance, February 2005, Vol 3, Issue
[17] Narayan, Vaibhav, The Role of AI in Software Engineering and Testing 1.
(June 22, 2018). International Journal of Technical Research and [24] Tadapaneni, N. R. (2017). Different Types of Cloud Service Models.
Applications, 2018, Available at SSRN: https://ssrn.com/abstract= Available at SSRN 3614630.
3633525.
[25] T. Kosa, M. Mernikb and T. Kosarb, "Test automation of a measurement
[18] N. E. Fenton, M. Neil, W. Marsh, P. Hearty, L. Radlinski, and P. system using a domain-specific modelling language," Journal of
Krause, “On the effectiveness of early life cycle defect prediction with Systems and Software, vol. 111, p. 74–88, 2016.
Bayesian Nets,” Empirical Software Engineering, vol. 13, no. 5, pp.
499–537, 2008. [26] Van De Ven, T. et al., 2018. World Quality Report 2018-19 - Artificial
Intelligence - World Quality Report 2018-19 Findings:. [Online]
[19] Prof. (Dr.) V. N. MAURYA , Er. RAJENDER KUMAR . “Analytical Available at: https://www.sogeti.com/globalassets/global/wqr-
Study on Manual vs. Automated Testing Using with Simplistic Cost 201819/wqr-201819_secured.pdf.
Model ”. International Journal of Electronics and Electrical Engineering,
vol .2 (1), 2012. [27] V. Sangave and V. Nandedkar, "A Review on Automating Test
Automation," International Journal of Advance Research in Computer
[20] R. M. Sharma.” Quantitative Analysis of Automation and Manual Science and Management Studies, vol. 2, no. 12, 2014.
Testing.” International Journal of Engineering and Innovative
Technology (IJEIT), Vol. 4(1), 2014.
602 | P a g e
www.ijacsa.thesai.org