article banner (priority)

Leveraging AI in Software Testing

Nowadays, researchers are looking to adapt Machine Learning algorithms to testing processes to reduce the manual effort and improve quality.

With machine learning, we can reduce maintenance efforts and improve the quality of products. It can be used in various stages of the software testing life-cycle: test definition, implementation, execution, maintenance and grouping, and bug handling. Stages in which AI is applicable are:

  • Test definition
    Tests can be defined by ML.
  • Implementation
    Implementation can be assisted by ML by Automatic code generation or code completion
  • Execution
    During the execution phase, ML practices can be adapted to perform exploratory testing.
  • Maintenance and grouping
    Review test code, Heal broken test code, Prioritize test cases, or Constructing suites
  • Bug Management
    Triage, Classification, and Assignment of bugs are possibly managed by ML.

To wrap up, as more and more researchers try to use AI techniques to solve the traditional software problems, “what and how we can use” becomes more crucial. AI is one of the hottest topics in the software world nowadays. Especially mining valuable information from bugs can be made use of by managers to guide feature priorities.

Bug triage is a crucial process to properly manage and prioritize bugs. They can be classified into various priority levels such as Low, Medium, High and Immediate. This classification is a target problem to be solved by Machine Learning algorithms.

A real-life study of bug classification is done as follows:

  • Data is collected. (Export bugs from the issue tracking system i.e. Jira.)
  • Data is cleaned and organized. (Noise or misleading words are removed from the text)
  • Data is separated into training and test data.
  • Features are extracted. (Text is converted into numerical vectors)
  • Model is generated.
  • Performance is evaluated.

Feature extraction is the most fundamental operation to generate an ML model. Since the machine does not understand text, it has to be converted into numeric values. Each sample has different values on every feature. Representing samples with different colors, feature extraction depiction is as follows:

  • Generating model (by algorithms lie SVM, Decision Trees)
  • Evaluate the performance by Confusion Matrices: