Artificial Intelligence in Software ... Artificial intelligence (AI), defined as intelligence...

Click here to load reader

  • date post

    07-Jul-2020
  • Category

    Documents

  • view

    9
  • download

    2

Embed Size (px)

Transcript of Artificial Intelligence in Software ... Artificial intelligence (AI), defined as intelligence...

  • Pradeepa Lingarajashetty - Senior Software Engineer - Testing Arpan Bandyopadhyay - Software Engineer – Testing

    Pratap Mysore Narasimharaju – Test Automation Architect

    1

    Artificial Intelligence in Software Testing

    CenturyLink India Private Ltd.

  • 2

    Abstract

    Artificial intelligence (AI), defined as intelligence exhibited by machines and is creeping into our everyday lives through technology. It might seem like the realm of science fiction, but we are already using it like in online customer support, virtual personal assistants, video games, smart cars etc.., Today AI has several applications and let us see if AI can be adapted in software test automation.

    Software test automation, is the act of conducting specific tests via automation as opposed to conducting them manually. Test scripts are developed in a tool-specific language, which non-technical users and business stakeholders do not understand.

    This paper mainly focuses on embedding Artificial intelligence concepts like problem solving capabilities by implementing find the flow in IntelliJ, proactive code quality check by having SonarLint and speech recognition by building a capability to trigger the scripts through speech in software test automation for an effective non technical stakeholders engagement.

  • 3

    Artificial Intelligence

    Artificial Intelligence is a way of making a computer, a computer- controlled robot, or a software think intelligently, in the similar manner the intelligent humans think. The goal of the Artificial intelligence is to create expert systems which exhibit intelligent behavior, learn, demonstrate and show problem solving capabilities.

    Artificial Intelligence is dominant in various fields and they are referred as applications of AI which are listed below,

    • Speech recognition

    • Learning

    • Planning

    • Problem solving

    • Expert System – a Knowledge Engineer

  • 4

    Software Test Automation and Different levels of

    Testing

    Software test automation is the act of conducting specific tests via automation as opposed to conducting them manually. There are four main stages of testing that need to be completed before a program can be cleared for use. While automated test cases can be made use in all the level of test phases, acceptance testing pose a technical challenge, as the stakeholders involved in this phase are non-technical.

  • 5

    Applications of Artificial Intelligence and

    Software test automation

    Problem

    Solving

    Expert

    System

    Speech

    Recognition

    AI

    Speech

    triggers

    script

    IntelliJ

    SonarLint

  • 6

    Expert System and SonarLint

    An expert system (ES) is a knowledge-based system that

    employs knowledge about its application domain and uses an inferencing (reason) procedure to solve problems that would otherwise require human competence or expertise.

    SonarLint is an IDE plugin that acts as a expert system which does proactive code quality checks and it provides on-the-fly feedback to developers/testers on new bugs and quality issues injected into Java, JavaScript, Python and PHP code.

    It supports several IDEs and languages like below,

    IDE Languages

    Visual Studio 2015 and Up C#, VB.NET, JavaScript

    Visual Studio Code JavaScript, PHP, Python

    Eclipse Java, JavaScript, PHP

    IntelliJ IDEA Java, JavaScript, PHP

  • 7

    Functionality of SonarLint Once SonarLint is installed in the IDE, it can triggered by clicking on

    analyse option on a Java code. Here we have taken Java example and the IDE

    used is Eclipse.

    SonarLint scans code for bugs, vulnerabilities and quality issues and

    reports to the user as shown below, so user can take appropriate action. Below is

    the sample report of Sonar Lint,

  • 8

    SonarLint Report Interpretation and Benefits

    • It indicates a minor warning • It indicates a major warning • It indicates a critical warning • It indicates a blocker

    Benefits

    • Provides Immediate feedback and solutions • Improves code maintainability

    � Code Duplication � Naming conventions � Complexity

    • Improves security

  • 9

    Problem Solving Capabilities and IntelliJ

    In the part of artificial intelligence that deals with problem solving,

    encompasses a number of techniques known as algorithms, heuristics, root cause analysis, etc. once of the best of way doing the root cause analysis is by modeling the problem itself. May be by having a flow of events in a process to narrow down to the issue.

    Similarly in software testing, it is important to know the flow of events when running automated scripts, especially for novice user. having an automated flow building tool helps the user to understand the different attributes involved in the flow and the failure part for debugging purpose.

    This can be achieved by having flow plug in intelliJ. It has below advantages,

    • Run application with flow • Record executions • Visualize the flow

  • 10

    Find the Flow with intelliJ

    We can have a simple java project with flow plug-in installed in intelliJ to understand how it works. Below is the structure of Java project,

    Clicking on ‘Run with flow’ ( )option to trigger the run which gives an URL to visualize the flow after successful test run.

  • 11

    Visualize the test flow

    The test flow can be visualized by using the URL in the test results. The flow gives information at different levels like package, class and methods. User can explore each of it to get more details.

  • 12

    Speech Recognition and Triggering Automation

    Script through speech Speech recognition means understanding voice by the computer

    and performing any required task. It is the inter-disciplinary sub-field of computational linguistics that develops methodologies and technologies that enables the recognition and translation of spoken language into text by computers.

    The same concept can be applied in software test automation, where user who wants to execute scripts can trigger through voice commands. It has below benefits,

    • Business user would become a new stakeholder and acceptance testing can be effectively conducted.

    • For any other user, it demands zero set ups in the system to execute scripts.

    • It can be effectively used in unit/functional/intersystem/end to end testing

  • 13

    Implementation

    The idea is to have a dedicated mail box to monitor automation requests. Microsoft provides exchange web services APIs, which can be used to interact with the mailbox. User or whoever wants to execute scripts, has to send an email in predefined format to a mail box which triggers the script.

    We can use readEmails() and sendEmails() methods for interaction with the user.

  • 14

    Implementation Continued… After collecting the call in number from the user, we provide

    options to the user to choose what needs to be executed. This can be done using JTAPIs. Further interaction collects required details to execute scripts of the application. We use the same mail box to respond test results to the user. Below the flow for better understanding.

  • 15

    Conclusion

    In this Paper we proposed an idea of embedding Artificial Intelligence in software test automation, there by helping a novice automation tester to incorporate effective coding standards, security methods by using an expert system called SonarLint. Our focus was also more towards engaging non-stakeholders and business users with software test automation, to help out their day to day activities. By adapting flow plug in and speech recognition approached, job of these stake holders made very much easy. In addition to acceptance testing, Triggering scripts through speech has several benefits in end to end testing of a scenario which spans over multiple applications there by increasing the stakeholder base.

  • 16

    References & Appendix

    https://www.techopedia.com/definition/190/artificial-intelligence-ai

    https://www.tutorialspoint.com/artificial_intelligence/artificial_intelligence_resear ch_areas.htm

    http://www.sonarlint.org/eclipse/

    http://findtheflow.io/docs/doc_intellij.html#_how_to_run_an_application_with_flo w_from_intellij

    http://www.oracle.com/technetwork/java/jtapi-136088.html#

  • 17

    Author1 Biography Pradeep is a senior software engineer with CenturyLink India Private Ltd.

    He has an affinity towards the Analytical and problem solving skill and believes in

    continuous practice, improvement in process, learning emerging testing concepts.

    challenges of non technical stakeholders and business users in engaging

    themselves in software test automation lead him to come up with this paper.

    Author2 Biography Arpan is an enthusiastic Software Engineer-Testing who believes in

    providing comprehensive software testing solutions that could help in overall

    quality assurance. Working in an agile environment and having experience of 3

    yrs. Interested in learning emerging concepts in testing.

    Co-Au